Remove deprecated GTK symbols

http://bugzilla.gnome.org/show_bug.cgi?id=587991

(adapted from metacity commit 3f76affbd2,
original patch by Thomas Andersen)
This commit is contained in:
Tomas Frydrych 2009-08-04 09:17:20 +01:00
parent e985bf0e7a
commit ff9400abde
15 changed files with 48 additions and 48 deletions

View File

@ -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
{

View File

@ -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,

View File

@ -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);

View File

@ -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);
}

View File

@ -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;

View File

@ -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);

View File

@ -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)
{

View File

@ -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,

View File

@ -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)
{

View File

@ -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,

View File

@ -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)
{

View File

@ -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,

View File

@ -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)
{

View File

@ -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,

View File

@ -58,7 +58,7 @@ gtk_widget_get_type (void)
/* dummy */
}
GtkType
GType
gtk_object_get_type (void)
{
/* dummy */