diff options
author | Stefano Karapetsas <[email protected]> | 2012-02-27 08:49:53 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-02-27 08:49:53 -0800 |
commit | a863fa94d275584bdd7daf4de463323fde4b91c8 (patch) | |
tree | 08e39fcc6441359674c5b30f59d332195d743138 /mate-panel/libmate-panel-applet-private/mate-panel-applet-container.c | |
parent | d7851474e28e1aa65cbdabe0d3b4032afc7d40f3 (diff) | |
parent | 5fcd54e8b74acf364cc348850f69a1a416b89692 (diff) | |
download | mate-panel-a863fa94d275584bdd7daf4de463323fde4b91c8.tar.bz2 mate-panel-a863fa94d275584bdd7daf4de463323fde4b91c8.tar.xz |
Merge pull request #10 from brianjmurrell/master
Fix for mate-panel issue #9
Diffstat (limited to 'mate-panel/libmate-panel-applet-private/mate-panel-applet-container.c')
-rw-r--r-- | mate-panel/libmate-panel-applet-private/mate-panel-applet-container.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mate-panel/libmate-panel-applet-private/mate-panel-applet-container.c b/mate-panel/libmate-panel-applet-private/mate-panel-applet-container.c index f2e39019..1076ff1d 100644 --- a/mate-panel/libmate-panel-applet-private/mate-panel-applet-container.c +++ b/mate-panel/libmate-panel-applet-private/mate-panel-applet-container.c @@ -441,6 +441,7 @@ on_factory_appeared (GDBusConnection *connection, static void mate_panel_applet_container_get_applet (MatePanelAppletContainer *container, + GdkScreen *screen, const gchar *iid, GVariant *props, GCancellable *cancellable, @@ -449,7 +450,7 @@ mate_panel_applet_container_get_applet (MatePanelAppletContainer *container, { GSimpleAsyncResult *result; AppletFactoryData *data; - gint screen; + gint screen_number; gchar *bus_name; gchar *factory_id; gchar *applet_id; @@ -474,12 +475,14 @@ mate_panel_applet_container_get_applet (MatePanelAppletContainer *container, factory_id = g_strndup (iid, strlen (iid) - strlen (applet_id)); applet_id += 2; - screen = gdk_screen_get_number (gtk_widget_get_screen (container->priv->socket)); + /* we can't use the screen of the container widget since it's not in a + * widget hierarchy yet */ + screen_number = gdk_screen_get_number (screen); data = g_new (AppletFactoryData, 1); data->result = result; data->factory_id = factory_id; - data->parameters = g_variant_new ("(si*)", applet_id, screen, props); + data->parameters = g_variant_new ("(si*)", applet_id, screen_number, props); data->cancellable = cancellable ? g_object_ref (cancellable) : NULL; bus_name = g_strdup_printf (MATE_PANEL_APPLET_BUS_NAME, factory_id); @@ -498,6 +501,7 @@ mate_panel_applet_container_get_applet (MatePanelAppletContainer *container, void mate_panel_applet_container_add (MatePanelAppletContainer *container, + GdkScreen *screen, const gchar *iid, GCancellable *cancellable, GAsyncReadyCallback callback, @@ -509,7 +513,7 @@ mate_panel_applet_container_add (MatePanelAppletContainer *container, mate_panel_applet_container_cancel_pending_operations (container); - mate_panel_applet_container_get_applet (container, iid, properties, + mate_panel_applet_container_get_applet (container, screen, iid, properties, cancellable, callback, user_data); } |