[mutter] Remove deprecated GTK symbols
- From: Tomas Frydrych <tomasf src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [mutter] Remove deprecated GTK symbols
- Date: Tue, 4 Aug 2009 08:25:20 +0000 (UTC)
commit ff9400abde7681529e3741bad26bba8a80e99717
Author: Tomas Frydrych <tf linux intel com>
Date: Tue Aug 4 09:17:20 2009 +0100
Remove deprecated GTK symbols
http://bugzilla.gnome.org/show_bug.cgi?id=587991
(adapted from metacity commit 3f76affbd2f5c7b83ec4133a87408988f2ee8855,
original patch by Thomas Andersen)
src/include/util.h | 10 +++++-----
src/tools/mutter-window-demo.c | 3 +--
src/ui/fixedtip.c | 2 +-
src/ui/frames.c | 6 +++---
src/ui/frames.h | 10 +++++-----
src/ui/menu.c | 2 +-
src/ui/metaaccellabel.c | 4 ++--
src/ui/metaaccellabel.h | 12 ++++++------
src/ui/preview-widget.c | 4 ++--
src/ui/preview-widget.h | 12 ++++++------
src/ui/tabpopup.c | 10 +++++-----
src/ui/theme-viewer.c | 3 ++-
src/ui/themewidget.c | 4 ++--
src/ui/themewidget.h | 12 ++++++------
test/tokentest/tokentest.c | 2 +-
15 files changed, 48 insertions(+), 48 deletions(-)
---
diff --git a/src/include/util.h b/src/include/util.h
index a2ac232..a103104 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/mutter-window-demo.c b/src/tools/mutter-window-demo.c
index 85f0a68..eb8ccbc 100644
--- a/src/tools/mutter-window-demo.c
+++ b/src/tools/mutter-window-demo.c
@@ -853,8 +853,7 @@ do_appwindow (void)
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group);
/* 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_set_data_full (G_OBJECT (window),
"<main>",
item_factory,
diff --git a/src/ui/fixedtip.c b/src/ui/fixedtip.c
index 4e8b76b..2a0ce49 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 8c34a90..01e5027 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 36e89c6..6d6270d 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 44cb386..c14e9a9 100644
--- a/src/ui/tabpopup.c
+++ b/src/ui/tabpopup.c
@@ -597,7 +597,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;
@@ -650,7 +650,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)
{
@@ -678,7 +678,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);
@@ -737,7 +737,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;
@@ -803,7 +803,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 e35b880..f237b61 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]