summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-03-22 23:41:03 +0000
committerjstebbins <[email protected]>2011-03-22 23:41:03 +0000
commit2ffb7ec124daa744abd4d7524b49158f6eb0ab09 (patch)
treeba3f65267c369c47854ba261008f656e31b7fe4f
parent1c2d3f19a565733b756fb21bf53dea49a4b4e7ca (diff)
LinGui: don't use private gtk_marshal_* functions
They are not exported in gtk+-3, so create our own marshalers git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3872 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/src/ghbcellrenderertext.c7
-rw-r--r--gtk/src/ghbcompositor.c6
-rw-r--r--gtk/src/marshalers.c8
-rw-r--r--gtk/src/marshalers.h7
-rw-r--r--gtk/src/marshalers.list1
-rw-r--r--gtk/src/renderer_button.c16
6 files changed, 22 insertions, 23 deletions
diff --git a/gtk/src/ghbcellrenderertext.c b/gtk/src/ghbcellrenderertext.c
index 6f6329057..3876fb31c 100644
--- a/gtk/src/ghbcellrenderertext.c
+++ b/gtk/src/ghbcellrenderertext.c
@@ -21,13 +21,6 @@
#include <stdlib.h>
#include "ghbcompat.h"
#include <glib/gi18n-lib.h>
-#include <gtk/gtkmarshal.h>
-//#include <gtk/gtkeditable.h>
-//#include <gtk/gtkentry.h>
-//#include <gtk/gtkintl.h>
-//#include <gtk/gtkprivate.h>
-//#include <gtk/gtktreeprivate.h>
-//#include <gtk/gtkalias.h>
#include "marshalers.h"
#include "ghbcellrenderertext.h"
diff --git a/gtk/src/ghbcompositor.c b/gtk/src/ghbcompositor.c
index c67181ebf..4839fa786 100644
--- a/gtk/src/ghbcompositor.c
+++ b/gtk/src/ghbcompositor.c
@@ -28,8 +28,6 @@
#include <config.h>
#include <stdlib.h>
#include "ghbcompat.h"
-#include <gtk/gtkprivate.h>
-#include <gtk/gtkmarshal.h>
#include "ghbcompositor.h"
enum {
@@ -116,7 +114,7 @@ ghb_compositor_class_init (GhbCompositorClass *class)
"Position in Z-List",
"Sets the blending order of the child.",
0, 65535, 0,
- GTK_PARAM_READWRITE));
+ G_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_OPACITY,
@@ -124,7 +122,7 @@ ghb_compositor_class_init (GhbCompositorClass *class)
"Opacity",
"Sets the opacity of the child.",
0.0, 1.0, 1.0,
- GTK_PARAM_READWRITE));
+ G_PARAM_READWRITE));
}
diff --git a/gtk/src/marshalers.c b/gtk/src/marshalers.c
index a87615269..832c98cfc 100644
--- a/gtk/src/marshalers.c
+++ b/gtk/src/marshalers.c
@@ -21,6 +21,7 @@
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
#define g_marshal_value_peek_object(v) g_value_get_object (v)
+#define g_marshal_value_peek_variant(v) g_value_get_variant (v)
#else /* !G_ENABLE_DEBUG */
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
* Do not access GValues directly in your code. Instead, use the
@@ -44,10 +45,13 @@
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
#endif /* !G_ENABLE_DEBUG */
-/* VOID:STRING,STRING (/home/jstebbins/Source/HandBrake.update-checks/build.debug/../gtk/src/marshalers.list:1) */
+/* VOID:STRING (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:1) */
+
+/* VOID:STRING,STRING (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:2) */
void
ghb_marshal_VOID__STRING_STRING (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
@@ -84,7 +88,7 @@ ghb_marshal_VOID__STRING_STRING (GClosure *closure,
data2);
}
-/* BOOLEAN:BOXED (/home/jstebbins/Source/HandBrake.update-checks/build.debug/../gtk/src/marshalers.list:2) */
+/* BOOLEAN:BOXED (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:3) */
void
ghb_marshal_BOOLEAN__BOXED (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
diff --git a/gtk/src/marshalers.h b/gtk/src/marshalers.h
index a5ae52491..3c93a4957 100644
--- a/gtk/src/marshalers.h
+++ b/gtk/src/marshalers.h
@@ -6,7 +6,10 @@
G_BEGIN_DECLS
-/* VOID:STRING,STRING (/home/jstebbins/Source/HandBrake.batch/build.dbg/../gtk/src/marshalers.list:1) */
+/* VOID:STRING (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:1) */
+#define ghb_marshal_VOID__STRING g_cclosure_marshal_VOID__STRING
+
+/* VOID:STRING,STRING (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:2) */
extern void ghb_marshal_VOID__STRING_STRING (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -14,7 +17,7 @@ extern void ghb_marshal_VOID__STRING_STRING (GClosure *closure,
gpointer invocation_hint,
gpointer marshal_data);
-/* BOOLEAN:BOXED (/home/jstebbins/Source/HandBrake.batch/build.dbg/../gtk/src/marshalers.list:2) */
+/* BOOLEAN:BOXED (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:3) */
extern void ghb_marshal_BOOLEAN__BOXED (GClosure *closure,
GValue *return_value,
guint n_param_values,
diff --git a/gtk/src/marshalers.list b/gtk/src/marshalers.list
index 16d07b922..4eb7b555b 100644
--- a/gtk/src/marshalers.list
+++ b/gtk/src/marshalers.list
@@ -1,2 +1,3 @@
+VOID:STRING
VOID:STRING,STRING
BOOLEAN:BOXED
diff --git a/gtk/src/renderer_button.c b/gtk/src/renderer_button.c
index 5876e196b..c4df21ab3 100644
--- a/gtk/src/renderer_button.c
+++ b/gtk/src/renderer_button.c
@@ -1,4 +1,4 @@
-#include <gtk/gtkmarshal.h>
+#include "marshalers.h"
#include "renderer_button.h"
/* Some boring function declarations: GObject type system stuff */
@@ -15,13 +15,13 @@ static void custom_cell_renderer_button_set_property (GObject
static void custom_cell_renderer_button_finalize (GObject *gobject);
// My customized part that adds "clicked" signal
-static gint
+static gboolean
custom_cell_renderer_button_activate (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
GtkCellRendererState flags);
enum {
@@ -119,7 +119,7 @@ custom_cell_renderer_button_class_init (CustomCellRendererButtonClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (CustomCellRendererButtonClass, clicked),
NULL, NULL,
- gtk_marshal_VOID__STRING,
+ ghb_marshal_VOID__STRING,
G_TYPE_NONE, 1,
G_TYPE_STRING);
}
@@ -195,13 +195,13 @@ custom_cell_renderer_button_new (void)
return g_object_new(CUSTOM_TYPE_CELL_RENDERER_BUTTON, NULL);
}
-static gint
+static gboolean
custom_cell_renderer_button_activate (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
GtkCellRendererState flags)
{
CustomCellRendererButton *cellbutton;