summaryrefslogtreecommitdiff
path: root/capplet/matekbd-indicator-plugins-capplet.c
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-12-08 12:58:23 -0300
committerPerberos <[email protected]>2011-12-08 12:58:23 -0300
commit46a8d42095a30a1b62b7f24658f4886941b54800 (patch)
tree9862712c41c8187f74f6e1c7786eaf679a51571c /capplet/matekbd-indicator-plugins-capplet.c
parent731006ad7b3c6c47a52b8ef16e29e2d5ea9e1ea5 (diff)
downloadlibmatekbd-46a8d42095a30a1b62b7f24658f4886941b54800.tar.bz2
libmatekbd-46a8d42095a30a1b62b7f24658f4886941b54800.tar.xz
GDK_ key constants was renamed to GDK_KEY_ on GTK+-3.0
Diffstat (limited to 'capplet/matekbd-indicator-plugins-capplet.c')
-rw-r--r--capplet/matekbd-indicator-plugins-capplet.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/capplet/matekbd-indicator-plugins-capplet.c b/capplet/matekbd-indicator-plugins-capplet.c
index cea33f7..2714cd1 100644
--- a/capplet/matekbd-indicator-plugins-capplet.c
+++ b/capplet/matekbd-indicator-plugins-capplet.c
@@ -305,21 +305,28 @@ CappletSetup (MatekbdIndicatorPluginsCapplet * gipc)
gtk_builder_connect_signals (builder, NULL);
g_object_set_data (G_OBJECT (capplet), "uiData", builder);
- g_signal_connect_swapped (GTK_OBJECT (capplet),
- "destroy", G_CALLBACK (g_object_unref),
- builder);
- g_signal_connect_swapped (G_OBJECT (capplet), "unrealize",
- G_CALLBACK (g_main_loop_quit), loop);
- g_signal_connect (GTK_OBJECT (capplet),
- "response", G_CALLBACK (CappletResponse), NULL);
+ #if GTK_CHECK_VERSION(3, 0, 0)
+ g_signal_connect_swapped(G_OBJECT(capplet), "destroy", G_CALLBACK(g_object_unref), builder);
+ #else
+ g_signal_connect_swapped(GTK_OBJECT(capplet), "destroy", G_CALLBACK(g_object_unref), builder);
+ #endif
+
+ g_signal_connect_swapped (G_OBJECT (capplet), "unrealize", G_CALLBACK (g_main_loop_quit), loop);
+
+ #if GTK_CHECK_VERSION(3, 0, 0)
+ g_signal_connect(G_OBJECT(capplet), "response", G_CALLBACK(CappletResponse), NULL);
+ #else
+ g_signal_connect(GTK_OBJECT(capplet), "response", G_CALLBACK(CappletResponse), NULL);
+ #endif
+
button = GTK_WIDGET (gtk_builder_get_object (builder, "btnUp"));
g_signal_connect (button, "clicked",
G_CALLBACK
(CappletPromotePlugin), gipc);
button = GTK_WIDGET (gtk_builder_get_object (builder, "btnDown"));
- g_signal_connect (button,
+ g_signal_connect (button,
"clicked",
G_CALLBACK
(CappletDemotePlugin), gipc);
@@ -376,7 +383,7 @@ main (int argc, char **argv)
}
mateconf_error = NULL;
/*MatekbdIndicatorInstallGlibLogAppender( ); */
- gipc.engine = xkl_engine_get_instance (GDK_DISPLAY ());
+ gipc.engine = xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()));
gipc.config_registry =
xkl_config_registry_get_instance (gipc.engine);