mirror of
https://github.com/brl/mutter.git
synced 2025-07-03 09:43:18 +00:00
Use accessor functions instead direct access.
GTK+ 2.20 is now the required version Still missing: GTK_MENU_SHELL ()->have_xgrab https://bugzilla.gnome.org/show_bug.cgi?id=595496
This commit is contained in:

committed by
Florian Müllner

parent
092cc47afc
commit
9e123695d0
@ -133,6 +133,24 @@ meta_frames_get_type (void)
|
||||
return frames_type;
|
||||
}
|
||||
|
||||
static GObject *
|
||||
meta_frames_constructor (GType gtype,
|
||||
guint n_properties,
|
||||
GObjectConstructParam *properties)
|
||||
{
|
||||
GObject *object;
|
||||
GObjectClass *gobject_class;
|
||||
|
||||
gobject_class = G_OBJECT_CLASS (parent_class);
|
||||
object = gobject_class->constructor (gtype, n_properties, properties);
|
||||
|
||||
g_object_set (object,
|
||||
"type", GTK_WINDOW_POPUP,
|
||||
NULL);
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_frames_class_init (MetaFramesClass *class)
|
||||
{
|
||||
@ -146,6 +164,7 @@ meta_frames_class_init (MetaFramesClass *class)
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
gobject_class->constructor = meta_frames_constructor;
|
||||
gobject_class->finalize = meta_frames_finalize;
|
||||
object_class->destroy = meta_frames_destroy;
|
||||
|
||||
@ -203,8 +222,6 @@ prefs_changed_callback (MetaPreference pref,
|
||||
static void
|
||||
meta_frames_init (MetaFrames *frames)
|
||||
{
|
||||
GTK_WINDOW (frames)->type = GTK_WINDOW_POPUP;
|
||||
|
||||
frames->text_heights = g_hash_table_new (NULL, NULL);
|
||||
|
||||
frames->frames = g_hash_table_new (unsigned_long_hash, unsigned_long_equal);
|
||||
@ -459,10 +476,10 @@ meta_frames_ensure_layout (MetaFrames *frames,
|
||||
MetaFrameFlags flags;
|
||||
MetaFrameType type;
|
||||
MetaFrameStyle *style;
|
||||
|
||||
g_return_if_fail (GTK_WIDGET_REALIZED (frames));
|
||||
|
||||
widget = GTK_WIDGET (frames);
|
||||
|
||||
g_return_if_fail (gtk_widget_get_realized (widget));
|
||||
|
||||
meta_core_get (gdk_display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
|
Reference in New Issue
Block a user