diff --git a/src/include/util.h b/src/include/util.h index a2ac23207..a10310454 100644 --- a/src/include/util.h +++ b/src/include/util.h @@ -134,11 +134,11 @@ GPid meta_show_dialog (const char *type, #include #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 85f0a6881..eb8ccbc90 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, "
", 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), "
", item_factory, diff --git a/src/ui/fixedtip.c b/src/ui/fixedtip.c index 4e8b76bd0..2a0ce4966 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 8c34a9023..01e5027c2 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 849c25844..ad8d36153 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 36e89c6fa..6d6270d97 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 d52330424..f4f06ac10 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 4fb8ed5d6..0a3b56330 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 e098baace..32fbc7051 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 ab6a8f9ec..924b01104 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 44cb3867d..c14e9a991 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 e35b8803f..f237b6150 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), "
", item_factory, diff --git a/src/ui/themewidget.c b/src/ui/themewidget.c index 1cbcb8e2c..5eab87d6a 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 1568aa86f..a94584ab9 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 a0c54f64d..fbfbdefd8 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 */