diff options
author | David Härdeman <david@hardeman.nu> | 2015-09-01 21:36:37 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2015-09-01 21:36:37 +0200 |
commit | 01bd9b2dbf980acdcb97d59e35ac01e01c837e99 (patch) | |
tree | dcd8d7ed88ce80614f73e2cfed84dadf0a133847 | |
parent | 08098b86c58fb3280191258eeb32c025d7c42feb (diff) |
Add basic support for connecting signals via GModule
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | rcm-client-main.c | 3 | ||||
-rw-r--r-- | rcm-client.ui | 1 |
3 files changed, 3 insertions, 3 deletions
@@ -22,7 +22,7 @@ RCM_LINK = $(CC) $(RCM_CFLAGS) $(RCM_LDFLAGS) RCM_OBJECTS = rcm-server-main.o rcm-server-keymap.o rcm-server-evdev.o rcm-server-kdb.o shared.o RCM_HEADERS = rcm-server-main.h rcm-server-keymap.h rcm-server-evdev.h rcm-server-kdb.h utils.h $(COMMON_HEADERS) -RCC_PACKAGES = gtk+-3.0 +RCC_PACKAGES = gtk+-3.0 gmodule-2.0 RCC_CFLAGS = ${GENERIC_CFLAGS} ${EXTRA_CFLAGS} $(shell pkg-config --cflags ${RCC_PACKAGES}) RCC_LDFLAGS = ${GENERIC_LDFLAGS} ${EXTRA_LDFLAGS} $(shell pkg-config --libs ${RCC_PACKAGES}) RCC_COMPILE = $(CC) $(RCC_CFLAGS) diff --git a/rcm-client-main.c b/rcm-client-main.c index f0e267c..295bef3 100644 --- a/rcm-client-main.c +++ b/rcm-client-main.c @@ -231,10 +231,9 @@ int main(int argc, char *argv[]) g_object_unref(css); global->builder = gtk_builder_new_from_resource("/org/gnome/RemoteControlManager/rcm-client.ui"); + gtk_builder_connect_signals(global->builder, NULL); global->window = GTK_WINDOW(gtk_builder_get_object(global->builder, "main_window")); - g_signal_connect(global->window, "destroy", G_CALLBACK(gtk_main_quit), NULL); - global->stack = GTK_STACK(gtk_builder_get_object(global->builder, "main_stack")); gtk_widget_show_all(GTK_WIDGET(global->window)); diff --git a/rcm-client.ui b/rcm-client.ui index 2880b1a..5550a29 100644 --- a/rcm-client.ui +++ b/rcm-client.ui @@ -905,6 +905,7 @@ Show raw events received from the kernel</property> <property name="default_width">600</property> <property name="default_height">400</property> <property name="icon_name">gnome-multimedia</property> + <signal name="destroy" handler="gtk_main_quit" swapped="no"/> <child> <object class="GtkStack" id="main_stack"> <property name="visible">True</property> |