summaryrefslogtreecommitdiff
path: root/mate-panel/libmate-panel-applet-private/panel-applet-container.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-panel/libmate-panel-applet-private/panel-applet-container.c')
-rw-r--r--mate-panel/libmate-panel-applet-private/panel-applet-container.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/mate-panel/libmate-panel-applet-private/panel-applet-container.c b/mate-panel/libmate-panel-applet-private/panel-applet-container.c
index 95fca64b..a5755e92 100644
--- a/mate-panel/libmate-panel-applet-private/panel-applet-container.c
+++ b/mate-panel/libmate-panel-applet-private/panel-applet-container.c
@@ -562,7 +562,7 @@ set_applet_property_cb (GObject *source_object,
g_object_unref (container);
}
-void
+gconstpointer
mate_panel_applet_container_child_set (MatePanelAppletContainer *container,
const gchar *property_name,
const GVariant *value,
@@ -575,7 +575,7 @@ mate_panel_applet_container_child_set (MatePanelAppletContainer *container,
GSimpleAsyncResult *result;
if (!proxy)
- return;
+ return NULL;
info = mate_panel_applet_container_child_property_get_info (property_name);
if (!info) {
@@ -585,7 +585,7 @@ mate_panel_applet_container_child_set (MatePanelAppletContainer *container,
MATE_PANEL_APPLET_CONTAINER_INVALID_CHILD_PROPERTY,
"%s: Applet has no child property named `%s'",
G_STRLOC, property_name);
- return;
+ return NULL;
}
result = g_simple_async_result_new (G_OBJECT (container),
@@ -613,6 +613,8 @@ mate_panel_applet_container_child_set (MatePanelAppletContainer *container,
-1, cancellable,
set_applet_property_cb,
result);
+
+ return result;
}
gboolean
@@ -664,7 +666,7 @@ get_applet_property_cb (GObject *source_object,
g_object_unref (container);
}
-void
+gconstpointer
mate_panel_applet_container_child_get (MatePanelAppletContainer *container,
const gchar *property_name,
GCancellable *cancellable,
@@ -676,7 +678,7 @@ mate_panel_applet_container_child_get (MatePanelAppletContainer *container,
GSimpleAsyncResult *result;
if (!proxy)
- return;
+ return NULL;
info = mate_panel_applet_container_child_property_get_info (property_name);
if (!info) {
@@ -686,7 +688,7 @@ mate_panel_applet_container_child_get (MatePanelAppletContainer *container,
MATE_PANEL_APPLET_CONTAINER_INVALID_CHILD_PROPERTY,
"%s: Applet has no child property named `%s'",
G_STRLOC, property_name);
- return;
+ return NULL;
}
result = g_simple_async_result_new (G_OBJECT (container),
@@ -712,6 +714,8 @@ mate_panel_applet_container_child_get (MatePanelAppletContainer *container,
-1, cancellable,
get_applet_property_cb,
result);
+
+ return result;
}
GVariant *
@@ -794,3 +798,14 @@ mate_panel_applet_container_child_popup_menu_finish (MatePanelAppletContainer *c
return !g_simple_async_result_propagate_error (simple, error);
}
+
+void
+mate_panel_applet_container_cancel_operation (MatePanelAppletContainer *container,
+ gconstpointer operation)
+{
+ gpointer value = g_hash_table_lookup (container->priv->pending_ops, operation);
+ if (value == NULL)
+ return;
+
+ g_cancellable_cancel (G_CANCELLABLE (value));
+}