diff options
author | Stefano Karapetsas <[email protected]> | 2013-11-05 19:49:37 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-11-05 19:49:37 +0100 |
commit | a08c14ba6bf29d50d6fdda1e159b1be8ca8bdbdc (patch) | |
tree | 52bba39a25615a7b227c2367b8e731a808d4e8ca /plugins | |
parent | 76265841b74cad78a60e5f960d37beb8ba854e2e (diff) | |
download | pluma-a08c14ba6bf29d50d6fdda1e159b1be8ca8bdbdc.tar.bz2 pluma-a08c14ba6bf29d50d6fdda1e159b1be8ca8bdbdc.tar.xz |
taglist: Fix tags loading with GTK3
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/taglist/pluma-taglist-plugin-panel.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/taglist/pluma-taglist-plugin-panel.c b/plugins/taglist/pluma-taglist-plugin-panel.c index a8d8473c..26ea0d49 100755 --- a/plugins/taglist/pluma-taglist-plugin-panel.c +++ b/plugins/taglist/pluma-taglist-plugin-panel.c @@ -592,8 +592,13 @@ tags_list_query_tooltip_cb (GtkWidget *widget, } static gboolean +#if GTK_CHECK_VERSION (3, 0, 0) +draw_event_cb (GtkWidget *panel, + cairo_t *cr, +#else expose_event_cb (GtkWidget *panel, GdkEventExpose *event, +#endif gpointer user_data) { PlumaTaglistPluginPanel *ppanel = PLUMA_TAGLIST_PLUGIN_PANEL (panel); @@ -607,8 +612,13 @@ expose_event_cb (GtkWidget *panel, /* And populate combo box */ populate_tag_groups_combo (PLUMA_TAGLIST_PLUGIN_PANEL (panel)); +#if GTK_CHECK_VERSION (3, 0, 0) + /* We need to manage only the first draw -> disconnect */ + g_signal_handlers_disconnect_by_func (panel, draw_event_cb, NULL); +#else /* We need to manage only the first expose event -> disconnect */ g_signal_handlers_disconnect_by_func (panel, expose_event_cb, NULL); +#endif return FALSE; } @@ -775,8 +785,13 @@ pluma_taglist_plugin_panel_init (PlumaTaglistPluginPanel *panel) G_CALLBACK (selected_group_changed), panel); g_signal_connect (panel, +#if GTK_CHECK_VERSION (3, 0, 0) + "draw", + G_CALLBACK (draw_event_cb), +#else "expose-event", G_CALLBACK (expose_event_cb), +#endif NULL); } |