[ekiga] Fixed bug #545741



commit 242398eeee12c63f39bff5290918cc45b47903e4
Author: Julien Puydt <jpuydt gnome org>
Date:   Thu Aug 20 13:10:22 2009 +0200

    Fixed bug #545741

 lib/engine/gui/gtk-frontend/Makefile.am         |    1 +
 lib/engine/gui/gtk-frontend/roster-view-gtk.cpp |   51 +----------------------
 lib/gmmarshallers.c                             |   47 +++++++++++++++++++--
 lib/gmmarshallers.h                             |   18 ++++++--
 lib/gmmarshallers.list                          |    1 +
 5 files changed, 58 insertions(+), 60 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/Makefile.am b/lib/engine/gui/gtk-frontend/Makefile.am
index d642186..8dcf47f 100644
--- a/lib/engine/gui/gtk-frontend/Makefile.am
+++ b/lib/engine/gui/gtk-frontend/Makefile.am
@@ -40,6 +40,7 @@ libgmgtk_frontend_la_SOURCES = \
 	$(gtk_frontend_dir)/gtk-frontend.cpp
 
 libgmgtk_frontend_la_LIBADD = \
+	$(top_builddir)/lib/libekiga.la \
 	$(top_builddir)/lib/gui/libgmwidgets.la 			\
 	$(top_builddir)/lib/engine/chat/libgmchat.la 		\
 	$(top_builddir)/lib/engine/presence/libgmpresence.la 	\
diff --git a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
index d38da45..2057eac 100644
--- a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
@@ -40,6 +40,7 @@
 #include <vector>
 #include <glib/gi18n.h>
 
+#include "gmmarshallers.h"
 #include "gm-cell-renderer-bitext.h"
 #include "gmcellrendererexpander.h"
 #include "gmstockicons.h"
@@ -50,17 +51,6 @@
 #include "form-dialog-gtk.h"
 
 
-/* FIXME: this is stupid : I can't seem to be able to use the marshallers
- * defined in lib/ from here!
- */
-static void gm_marshal_VOID__POINTER_STRING (GClosure     *closure,
-                                             GValue       *return_value,
-                                             guint         n_param_values,
-                                             const GValue *param_values,
-                                             gpointer      invocation_hint,
-                                             gpointer      marshal_data);
-
-
 /*
  * The Roster
  */
@@ -1544,42 +1534,3 @@ roster_view_gtk_new (Ekiga::PresenceCore &core)
 
   return (GtkWidget *) self;
 }
-
-
-
-/* FIXME: stupid, stupid! */
-static void
-gm_marshal_VOID__POINTER_STRING (GClosure     *closure,
-                                 GValue       *return_value G_GNUC_UNUSED,
-                                 guint         n_param_values,
-                                 const GValue *param_values,
-                                 gpointer      invocation_hint G_GNUC_UNUSED,
-                                 gpointer      marshal_data)
-{
-  typedef void (*GMarshalFunc_VOID__POINTER_STRING) (gpointer     data1,
-                                                     gpointer     arg_1,
-                                                     gpointer     arg_2,
-                                                     gpointer     data2);
-  GMarshalFunc_VOID__POINTER_STRING callback;
-  GCClosure *cc = (GCClosure*) closure;
-  gpointer data1, data2;
-
-  g_return_if_fail (n_param_values == 3);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_VOID__POINTER_STRING) (marshal_data ? marshal_data : cc->callback);
-
-  callback (data1,
-            (param_values + 1)->data[0].v_pointer,
-            (gchar*)(param_values + 2)->data[0].v_pointer,
-            data2);
-}
diff --git a/lib/gmmarshallers.c b/lib/gmmarshallers.c
index 6f19aa7..04299ed 100644
--- a/lib/gmmarshallers.c
+++ b/lib/gmmarshallers.c
@@ -47,7 +47,44 @@
 #endif /* !G_ENABLE_DEBUG */
 
 
-/* VOID:STRING,UINT (gmmarshallers.list:1) */
+/* VOID:POINTER,STRING (gmmarshallers.list:1) */
+void
+gm_marshal_VOID__POINTER_STRING (GClosure     *closure,
+                                 GValue       *return_value G_GNUC_UNUSED,
+                                 guint         n_param_values,
+                                 const GValue *param_values,
+                                 gpointer      invocation_hint G_GNUC_UNUSED,
+                                 gpointer      marshal_data)
+{
+  typedef void (*GMarshalFunc_VOID__POINTER_STRING) (gpointer     data1,
+                                                     gpointer     arg_1,
+                                                     gpointer     arg_2,
+                                                     gpointer     data2);
+  register GMarshalFunc_VOID__POINTER_STRING callback;
+  register GCClosure *cc = (GCClosure*) closure;
+  register gpointer data1, data2;
+
+  g_return_if_fail (n_param_values == 3);
+
+  if (G_CCLOSURE_SWAP_DATA (closure))
+    {
+      data1 = closure->data;
+      data2 = g_value_peek_pointer (param_values + 0);
+    }
+  else
+    {
+      data1 = g_value_peek_pointer (param_values + 0);
+      data2 = closure->data;
+    }
+  callback = (GMarshalFunc_VOID__POINTER_STRING) (marshal_data ? marshal_data : cc->callback);
+
+  callback (data1,
+            g_marshal_value_peek_pointer (param_values + 1),
+            g_marshal_value_peek_string (param_values + 2),
+            data2);
+}
+
+/* VOID:STRING,UINT (gmmarshallers.list:2) */
 void
 gm_marshal_VOID__STRING_UINT (GClosure     *closure,
                               GValue       *return_value G_GNUC_UNUSED,
@@ -84,7 +121,7 @@ gm_marshal_VOID__STRING_UINT (GClosure     *closure,
             data2);
 }
 
-/* VOID:STRING,STRING (gmmarshallers.list:2) */
+/* VOID:STRING,STRING (gmmarshallers.list:3) */
 void
 gm_marshal_VOID__STRING_STRING (GClosure     *closure,
                                 GValue       *return_value G_GNUC_UNUSED,
@@ -121,7 +158,7 @@ gm_marshal_VOID__STRING_STRING (GClosure     *closure,
             data2);
 }
 
-/* VOID:STRING,BOOLEAN (gmmarshallers.list:3) */
+/* VOID:STRING,BOOLEAN (gmmarshallers.list:4) */
 void
 gm_marshal_VOID__STRING_BOOLEAN (GClosure     *closure,
                                  GValue       *return_value G_GNUC_UNUSED,
@@ -158,7 +195,7 @@ gm_marshal_VOID__STRING_BOOLEAN (GClosure     *closure,
             data2);
 }
 
-/* BOOLEAN:STRING (gmmarshallers.list:4) */
+/* BOOLEAN:STRING (gmmarshallers.list:5) */
 void
 gm_marshal_BOOLEAN__STRING (GClosure     *closure,
                             GValue       *return_value G_GNUC_UNUSED,
@@ -197,7 +234,7 @@ gm_marshal_BOOLEAN__STRING (GClosure     *closure,
   g_value_set_boolean (return_value, v_return);
 }
 
-/* BOOLEAN:STRING,STRING (gmmarshallers.list:5) */
+/* BOOLEAN:STRING,STRING (gmmarshallers.list:6) */
 void
 gm_marshal_BOOLEAN__STRING_STRING (GClosure     *closure,
                                    GValue       *return_value G_GNUC_UNUSED,
diff --git a/lib/gmmarshallers.h b/lib/gmmarshallers.h
index de9f62a..3e70760 100644
--- a/lib/gmmarshallers.h
+++ b/lib/gmmarshallers.h
@@ -6,7 +6,15 @@
 
 G_BEGIN_DECLS
 
-/* VOID:STRING,UINT (gmmarshallers.list:1) */
+/* VOID:POINTER,STRING (gmmarshallers.list:1) */
+extern void gm_marshal_VOID__POINTER_STRING (GClosure     *closure,
+                                             GValue       *return_value,
+                                             guint         n_param_values,
+                                             const GValue *param_values,
+                                             gpointer      invocation_hint,
+                                             gpointer      marshal_data);
+
+/* VOID:STRING,UINT (gmmarshallers.list:2) */
 extern void gm_marshal_VOID__STRING_UINT (GClosure     *closure,
                                           GValue       *return_value,
                                           guint         n_param_values,
@@ -14,7 +22,7 @@ extern void gm_marshal_VOID__STRING_UINT (GClosure     *closure,
                                           gpointer      invocation_hint,
                                           gpointer      marshal_data);
 
-/* VOID:STRING,STRING (gmmarshallers.list:2) */
+/* VOID:STRING,STRING (gmmarshallers.list:3) */
 extern void gm_marshal_VOID__STRING_STRING (GClosure     *closure,
                                             GValue       *return_value,
                                             guint         n_param_values,
@@ -22,7 +30,7 @@ extern void gm_marshal_VOID__STRING_STRING (GClosure     *closure,
                                             gpointer      invocation_hint,
                                             gpointer      marshal_data);
 
-/* VOID:STRING,BOOLEAN (gmmarshallers.list:3) */
+/* VOID:STRING,BOOLEAN (gmmarshallers.list:4) */
 extern void gm_marshal_VOID__STRING_BOOLEAN (GClosure     *closure,
                                              GValue       *return_value,
                                              guint         n_param_values,
@@ -30,7 +38,7 @@ extern void gm_marshal_VOID__STRING_BOOLEAN (GClosure     *closure,
                                              gpointer      invocation_hint,
                                              gpointer      marshal_data);
 
-/* BOOLEAN:STRING (gmmarshallers.list:4) */
+/* BOOLEAN:STRING (gmmarshallers.list:5) */
 extern void gm_marshal_BOOLEAN__STRING (GClosure     *closure,
                                         GValue       *return_value,
                                         guint         n_param_values,
@@ -38,7 +46,7 @@ extern void gm_marshal_BOOLEAN__STRING (GClosure     *closure,
                                         gpointer      invocation_hint,
                                         gpointer      marshal_data);
 
-/* BOOLEAN:STRING,STRING (gmmarshallers.list:5) */
+/* BOOLEAN:STRING,STRING (gmmarshallers.list:6) */
 extern void gm_marshal_BOOLEAN__STRING_STRING (GClosure     *closure,
                                                GValue       *return_value,
                                                guint         n_param_values,
diff --git a/lib/gmmarshallers.list b/lib/gmmarshallers.list
index dab208c..3cb3adf 100644
--- a/lib/gmmarshallers.list
+++ b/lib/gmmarshallers.list
@@ -1,3 +1,4 @@
+VOID:POINTER,STRING
 VOID:STRING,UINT
 VOID:STRING,STRING
 VOID:STRING,BOOLEAN



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