[gnome-shell] shell: Use generic marshaller



commit b40b19997ad69e44f347d88c820edb3922b8d289
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Oct 18 18:19:32 2011 -0400

    shell: Use generic marshaller
    
    https://bugzilla.gnome.org/show_bug.cgi?id=662152

 src/Makefile.am                         |   25 -------------------------
 src/shell-app-system.c                  |    6 ++----
 src/shell-app-usage.c                   |    1 -
 src/shell-app.c                         |    3 +--
 src/shell-doc-system.c                  |    6 ++----
 src/shell-generic-container.c           |    9 +++------
 src/shell-global.c                      |   13 ++++---------
 src/shell-marshal.list                  |    9 ---------
 src/shell-mount-operation.c             |    3 +--
 src/shell-network-agent.c               |    5 ++---
 src/shell-polkit-authentication-agent.c |    6 ++----
 src/shell-tray-manager.c                |    6 ++----
 src/shell-window-tracker.c              |    7 ++-----
 src/shell-wm.c                          |   25 ++++++++-----------------
 src/shell-xfixes-cursor.c               |    3 +--
 15 files changed, 30 insertions(+), 97 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 5932c2e..78ee4e5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -89,13 +89,10 @@ privlibdir = $(pkglibdir)
 privlib_LTLIBRARIES = libgnome-shell.la
 
 shell_built_sources = \
-	shell-marshal.h \
-	shell-marshal.c \
 	shell-enum-types.h \
 	shell-enum-types.c
 
 BUILT_SOURCES += $(shell_built_sources)
-EXTRA_DIST += shell-marshal.list
 
 shell_public_headers_h =		\
 	shell-app.h			\
@@ -230,28 +227,6 @@ run_js_test_SOURCES =			\
 
 ########################################
 
-shell-marshal.h: stamp-shell-marshal.h
-	@true
-stamp-shell-marshal.h: Makefile shell-marshal.list
-	$(AM_V_GEN) $(GLIB_GENMARSHAL) \
-		--prefix=_shell_marshal \
-		--header \
-	$(srcdir)/shell-marshal.list > xgen-smh && \
-	(cmp -s xgen-smh shell-marshal.h || cp -f xgen-smh shell-marshal.h) && \
-	rm -f xgen-smh && \
-	echo timestamp > $(@F)
-CLEANFILES += stamp-shell-marshal.h
-
-shell-marshal.c: Makefile shell-marshal.list
-	$(AM_V_GEN) (echo "#include \"shell-marshal.h\"" ; \
-	 $(GLIB_GENMARSHAL) \
-		--prefix=_shell_marshal \
-		--body \
-	 $(srcdir)/shell-marshal.list ) > xgen-smc && \
-	cp -f xgen-smc shell-marshal.c && \
-	rm -f xgen-smc
-
-
 shell-enum-types.h: stamp-shell-enum-types.h Makefile
 	@true
 stamp-shell-enum-types.h: $(srcdir)/shell-enum-types.h.in $(shell_public_headers_h)
diff --git a/src/shell-app-system.c b/src/shell-app-system.c
index f497d17..f6c8c01 100644
--- a/src/shell-app-system.c
+++ b/src/shell-app-system.c
@@ -70,8 +70,7 @@ static void shell_app_system_class_init(ShellAppSystemClass *klass)
                                              SHELL_TYPE_APP_SYSTEM,
                                              G_SIGNAL_RUN_LAST,
                                              0,
-                                             NULL, NULL,
-                                             g_cclosure_marshal_VOID__OBJECT,
+                                             NULL, NULL, NULL,
                                              G_TYPE_NONE, 1,
                                              SHELL_TYPE_APP);
   signals[INSTALLED_CHANGED] =
@@ -79,8 +78,7 @@ static void shell_app_system_class_init(ShellAppSystemClass *klass)
 		  SHELL_TYPE_APP_SYSTEM,
 		  G_SIGNAL_RUN_LAST,
 		  G_STRUCT_OFFSET (ShellAppSystemClass, installed_changed),
-		  NULL, NULL,
-		  g_cclosure_marshal_VOID__VOID,
+          NULL, NULL, NULL,
 		  G_TYPE_NONE, 0);
 
   g_type_class_add_private (gobject_class, sizeof (ShellAppSystemPrivate));
diff --git a/src/shell-app-usage.c b/src/shell-app-usage.c
index bbc4fac..0899565 100644
--- a/src/shell-app-usage.c
+++ b/src/shell-app-usage.c
@@ -18,7 +18,6 @@
 #include "shell-app-usage.h"
 #include "shell-window-tracker.h"
 #include "shell-global.h"
-#include "shell-marshal.h"
 
 /* This file includes modified code from
  * desktop-data-engine/engine-dbus/hippo-application-monitor.c
diff --git a/src/shell-app.c b/src/shell-app.c
index ec9529d..31d1385 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -1520,8 +1520,7 @@ shell_app_class_init(ShellAppClass *klass)
                                      SHELL_TYPE_APP,
                                      G_SIGNAL_RUN_LAST,
                                      0,
-                                     NULL, NULL,
-                                     g_cclosure_marshal_VOID__VOID,
+                                     NULL, NULL, NULL,
                                      G_TYPE_NONE, 0);
 
   /**
diff --git a/src/shell-doc-system.c b/src/shell-doc-system.c
index 6572c56..adb2dd1 100644
--- a/src/shell-doc-system.c
+++ b/src/shell-doc-system.c
@@ -320,8 +320,7 @@ shell_doc_system_class_init(ShellDocSystemClass *klass)
 		  SHELL_TYPE_DOC_SYSTEM,
 		  G_SIGNAL_RUN_LAST,
 		  0,
-		  NULL, NULL,
-		  g_cclosure_marshal_VOID__VOID,
+          NULL, NULL, NULL,
 		  G_TYPE_NONE, 0);
 
   signals[DELETED] =
@@ -329,8 +328,7 @@ shell_doc_system_class_init(ShellDocSystemClass *klass)
 		  SHELL_TYPE_DOC_SYSTEM,
 		  G_SIGNAL_RUN_LAST,
 		  0,
-		  NULL, NULL,
-		  g_cclosure_marshal_VOID__BOXED,
+          NULL, NULL, NULL,
 		  G_TYPE_NONE, 1, GTK_TYPE_RECENT_INFO);
 
   g_type_class_add_private (gobject_class, sizeof (ShellDocSystemPrivate));
diff --git a/src/shell-generic-container.c b/src/shell-generic-container.c
index 4f89981..a3fc1b6 100644
--- a/src/shell-generic-container.c
+++ b/src/shell-generic-container.c
@@ -285,8 +285,7 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   0,
-                  NULL, NULL,
-                  gi_cclosure_marshal_generic,
+                  NULL, NULL, NULL,
                   G_TYPE_NONE, 2, G_TYPE_FLOAT, SHELL_TYPE_GENERIC_CONTAINER_ALLOCATION);
 
   /**
@@ -310,8 +309,7 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   0,
-                  NULL, NULL,
-                  gi_cclosure_marshal_generic,
+                  NULL, NULL, NULL,
                   G_TYPE_NONE, 2, G_TYPE_FLOAT, SHELL_TYPE_GENERIC_CONTAINER_ALLOCATION);
 
   /**
@@ -331,8 +329,7 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   0,
-                  NULL, NULL,
-                  gi_cclosure_marshal_generic,
+                  NULL, NULL, NULL,
                   G_TYPE_NONE, 2, CLUTTER_TYPE_ACTOR_BOX, CLUTTER_TYPE_ALLOCATION_FLAGS);
 
   g_type_class_add_private (gobject_class, sizeof (ShellGenericContainerPrivate));
diff --git a/src/shell-global.c b/src/shell-global.c
index 13fb314..c8f8014 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -34,7 +34,6 @@
 #include "shell-enum-types.h"
 #include "shell-global-private.h"
 #include "shell-jsapi-compat-private.h"
-#include "shell-marshal.h"
 #include "shell-perf-log.h"
 #include "shell-window-tracker.h"
 #include "shell-wm.h"
@@ -311,8 +310,7 @@ shell_global_class_init (ShellGlobalClass *klass)
                     G_TYPE_FROM_CLASS (klass),
                     G_SIGNAL_RUN_LAST,
                     0,
-                    NULL, NULL,
-                    _shell_marshal_VOID__INT_INT,
+                    NULL, NULL, NULL,
                     G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
 
   /* Emitted from gnome-shell-plugin.c during event handling */
@@ -321,8 +319,7 @@ shell_global_class_init (ShellGlobalClass *klass)
                     G_TYPE_FROM_CLASS (klass),
                     G_SIGNAL_RUN_LAST,
                     0,
-                    NULL, NULL,
-                    g_cclosure_marshal_VOID__VOID,
+                    NULL, NULL, NULL,
                     G_TYPE_NONE, 0);
 
   /* Emitted from gnome-shell-plugin.c during event handling */
@@ -331,8 +328,7 @@ shell_global_class_init (ShellGlobalClass *klass)
                     G_TYPE_FROM_CLASS (klass),
                     G_SIGNAL_RUN_LAST,
                     0,
-                    NULL, NULL,
-                    g_cclosure_marshal_VOID__VOID,
+                    NULL, NULL, NULL,
                     G_TYPE_NONE, 0);
 
   shell_global_signals[NOTIFY_ERROR] =
@@ -340,8 +336,7 @@ shell_global_class_init (ShellGlobalClass *klass)
                     G_TYPE_FROM_CLASS (klass),
                     G_SIGNAL_RUN_LAST,
                     0,
-                    NULL, NULL,
-                    gi_cclosure_marshal_generic,
+                    NULL, NULL, NULL,
                     G_TYPE_NONE, 2,
                     G_TYPE_STRING,
                     G_TYPE_STRING);
diff --git a/src/shell-mount-operation.c b/src/shell-mount-operation.c
index f3759e1..6634c69 100644
--- a/src/shell-mount-operation.c
+++ b/src/shell-mount-operation.c
@@ -135,8 +135,7 @@ shell_mount_operation_class_init (ShellMountOperationClass *klass)
     g_signal_new ("show-processes-2",
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
-                  0, NULL, NULL,
-                  g_cclosure_marshal_VOID__VOID,
+                  0, NULL, NULL, NULL,
                   G_TYPE_NONE, 0);
 
   g_type_class_add_private (klass, sizeof (ShellMountOperationPrivate));
diff --git a/src/shell-network-agent.c b/src/shell-network-agent.c
index 86ea103..0e547aa 100644
--- a/src/shell-network-agent.c
+++ b/src/shell-network-agent.c
@@ -24,7 +24,6 @@
 #include <gnome-keyring.h>
 
 #include "shell-network-agent.h"
-#include "shell-marshal.h"
 
 enum {
   SIGNAL_NEW_REQUEST,
@@ -775,7 +774,7 @@ shell_network_agent_class_init (ShellNetworkAgentClass *klass)
 					      0, /* class offset */
 					      NULL, /* accumulator */
 					      NULL, /* accu_data */
-					      _shell_marshal_VOID__STRING_OBJECT_STRING_BOXED,
+                                              NULL, /* marshaller */
 					      G_TYPE_NONE, /* return */
 					      3, /* n_params */
 					      G_TYPE_STRING,
@@ -789,7 +788,7 @@ shell_network_agent_class_init (ShellNetworkAgentClass *klass)
                                                  0, /* class offset */
                                                  NULL, /* accumulator */
                                                  NULL, /* accu_data */
-                                                 g_cclosure_marshal_VOID__STRING,
+                                                 NULL, /* marshaller */
                                                  G_TYPE_NONE,
                                                  1, /* n_params */
                                                  G_TYPE_STRING);
diff --git a/src/shell-polkit-authentication-agent.c b/src/shell-polkit-authentication-agent.c
index ad59486..ede4fd9 100644
--- a/src/shell-polkit-authentication-agent.c
+++ b/src/shell-polkit-authentication-agent.c
@@ -10,8 +10,6 @@
 
 #include <pwd.h>
 
-#include "shell-marshal.h"
-
 #define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE
 #include <polkitagent/polkitagent.h>
 #include "shell-polkit-authentication-agent.h"
@@ -173,7 +171,7 @@ shell_polkit_authentication_agent_class_init (ShellPolkitAuthenticationAgentClas
                   0,    /* class_offset */
                   NULL, /* accumulator */
                   NULL, /* accumulator data */
-                  _shell_marshal_VOID__STRING_STRING_STRING_STRING_BOXED,
+                  NULL, /* marshaller */
                   G_TYPE_NONE,
                   5,
                   G_TYPE_STRING,
@@ -189,7 +187,7 @@ shell_polkit_authentication_agent_class_init (ShellPolkitAuthenticationAgentClas
                   0,    /* class_offset */
                   NULL, /* accumulator */
                   NULL, /* accumulator data */
-                  g_cclosure_marshal_VOID__VOID,
+                  NULL, /* marshaller */
                   G_TYPE_NONE,
                   0);
 }
diff --git a/src/shell-tray-manager.c b/src/shell-tray-manager.c
index 2efbc4f..d5674c9 100644
--- a/src/shell-tray-manager.c
+++ b/src/shell-tray-manager.c
@@ -157,8 +157,7 @@ shell_tray_manager_class_init (ShellTrayManagerClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (ShellTrayManagerClass, tray_icon_added),
-                  NULL, NULL,
-                  g_cclosure_marshal_VOID__OBJECT,
+                  NULL, NULL, NULL,
                   G_TYPE_NONE, 1,
                   CLUTTER_TYPE_ACTOR);
   shell_tray_manager_signals[TRAY_ICON_REMOVED] =
@@ -166,8 +165,7 @@ shell_tray_manager_class_init (ShellTrayManagerClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (ShellTrayManagerClass, tray_icon_removed),
-                  NULL, NULL,
-                  g_cclosure_marshal_VOID__OBJECT,
+                  NULL, NULL, NULL,
                   G_TYPE_NONE, 1,
                   CLUTTER_TYPE_ACTOR);
 
diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c
index ecd3219..a914fc6 100644
--- a/src/shell-window-tracker.c
+++ b/src/shell-window-tracker.c
@@ -20,7 +20,6 @@
 #include "shell-window-tracker-private.h"
 #include "shell-app-private.h"
 #include "shell-global.h"
-#include "shell-marshal.h"
 #include "st.h"
 
 /* This file includes modified code from
@@ -117,15 +116,13 @@ shell_window_tracker_class_init (ShellWindowTrackerClass *klass)
                                    SHELL_TYPE_WINDOW_TRACKER,
                                    G_SIGNAL_RUN_LAST,
                                    0,
-                                   NULL, NULL,
-                                   g_cclosure_marshal_VOID__BOXED,
+                                   NULL, NULL, NULL,
                                    G_TYPE_NONE, 1, SHELL_TYPE_STARTUP_SEQUENCE);
   signals[TRACKED_WINDOWS_CHANGED] = g_signal_new ("tracked-windows-changed",
                                                    SHELL_TYPE_WINDOW_TRACKER,
                                                    G_SIGNAL_RUN_LAST,
                                                    0,
-                                                   NULL, NULL,
-                                                   g_cclosure_marshal_VOID__VOID,
+                                                   NULL, NULL, NULL,
                                                    G_TYPE_NONE, 0);
 }
 
diff --git a/src/shell-wm.c b/src/shell-wm.c
index bfa9728..0257649 100644
--- a/src/shell-wm.c
+++ b/src/shell-wm.c
@@ -8,7 +8,6 @@
 
 #include "shell-wm-private.h"
 #include "shell-global.h"
-#include "shell-marshal.h"
 
 struct _ShellWM {
   GObject parent;
@@ -58,8 +57,7 @@ shell_wm_class_init (ShellWMClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   0,
-                  NULL, NULL,
-                  g_cclosure_marshal_VOID__OBJECT,
+                  NULL, NULL, NULL,
                   G_TYPE_NONE, 1,
                   META_TYPE_WINDOW_ACTOR);
   shell_wm_signals[MAXIMIZE] =
@@ -67,8 +65,7 @@ shell_wm_class_init (ShellWMClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   0,
-                  NULL, NULL,
-                  _shell_marshal_VOID__OBJECT_INT_INT_INT_INT,
+                  NULL, NULL, NULL,
                   G_TYPE_NONE, 5,
                   META_TYPE_WINDOW_ACTOR, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
   shell_wm_signals[UNMAXIMIZE] =
@@ -76,8 +73,7 @@ shell_wm_class_init (ShellWMClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   0,
-                  NULL, NULL,
-                  _shell_marshal_VOID__OBJECT_INT_INT_INT_INT,
+                  NULL, NULL, NULL,
                   G_TYPE_NONE, 1,
                   META_TYPE_WINDOW_ACTOR, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
   shell_wm_signals[MAP] =
@@ -85,8 +81,7 @@ shell_wm_class_init (ShellWMClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   0,
-                  NULL, NULL,
-                  g_cclosure_marshal_VOID__OBJECT,
+                  NULL, NULL, NULL,
                   G_TYPE_NONE, 1,
                   META_TYPE_WINDOW_ACTOR);
   shell_wm_signals[DESTROY] =
@@ -94,8 +89,7 @@ shell_wm_class_init (ShellWMClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   0,
-                  NULL, NULL,
-                  g_cclosure_marshal_VOID__OBJECT,
+                  NULL, NULL, NULL,
                   G_TYPE_NONE, 1,
                   META_TYPE_WINDOW_ACTOR);
   shell_wm_signals[SWITCH_WORKSPACE] =
@@ -103,8 +97,7 @@ shell_wm_class_init (ShellWMClass *klass)
 		  G_TYPE_FROM_CLASS (klass),
 		  G_SIGNAL_RUN_LAST,
 		  0,
-		  NULL, NULL,
-		  _shell_marshal_VOID__INT_INT_INT,
+          NULL, NULL, NULL,
 		  G_TYPE_NONE, 3,
                   G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
   shell_wm_signals[KILL_SWITCH_WORKSPACE] =
@@ -112,16 +105,14 @@ shell_wm_class_init (ShellWMClass *klass)
 		  G_TYPE_FROM_CLASS (klass),
 		  G_SIGNAL_RUN_LAST,
 		  0,
-		  NULL, NULL,
-		  g_cclosure_marshal_VOID__VOID,
+          NULL, NULL, NULL,
 		  G_TYPE_NONE, 0);
   shell_wm_signals[KILL_WINDOW_EFFECTS] =
     g_signal_new ("kill-window-effects",
 		  G_TYPE_FROM_CLASS (klass),
 		  G_SIGNAL_RUN_LAST,
 		  0,
-		  NULL, NULL,
-		  g_cclosure_marshal_VOID__OBJECT,
+          NULL, NULL, NULL,
 		  G_TYPE_NONE, 1,
 		  META_TYPE_WINDOW_ACTOR);
 }
diff --git a/src/shell-xfixes-cursor.c b/src/shell-xfixes-cursor.c
index 4f1a363..828925f 100644
--- a/src/shell-xfixes-cursor.c
+++ b/src/shell-xfixes-cursor.c
@@ -304,8 +304,7 @@ shell_xfixes_cursor_class_init (ShellXFixesCursorClass *klass)
                                        G_TYPE_FROM_CLASS (klass),
                                        G_SIGNAL_RUN_LAST,
                                        0,
-                                       NULL, NULL,
-                                       g_cclosure_marshal_VOID__VOID,
+                                       NULL, NULL, NULL,
                                        G_TYPE_NONE, 0);
 
   gobject_class->get_property = shell_xfixes_cursor_get_property;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]