Exemplo n.º 1
0
static void
mate_panel_applet_frame_dbus_finalize (GObject *object)
{
	MatePanelAppletFrameDBus *frame = MATE_PANEL_APPLET_FRAME_DBUS (object);

	if (frame->priv->bg_cancellable)
		g_cancellable_cancel (frame->priv->bg_cancellable);

	G_OBJECT_CLASS (mate_panel_applet_frame_dbus_parent_class)->finalize (object);
}
Exemplo n.º 2
0
static void
mate_panel_applet_frame_dbus_change_size (MatePanelAppletFrame *frame,
				     guint             size)
{
	MatePanelAppletFrameDBus *dbus_frame = MATE_PANEL_APPLET_FRAME_DBUS (frame);

	mate_panel_applet_container_child_set (dbus_frame->priv->container,
					  "size", g_variant_new_uint32 (size),
					  NULL, NULL, NULL);
}
Exemplo n.º 3
0
static void
mate_panel_applet_frame_dbus_popup_menu (MatePanelAppletFrame *frame,
				    guint             button,
				    guint32           timestamp)
{
	MatePanelAppletFrameDBus *dbus_frame = MATE_PANEL_APPLET_FRAME_DBUS (frame);

	mate_panel_applet_container_child_popup_menu (dbus_frame->priv->container,
						 button, timestamp,
						 NULL, NULL, NULL);
}
Exemplo n.º 4
0
static void
mate_panel_applet_frame_dbus_init_properties (MatePanelAppletFrame *frame)
{
	MatePanelAppletFrameDBus *dbus_frame = MATE_PANEL_APPLET_FRAME_DBUS (frame);

	mate_panel_applet_container_child_get (dbus_frame->priv->container, "flags", NULL,
					  (GAsyncReadyCallback) mate_panel_applet_frame_dbus_get_flags_cb,
					  frame);
	mate_panel_applet_container_child_get (dbus_frame->priv->container, "size-hints", NULL,
					  (GAsyncReadyCallback) mate_panel_applet_frame_dbus_get_size_hints_cb,
					  frame);
}
Exemplo n.º 5
0
static void
mate_panel_applet_frame_dbus_change_orientation (MatePanelAppletFrame *frame,
					    PanelOrientation  orientation)
{
	MatePanelAppletFrameDBus *dbus_frame = MATE_PANEL_APPLET_FRAME_DBUS (frame);

	mate_panel_applet_container_child_set (dbus_frame->priv->container,
					  "orient",
					  g_variant_new_uint32 (get_mate_panel_applet_orient (orientation)),
					  NULL,
					  (GAsyncReadyCallback)change_orientation_cb,
					  frame);
}
static void
container_child_background_set (GObject      *source_object,
				GAsyncResult *res,
				gpointer      user_data)
{
	MatePanelAppletContainer *container = MATE_PANEL_APPLET_CONTAINER (source_object);
	MatePanelAppletFrameDBus *frame = MATE_PANEL_APPLET_FRAME_DBUS (user_data);

	mate_panel_applet_container_child_set_finish (container, res, NULL);

	if (frame->priv->bg_cancellable)
		g_object_unref (frame->priv->bg_cancellable);
	frame->priv->bg_cancellable = NULL;
}
Exemplo n.º 7
0
static void
mate_panel_applet_frame_dbus_sync_menu_state (MatePanelAppletFrame *frame,
					 gboolean          movable,
					 gboolean          removable,
					 gboolean          lockable,
					 gboolean          locked,
					 gboolean          locked_down)
{
	MatePanelAppletFrameDBus *dbus_frame = MATE_PANEL_APPLET_FRAME_DBUS (frame);

	mate_panel_applet_container_child_set (dbus_frame->priv->container,
					  "locked", g_variant_new_boolean (lockable && locked),
					  NULL, NULL, NULL);
	mate_panel_applet_container_child_set (dbus_frame->priv->container,
					  "locked-down", g_variant_new_boolean (locked_down),
					  NULL, NULL, NULL);
}
Exemplo n.º 8
0
static void
mate_panel_applet_frame_dbus_change_background (MatePanelAppletFrame    *frame,
					   PanelBackgroundType  type)
{
	MatePanelAppletFrameDBus *dbus_frame = MATE_PANEL_APPLET_FRAME_DBUS (frame);
	char *bg_str;

	bg_str = _mate_panel_applet_frame_get_background_string (
			frame, PANEL_WIDGET (gtk_widget_get_parent (GTK_WIDGET (frame))), type);

	if (bg_str != NULL) {
		if (dbus_frame->priv->bg_cancellable)
			g_cancellable_cancel (dbus_frame->priv->bg_cancellable);
		dbus_frame->priv->bg_cancellable = g_cancellable_new ();

		mate_panel_applet_container_child_set (dbus_frame->priv->container,
						  "background",
						  g_variant_new_string (bg_str),
						  dbus_frame->priv->bg_cancellable,
						  container_child_background_set,
						  dbus_frame);
		g_free (bg_str);
	}
}