summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas James Alexander Thurman <tthurman@src.gnome.org>2009-03-12 01:26:24 +0000
committerThomas James Alexander Thurman <tthurman@src.gnome.org>2009-03-12 01:26:24 +0000
commit3f76affbd2f5c7b83ec4133a87408988f2ee8855 (patch)
treebb299a099eabac3cfeb3ba5c7f0fcaa9e0245e6c
parenta8f89706016486fa391c9d27450608e9e7d8e62d (diff)
downloadmetacity-3f76affbd2f5c7b83ec4133a87408988f2ee8855.tar.gz
metacity-3f76affbd2f5c7b83ec4133a87408988f2ee8855.tar.bz2
Remove deprecated GTK symbols. Refs #572332.
* src/include/util.h: * src/tools/metacity-window-demo.c: * src/ui/fixedtip.c: * src/ui/frames.c: * src/ui/frames.h: * src/ui/menu.c: * src/ui/metaaccellabel.c: * src/ui/metaaccellabel.h: * src/ui/preview-widget.c: * src/ui/preview-widget.h: * src/ui/tabpopup.c: * src/ui/theme-viewer.c: * src/ui/themewidget.c: * src/ui/themewidget.h: * test/tokentest/tokentest.c: svn path=/trunk/; revision=4193
-rw-r--r--ChangeLog20
-rw-r--r--src/include/util.h10
-rw-r--r--src/tools/metacity-window-demo.c3
-rw-r--r--src/ui/fixedtip.c2
-rw-r--r--src/ui/frames.c6
-rw-r--r--src/ui/frames.h10
-rw-r--r--src/ui/menu.c2
-rw-r--r--src/ui/metaaccellabel.c4
-rw-r--r--src/ui/metaaccellabel.h12
-rw-r--r--src/ui/preview-widget.c4
-rw-r--r--src/ui/preview-widget.h12
-rw-r--r--src/ui/tabpopup.c10
-rw-r--r--src/ui/theme-viewer.c3
-rw-r--r--src/ui/themewidget.c4
-rw-r--r--src/ui/themewidget.h12
-rw-r--r--test/tokentest/tokentest.c2
16 files changed, 69 insertions, 47 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e8474c..cc35258 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2009-03-11 Thomas Andersen <phomes@gmail.com>
+
+ Remove deprecated GTK symbols. Refs #572332.
+
+ * src/include/util.h:
+ * src/tools/metacity-window-demo.c:
+ * src/ui/fixedtip.c:
+ * src/ui/frames.c:
+ * src/ui/frames.h:
+ * src/ui/menu.c:
+ * src/ui/metaaccellabel.c:
+ * src/ui/metaaccellabel.h:
+ * src/ui/preview-widget.c:
+ * src/ui/preview-widget.h:
+ * src/ui/tabpopup.c:
+ * src/ui/theme-viewer.c:
+ * src/ui/themewidget.c:
+ * src/ui/themewidget.h:
+ * test/tokentest/tokentest.c:
+
2009-03-11 Matt Kraai <kraai@ftfbs.org>
* src/tools/metacity-mag.c: use g_signal_handlers_disconnect_by_func
diff --git a/src/include/util.h b/src/include/util.h
index f2a20b1..6fe0ff0 100644
--- a/src/include/util.h
+++ b/src/include/util.h
@@ -134,11 +134,11 @@ GPid meta_show_dialog (const char *type,
#include <glib-object.h>
#define META_TYPE_NEXUS (meta_nexus_get_type ())
-#define META_NEXUS(obj) (GTK_CHECK_CAST ((obj), META_TYPE_NEXUS, MetaNexus))
-#define META_NEXUS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_NEXUS, MetaNexusClass))
-#define META_IS_NEXUS(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_NEXUS))
-#define META_IS_NEXUS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_NEXUS))
-#define META_NEXUS_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_NEXUS, MetaNexusClass))
+#define META_NEXUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_NEXUS, MetaNexus))
+#define META_NEXUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_NEXUS, MetaNexusClass))
+#define META_IS_NEXUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_NEXUS))
+#define META_IS_NEXUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_NEXUS))
+#define META_NEXUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_NEXUS, MetaNexusClass))
typedef struct _MetaNexus
{
diff --git a/src/tools/metacity-window-demo.c b/src/tools/metacity-window-demo.c
index 0685b1f..ece0e11 100644
--- a/src/tools/metacity-window-demo.c
+++ b/src/tools/metacity-window-demo.c
@@ -854,7 +854,8 @@ do_appwindow (void)
/* Set up item factory to go away with the window */
g_object_ref (item_factory);
- gtk_object_sink (GTK_OBJECT (item_factory));
+ g_object_ref_sink (item_factory);
+ g_object_unref (item_factory);
g_object_set_data_full (G_OBJECT (window),
"<main>",
item_factory,
diff --git a/src/ui/fixedtip.c b/src/ui/fixedtip.c
index b4c5203..d2b95f2 100644
--- a/src/ui/fixedtip.c
+++ b/src/ui/fixedtip.c
@@ -87,7 +87,7 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
}
gtk_widget_set_app_paintable (tip, TRUE);
- gtk_window_set_policy (GTK_WINDOW (tip), FALSE, FALSE, TRUE);
+ gtk_window_set_resizable (GTK_WINDOW (tip), FALSE);
gtk_widget_set_name (tip, "gtk-tooltips");
gtk_container_set_border_width (GTK_CONTAINER (tip), 4);
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 038380b..86d5d76 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -108,10 +108,10 @@ static void invalidate_whole_window (MetaFrames *frames,
static GtkWidgetClass *parent_class = NULL;
-GtkType
+GType
meta_frames_get_type (void)
{
- static GtkType frames_type = 0;
+ static GType frames_type = 0;
if (!frames_type)
{
@@ -593,7 +593,7 @@ meta_frames_attach_style (MetaFrames *frames,
gtk_style_detach (frame->style);
/* Weirdly, gtk_style_attach() steals a reference count from the style passed in */
- gtk_style_ref (GTK_WIDGET (frames)->style);
+ g_object_ref (GTK_WIDGET (frames)->style);
frame->style = gtk_style_attach (GTK_WIDGET (frames)->style, frame->window);
}
diff --git a/src/ui/frames.h b/src/ui/frames.h
index 849c258..ad8d361 100644
--- a/src/ui/frames.h
+++ b/src/ui/frames.h
@@ -60,11 +60,11 @@ typedef enum
*/
#define META_TYPE_FRAMES (meta_frames_get_type ())
-#define META_FRAMES(obj) (GTK_CHECK_CAST ((obj), META_TYPE_FRAMES, MetaFrames))
-#define META_FRAMES_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_FRAMES, MetaFramesClass))
-#define META_IS_FRAMES(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_FRAMES))
-#define META_IS_FRAMES_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_FRAMES))
-#define META_FRAMES_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_FRAMES, MetaFramesClass))
+#define META_FRAMES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_FRAMES, MetaFrames))
+#define META_FRAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_FRAMES, MetaFramesClass))
+#define META_IS_FRAMES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_FRAMES))
+#define META_IS_FRAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_FRAMES))
+#define META_FRAMES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_FRAMES, MetaFramesClass))
typedef struct _MetaFrames MetaFrames;
typedef struct _MetaFramesClass MetaFramesClass;
diff --git a/src/ui/menu.c b/src/ui/menu.c
index 8319897..dccbfd6 100644
--- a/src/ui/menu.c
+++ b/src/ui/menu.c
@@ -445,7 +445,7 @@ meta_window_menu_new (MetaFrames *frames,
gtk_signal_connect_full (GTK_OBJECT (submi),
"activate",
- GTK_SIGNAL_FUNC (activate_cb),
+ G_CALLBACK (activate_cb),
NULL,
md,
g_free, FALSE, FALSE);
diff --git a/src/ui/metaaccellabel.c b/src/ui/metaaccellabel.c
index d523304..f4f06ac 100644
--- a/src/ui/metaaccellabel.c
+++ b/src/ui/metaaccellabel.c
@@ -53,10 +53,10 @@ static int meta_accel_label_get_accel_width (MetaAccelLabel *accel_label);
static GtkLabelClass *parent_class = NULL;
-GtkType
+GType
meta_accel_label_get_type (void)
{
- static GtkType accel_label_type = 0;
+ static GType accel_label_type = 0;
if (!accel_label_type)
{
diff --git a/src/ui/metaaccellabel.h b/src/ui/metaaccellabel.h
index 4fb8ed5..0a3b563 100644
--- a/src/ui/metaaccellabel.h
+++ b/src/ui/metaaccellabel.h
@@ -43,11 +43,11 @@ extern "C" {
#define META_TYPE_ACCEL_LABEL (meta_accel_label_get_type ())
-#define META_ACCEL_LABEL(obj) (GTK_CHECK_CAST ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabel))
-#define META_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
-#define META_IS_ACCEL_LABEL(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_ACCEL_LABEL))
-#define META_IS_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_ACCEL_LABEL))
-#define META_ACCEL_LABEL_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
+#define META_ACCEL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabel))
+#define META_ACCEL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
+#define META_IS_ACCEL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_ACCEL_LABEL))
+#define META_IS_ACCEL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_ACCEL_LABEL))
+#define META_ACCEL_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
typedef struct _MetaAccelLabel MetaAccelLabel;
@@ -91,7 +91,7 @@ struct _MetaAccelLabelClass
void (*_gtk_reserved4) (void);
};
-GtkType meta_accel_label_get_type (void) G_GNUC_CONST;
+GType meta_accel_label_get_type (void) G_GNUC_CONST;
GtkWidget* meta_accel_label_new_with_mnemonic (const gchar *string);
void meta_accel_label_set_accelerator (MetaAccelLabel *accel_label,
guint accelerator_key,
diff --git a/src/ui/preview-widget.c b/src/ui/preview-widget.c
index e098baa..32fbc70 100644
--- a/src/ui/preview-widget.c
+++ b/src/ui/preview-widget.c
@@ -40,10 +40,10 @@ static void meta_preview_finalize (GObject *object);
static GtkWidgetClass *parent_class;
-GtkType
+GType
meta_preview_get_type (void)
{
- static GtkType preview_type = 0;
+ static GType preview_type = 0;
if (!preview_type)
{
diff --git a/src/ui/preview-widget.h b/src/ui/preview-widget.h
index ab6a8f9..924b011 100644
--- a/src/ui/preview-widget.h
+++ b/src/ui/preview-widget.h
@@ -28,11 +28,11 @@
#define META_PREVIEW_WIDGET_H
#define META_TYPE_PREVIEW (meta_preview_get_type ())
-#define META_PREVIEW(obj) (GTK_CHECK_CAST ((obj), META_TYPE_PREVIEW, MetaPreview))
-#define META_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_PREVIEW, MetaPreviewClass))
-#define META_IS_PREVIEW(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_PREVIEW))
-#define META_IS_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_PREVIEW))
-#define META_PREVIEW_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_PREVIEW, MetaPreviewClass))
+#define META_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_PREVIEW, MetaPreview))
+#define META_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_PREVIEW, MetaPreviewClass))
+#define META_IS_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_PREVIEW))
+#define META_IS_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_PREVIEW))
+#define META_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_PREVIEW, MetaPreviewClass))
typedef struct _MetaPreview MetaPreview;
typedef struct _MetaPreviewClass MetaPreviewClass;
@@ -63,7 +63,7 @@ struct _MetaPreviewClass
};
-GtkType meta_preview_get_type (void) G_GNUC_CONST;
+GType meta_preview_get_type (void) G_GNUC_CONST;
GtkWidget* meta_preview_new (void);
void meta_preview_set_theme (MetaPreview *preview,
diff --git a/src/ui/tabpopup.c b/src/ui/tabpopup.c
index f38bb17..50f7021 100644
--- a/src/ui/tabpopup.c
+++ b/src/ui/tabpopup.c
@@ -591,7 +591,7 @@ meta_ui_tab_popup_select (MetaTabPopup *popup,
}
#define META_TYPE_SELECT_IMAGE (meta_select_image_get_type ())
-#define META_SELECT_IMAGE(obj) (GTK_CHECK_CAST ((obj), META_TYPE_SELECT_IMAGE, MetaSelectImage))
+#define META_SELECT_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SELECT_IMAGE, MetaSelectImage))
typedef struct _MetaSelectImage MetaSelectImage;
typedef struct _MetaSelectImageClass MetaSelectImageClass;
@@ -644,7 +644,7 @@ static GtkImageClass *parent_class;
GType
meta_select_image_get_type (void)
{
- static GtkType image_type = 0;
+ static GType image_type = 0;
if (!image_type)
{
@@ -672,7 +672,7 @@ meta_select_image_class_init (MetaSelectImageClass *klass)
{
GtkWidgetClass *widget_class;
- parent_class = gtk_type_class (gtk_image_get_type ());
+ parent_class = g_type_class_peek (gtk_image_get_type ());
widget_class = GTK_WIDGET_CLASS (klass);
@@ -731,7 +731,7 @@ meta_select_image_expose_event (GtkWidget *widget,
}
#define META_TYPE_SELECT_WORKSPACE (meta_select_workspace_get_type ())
-#define META_SELECT_WORKSPACE(obj) (GTK_CHECK_CAST ((obj), META_TYPE_SELECT_WORKSPACE, MetaSelectWorkspace))
+#define META_SELECT_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SELECT_WORKSPACE, MetaSelectWorkspace))
typedef struct _MetaSelectWorkspace MetaSelectWorkspace;
typedef struct _MetaSelectWorkspaceClass MetaSelectWorkspaceClass;
@@ -797,7 +797,7 @@ static gboolean meta_select_workspace_expose_event (GtkWidget *widget,
GType
meta_select_workspace_get_type (void)
{
- static GtkType workspace_type = 0;
+ static GType workspace_type = 0;
if (!workspace_type)
{
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c
index 5787ad4..f3dd310 100644
--- a/src/ui/theme-viewer.c
+++ b/src/ui/theme-viewer.c
@@ -109,7 +109,8 @@ normal_contents (void)
/* Set up item factory to go away */
g_object_ref (item_factory);
- gtk_object_sink (GTK_OBJECT (item_factory));
+ g_object_ref_sink (item_factory);
+ g_object_unref (item_factory);
g_object_set_data_full (G_OBJECT (table),
"<main>",
item_factory,
diff --git a/src/ui/themewidget.c b/src/ui/themewidget.c
index 1cbcb8e..5eab87d 100644
--- a/src/ui/themewidget.c
+++ b/src/ui/themewidget.c
@@ -35,10 +35,10 @@ static void meta_area_finalize (GObject *object);
static GtkMiscClass *parent_class;
-GtkType
+GType
meta_area_get_type (void)
{
- static GtkType area_type = 0;
+ static GType area_type = 0;
if (!area_type)
{
diff --git a/src/ui/themewidget.h b/src/ui/themewidget.h
index 1568aa8..a94584a 100644
--- a/src/ui/themewidget.h
+++ b/src/ui/themewidget.h
@@ -28,11 +28,11 @@
#define META_THEME_WIDGET_H
#define META_TYPE_AREA (meta_area_get_type ())
-#define META_AREA(obj) (GTK_CHECK_CAST ((obj), META_TYPE_AREA, MetaArea))
-#define META_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_AREA, MetaAreaClass))
-#define META_IS_AREA(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_AREA))
-#define META_IS_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_AREA))
-#define META_AREA_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_AREA, MetaAreaClass))
+#define META_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_AREA, MetaArea))
+#define META_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_AREA, MetaAreaClass))
+#define META_IS_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_AREA))
+#define META_IS_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_AREA))
+#define META_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_AREA, MetaAreaClass))
typedef struct _MetaArea MetaArea;
typedef struct _MetaAreaClass MetaAreaClass;
@@ -65,7 +65,7 @@ struct _MetaAreaClass
};
-GtkType meta_area_get_type (void) G_GNUC_CONST;
+GType meta_area_get_type (void) G_GNUC_CONST;
GtkWidget* meta_area_new (void);
void meta_area_setup (MetaArea *area,
diff --git a/test/tokentest/tokentest.c b/test/tokentest/tokentest.c
index a0c54f6..fbfbdef 100644
--- a/test/tokentest/tokentest.c
+++ b/test/tokentest/tokentest.c
@@ -58,7 +58,7 @@ gtk_widget_get_type (void)
/* dummy */
}
-GtkType
+GType
gtk_object_get_type (void)
{
/* dummy */