Branch: refs/heads/master Author: Matthew Brush matt@geany.org Committer: Matthew Brush matt@geany.org Date: Tue, 31 Jan 2012 05:32:16 Commit: 9ff4eec8538549078d2011bd6be31d7c6f9b0194 https://github.com/geany/geany/commit/9ff4eec8538549078d2011bd6be31d7c6f9b01...
Log Message: ----------- Fix Color Schemes menu items activation when used with libdbusmenu.
I'm not even going to try to explain why this fixes it :)
Modified Paths: -------------- src/highlighting.c src/main.c
Modified: src/highlighting.c 9 files changed, 3 insertions(+), 6 deletions(-) =================================================================== @@ -1172,10 +1172,6 @@ void highlighting_set_styles(ScintillaObject *sci, GeanyFiletype *ft) gchar *fname; gchar *path;
- /* prevent callback on setting initial value */ - if (!GTK_WIDGET_MAPPED(menuitem)) - return; - /* check if default item */ if (!user_data) { @@ -1255,14 +1251,15 @@ static void add_color_scheme_item(GtkWidget *menu, const gchar *fname) g_key_file_free(skeyfile); }
+ g_signal_connect(item, "activate", + G_CALLBACK(on_color_scheme_clicked), GINT_TO_POINTER(fname != NULL)); + group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item)); if (utils_str_equal(editor_prefs.color_scheme, fname)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), TRUE);
gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); - g_signal_connect(item, "activate", - G_CALLBACK(on_color_scheme_clicked), GINT_TO_POINTER(fname != NULL)); }
Modified: src/main.c 4 files changed, 3 insertions(+), 1 deletions(-) =================================================================== @@ -1037,7 +1037,6 @@ gint main(gint argc, gchar **argv) sidebar_init(); load_settings(); /* load keyfile */
- highlighting_init(); msgwin_init(); build_init(); ui_create_insert_menu_items(); @@ -1045,6 +1044,9 @@ gint main(gint argc, gchar **argv) keybindings_init(); notebook_init(); filetypes_init(); + /* depends on filetypes_array being not NULL so must be after + * filetypes_init(). */ + highlighting_init(); templates_init(); navqueue_init(); document_init_doclist();
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).