gtkbuilder

Accelerators stop responding when menubar gets hidden

不问归期 提交于 2019-12-13 19:07:13
问题 I have a glade-based UI for gtk3, and I set accelerators fields for several menuitems. I'm not sure what GtkBuilder does exactly behind the scenes when it's loading the glade file (use a global GtkAccelGroup?), but the end result is, when I hide the menubar, the accelerator shortcuts stop working. I'm wondering whether there is a way of getting the accelerators working even when the menu is not visible, while still sticking to glade as much as possible. 回答1: Maybe you can try to stick the

convert gtkglade to libglade for a backwards compatibility

和自甴很熟 提交于 2019-12-13 05:16:36
问题 I have a python gtk app that I am porting to an environment that can only use pygtk2.10. pygtk2.10 doesn't not use the gtkbuilder infrastructure but rather the libglade infrastructure I have a 2 goals 1) convert the gtkbuilder glade file format to libglade format. Basically I want to do the opposite of gtk-builder-convert (which converts libglade to gtkbuilder formats as far as I understand it) 2) find a mapping between gtk.builder functions and libglade functions to be functionally the same

How can I access a ListStore GtkBuilder

荒凉一梦 提交于 2019-12-13 00:23:38
问题 I'm using the following code to load my gui's elements: import Graphics.UI.Gtk main = do initGUI -- loading builder <- builderNew builderAddFromFile builder "gui.glade" window <- builderGetObject builder castToWindow "window" onDestroy window mainQuit widgetShowAll window mainGUI How could I access a ListStore named "listStore", like how I've accessed a Window named "window" Example: -- doesn't compile because castToListStore is part of a hidden module, unlike castToWindow :( listStore <-

I added a gtk widget to the main window UI file, but it doesn't show up

試著忘記壹切 提交于 2019-12-11 15:59:19
问题 I am trying to add a GtkImage to my main window *.ui file, which was made using the GNOME Builder project template. <?xml version="1.0" encoding="UTF-8"?> <interface> <requires lib="gtk+" version="3.20"/> <template class="PodiumWindow" parent="GtkApplicationWindow"> <property name="default-width">600</property> <property name="default-height">300</property> <child type="titlebar"> <object class="GtkHeaderBar" id="headerBar"> <property name="visible">True</property> <property name="show-close

How do I connect glade signals using GtkBuilder in C#?

懵懂的女人 提交于 2019-12-10 22:57:49
问题 In python, I could just do builder.connect_signals(self) . It doesn't seem like this method exists in C#, and after looking at the GtkBuilder documentation, it looks like python is the exception, rather than the rule. How would I accomplish the same thing in C#? 回答1: Right now Gtk.Builder is not fully implemented in the current version of Gtk# (2.12). This thread explains the current situation. So once Gtk# 2.14 is released, you can just do: builder.Autoconnect (this); In the meantime you

GTK/C and GtkBuilder to make a single executable

我的梦境 提交于 2019-12-04 05:12:24
问题 In my project I call gtk_builder_add_from_file function to load an xml file with the ui objects designed with Glade previously. So, I have my binary program and (in the same folder) the xml file. What is the best way to pack all into a single executable? should I use a self-extracting script? or there is something else to compile all together? Thanks to all 回答1: You can use the GResource API available in GIO. GResources work by defining the assets you wish to ship with your application inside