summaryrefslogtreecommitdiff
path: root/libmate-panel-applet/mate-panel-applet-factory.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmate-panel-applet/mate-panel-applet-factory.c')
-rw-r--r--libmate-panel-applet/mate-panel-applet-factory.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libmate-panel-applet/mate-panel-applet-factory.c b/libmate-panel-applet/mate-panel-applet-factory.c
index b7e237c1..cf38d64c 100644
--- a/libmate-panel-applet/mate-panel-applet-factory.c
+++ b/libmate-panel-applet/mate-panel-applet-factory.c
@@ -306,4 +306,23 @@ mate_panel_applet_factory_register_service (MatePanelAppletFactory *factory)
return TRUE;
}
+GtkWidget *
+mate_panel_applet_factory_get_applet_widget (const gchar *id,
+ guint uid)
+{
+ MatePanelAppletFactory *factory;
+ GObject *object;
+
+ if (!factories)
+ return NULL;
+ factory = g_hash_table_lookup (factories, id);
+ if (!factory)
+ return NULL;
+
+ object = g_hash_table_lookup (factory->applets, GUINT_TO_POINTER (uid));
+ if (!object || !GTK_IS_WIDGET (object))
+ return NULL;
+
+ return GTK_WIDGET (object);
+}