diff options
author | Ryan Lortie <desrt@desrt.ca> | 2011-12-05 12:52:35 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2011-12-05 12:54:29 -0500 |
commit | 393a80d434e338980fe6a41c9ab2c4aff54565fb (patch) | |
tree | 3abe575f1867330297a381017cd8348e07199514 /src/core/window.c | |
parent | a2f95e115c4d9f3b505c1984f5adf82749e49cbd (diff) | |
download | mutter-wip/gmenu.tar.gz |
Add _DBUS_UNIQUE_NAME and _OBJECT_PATH propertieswip/gmenu
https://bugzilla.gnome.org/show_bug.cgi?id=664851
Diffstat (limited to 'src/core/window.c')
-rw-r--r-- | src/core/window.c | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/src/core/window.c b/src/core/window.c index 7bf216030..bacacfbda 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -165,7 +165,9 @@ enum { PROP_RESIZEABLE, PROP_ABOVE, PROP_WM_CLASS, - PROP_DBUS_APPLICATION_ID + PROP_DBUS_APPLICATION_ID, + PROP_DBUS_UNIQUE_NAME, + PROP_DBUS_OBJECT_PATH }; enum @@ -223,6 +225,8 @@ meta_window_finalize (GObject *object) g_free (window->desc); g_free (window->gtk_theme_variant); g_free (window->dbus_application_id); + g_free (window->dbus_unique_name); + g_free (window->dbus_object_path); } static void @@ -289,6 +293,12 @@ meta_window_get_property(GObject *object, case PROP_DBUS_APPLICATION_ID: g_value_set_string (value, win->dbus_application_id); break; + case PROP_DBUS_UNIQUE_NAME: + g_value_set_string (value, win->dbus_unique_name); + break; + case PROP_DBUS_OBJECT_PATH: + g_value_set_string (value, win->dbus_object_path); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -463,6 +473,22 @@ meta_window_class_init (MetaWindowClass *klass) NULL, G_PARAM_READABLE)); + g_object_class_install_property (object_class, + PROP_DBUS_UNIQUE_NAME, + g_param_spec_string ("dbus-unique-name", + "_DBUS_UNIQUE_NAME", + "Contents of the _DBUS_UNIQUE_NAME property of this window", + NULL, + G_PARAM_READABLE)); + + g_object_class_install_property (object_class, + PROP_DBUS_OBJECT_PATH, + g_param_spec_string ("dbus-object-path", + "_DBUS_OBJECT_PATH", + "Contents of the _DBUS_OBJECT_PATH property of this window", + NULL, + G_PARAM_READABLE)); + window_signals[WORKSPACE_CHANGED] = g_signal_new ("workspace-changed", G_TYPE_FROM_CLASS (object_class), @@ -10237,6 +10263,30 @@ meta_window_get_dbus_application_id (MetaWindow *window) } /** + * meta_window_get_dbus_unique_name: + * @window: a #MetaWindow + * + * Return value: (transfer none): the unique name + **/ +const char * +meta_window_get_dbus_unique_name (MetaWindow *window) +{ + return window->dbus_unique_name; +} + +/** + * meta_window_get_dbus_object_path: + * @window: a #MetaWindow + * + * Return value: (transfer none): the object path + **/ +const char * +meta_window_get_dbus_object_path (MetaWindow *window) +{ + return window->dbus_object_path; +} + +/** * meta_window_get_compositor_private: * @window: a #MetaWindow * |