Re: GtkAssistant flow question
Date: Sun, 12 Jul 2009 13:25:48 +0200 (CEST) From: pwie...@trychlos.org Subject: GtkAssistant flow question To: gtk-app-devel-list@gnome.org Hi, I have a simple GtkAssistant with : - one intro page - two content pages - one confirm page - one summary page. All works fine : the confirm page has 'Cancel' and 'Apply' buttons, and the summary page has only a 'Close' button. Of course (or is it only obvious for me ?), I'd wish display on the summary page the result of the work done when the user has clicked on the Apply button. But it appears that the next page is computed, and so the 'prepare' message is sent, _before_ the 'apply' message is itself emitted. So, when I handle the prepare message for the summary page, I don't know what is the result of the operations, as they have not be done yet. As a work-around, I have to do the work at the very beginning of the prepare handler. And so handling the apply message becomes useless. IMHO, the usual programmer does want 'apply' its operations before 'preparing' the display of the summary page. As the GtkAssistant cannot be considered as new (appeared in 2.9 or so), it is surely not a bug. But I don't understand the rationale behind this. Could someone explain it to me ? Why this order has it be choosen ? And how do we should handle the apply message ? Thanks in advance. Regards Pierre I have just filled up a report in bugzilla, and joined a patch. See http://bugzilla.gnome.org/show_bug.cgi?id=589745 Regards Pierre ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Can't localize GTK+ itself on Windows XP
I can't get GTK+ to localize its own strings when I bundle it and install it on another Windows machine. On my development machine, it is fine. On a clean test machine, only my application's own strings are localized, but the GTK+ about dialog and file open dialogs are in English. I think I have the directory layout right: C:\Program Files\BleachBit\bin\bleachbit.exe C:\Program Files\BleachBit\bin\libgtk-win32.dll C:\Program Files\BleachBit\share\locale\es\LC_MESSAGES\gtk20.mo C:\Program Files\BleachBit\share\locale\es\LC_MESSAGES\bleachbit.mo Here is a detailed file layout (with redundant copies of 'share' for testing): http://pastebin.com/m38d517f2 I tried setting the language two ways 1. Control Panel - Regional and Language Options - Standards and Formats 2. environment variable: set LANG=es_ES My environment * GTK 2.16.4 from binaries at http://www.gtk.org/download-windows.html * Python 2.5.4 * PyGTK 2.12 * Executables compressed with UPX * Windows XP SP3 * NSIS 2.45 My source code http://bleachbit.svn.sourceforge.net/viewvc/bleachbit/trunk/bleachbit/ Andrew ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
custom tree model, iters, and memory management
While working on a custom tree model (thanks to Tim-Philipp Müller for the tutorial), I needed more pointers in my iter structure than the user_data, user_data2, and user_data3. So I defined a new structure and stored that in user_data. For the model's _get_iter(), _iter_children(), _iter_parent(), iter_nth_child() methods, if the output iter's user_data is NULL, a new one of these extra pointers structures gets allocated. At the moment, all of these allocations get also referenced in a GSList in the custom model, and freed when the model is finalized. While this does work ok, it feels strange. Any thoughts? Some light analysis shows the treeview doesn't use that many iters, so maybe this is fine? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Gtk button strangeness
I'm having trouble with GtkButtons. They should (and usually do) size themselves to be 27 pixels high with my currently selected GNOME theme. All of them are created using gtk_button_new_with_label. The problem is that one particular button sizes itself to 42 pixels high instead of 27. I assume that the embedded text box is trying to wrap to two lines. I don't want that. I tried the obvious, and it didn't work: GtkWidget* label_widget = gtk_bin_get_child (GTK_BIN (gtk_button)); assert (label_widget); GtkLabel* gtk_label = GTK_LABEL (label_widget); assert (gtk_label); gtk_label_set_line_wrap (gtk_label, FALSE); The other bizarre thing is that it seems to have something to do with the init sequencing when showing the window. If I create buttons with the same labels in a minimal test application (a modified version of the GTK table packing tutorial) all three buttons are sized to be 27 pixels high, even the one which in my real application context is sizing itself to 42. Does anyone have any advice for how to resolve or even begin to debug this? I also have a only second question related to this problem. I'd previously asked for some information on themes, and got a partial answer: The Understanding Metacity Themes GNOME library documentation doesn't cover this aspect snip - irrelevant Not surprising,since metacity themes and gtk themes are unrelated. Where are Gtk themes documented? I'm referring to the user preferences that affect such things as button sizing, and how Gtk widgets actually retrieve and act on those preferences. Looking around http://library.gnome.org/devel/gtk/stable the only instance of the word Theme has to do with icon themes. Nothing at all (at least that I can find) pertaining to how widget sizing is affected by GNOME Appearance Preferences selection. Thanks, Brian ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Is there any way to match a key event against key binding rules for GtkTextView class without creating a GtkTextView object?
Can anybody give me some suggestions about this issue? On Fri, Jul 24, 2009 at 5:16 PM, Zhe Su james...@gmail.com wrote: Hi, GtkTextView widget can use key binding rules defined in gtkrc file. For example, when Emacs key theme is selected, ctrl-w will be mapped to cut-clipboard signal. Now, I'm developing a custom widget and want to handle those key bindings supported by GtkTextView. After reading the source code of gtkwidget, I found that gtk_bindings_activate_event() is used for matching activating key bindings for a specific object. However this function can only match and activate key bindings explicitly defined for a specific object type. So if I want to match and activate all key bindings supported by GtkTextView, a GtkTextView object must be used when calling this function. Now the question is: is it possible to retrieve the information of all key bindings defined for GtkTextView and apply them to my custom widget, so that gtk_bindings_activate_event() can work with my custom widget object as if it's a GtkTextView object? Regards James Su ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list