Revision: 5820 http://geany.svn.sourceforge.net/geany/?rev=5820&view=rev Author: colombanw Date: 2011-05-27 21:00:41 +0000 (Fri, 27 May 2011)
Log Message: ----------- Fix preferences help button when activated with the keyboard
Don't hack around to trigger the help when the help button is clicked on, simply handle the HELP dialog response. This makes the button correctly show help rather than close the dialog when activated using the keyboard.
This also drops _button_press_event() need and hack, making the button correctly respond visually to mouse clicks.
Modified Paths: -------------- trunk/ChangeLog trunk/src/prefs.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-05-27 16:11:05 UTC (rev 5819) +++ trunk/ChangeLog 2011-05-27 21:00:41 UTC (rev 5820) @@ -1,3 +1,9 @@ +2011-05-27 Colomban Wendling <colomban(at)geany(dot)org> + + * src/prefs.c: + Fix preferences help button when activated with the keyboard. + + 2011-05-22 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/about.c, src/build.c, tagmanager/tm_workspace.c:
Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2011-05-27 16:11:05 UTC (rev 5819) +++ trunk/src/prefs.c 2011-05-27 21:00:41 UTC (rev 5820) @@ -93,6 +93,7 @@ static void on_sidebar_visible_toggled(GtkToggleButton *togglebutton, gpointer user_data); static void on_prefs_print_radio_button_toggled(GtkToggleButton *togglebutton, gpointer user_data); static void on_prefs_print_page_header_toggled(GtkToggleButton *togglebutton, gpointer user_data); +static void open_preferences_help(void);
typedef enum PrefCallbackAction @@ -1224,8 +1225,12 @@ configuration_save(); }
- if (response != GTK_RESPONSE_APPLY) + if (response == GTK_RESPONSE_HELP) { + open_preferences_help(); + } + else if (response != GTK_RESPONSE_APPLY) + { gtk_tree_store_clear(store); gtk_widget_hide(GTK_WIDGET(dialog)); } @@ -1592,18 +1597,6 @@ }
-static gboolean prefs_dialog_button_press_event_cb(GtkWidget *dialog, GdkEventButton *event, - gpointer data) -{ - if (event->button == 1) - { - open_preferences_help(); - return TRUE; - } - return FALSE; -} - - void prefs_show_dialog(void) { if (ui_widgets.prefs_dialog == NULL) @@ -1767,8 +1760,6 @@ g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "check_sidebar_visible"), "toggled", G_CALLBACK(on_sidebar_visible_toggled), NULL);
- g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button_help"), - "button-press-event", G_CALLBACK(prefs_dialog_button_press_event_cb), NULL); g_signal_connect(ui_widgets.prefs_dialog, "key-press-event", G_CALLBACK(prefs_dialog_key_press_response_cb), NULL); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.