[Xfce4-commits] <xfce4-panel:devel> Follow GNU indent guidelines for switch.
Nick Schermer
noreply at xfce.org
Tue Jan 26 19:40:02 CET 2010
Updating branch refs/heads/devel
to a4c620e80c6ab063fa32f8e353898d3965bea653 (commit)
from 0e40ea5f463f508e08c34e95968fdcf9db3f0b69 (commit)
commit a4c620e80c6ab063fa32f8e353898d3965bea653
Author: Nick Schermer <nick at xfce.org>
Date: Tue Jan 26 19:25:06 2010 +0100
Follow GNU indent guidelines for switch.
libxfce4panel/libxfce4panel-deprecated.h | 82 ++--
libxfce4panel/xfce-arrow-button.c | 68 ++--
libxfce4panel/xfce-hvbox.c | 24 +-
libxfce4panel/xfce-panel-image.c | 70 ++--
libxfce4panel/xfce-panel-plugin.c | 140 ++++----
panel/panel-application.c | 308 ++++++++--------
panel/panel-base-window.c | 154 ++++----
panel/panel-itembar.c | 76 ++--
panel/panel-module.c | 90 +++---
panel/panel-plugin-external-46.c | 92 +++---
panel/panel-plugin-external.c | 92 +++---
panel/panel-window.c | 632 +++++++++++++++---------------
plugins/actions/actions.c | 94 +++---
plugins/clock/clock-analog.c | 24 +-
plugins/clock/clock-binary.c | 36 +-
plugins/clock/clock-digital.c | 28 +-
plugins/clock/clock-fuzzy.c | 36 +-
plugins/clock/clock-lcd.c | 60 ++--
plugins/clock/clock.c | 140 ++++----
plugins/launcher/launcher.c | 368 +++++++++---------
plugins/pager/pager.c | 91 +++--
plugins/separator/separator.c | 244 ++++++------
plugins/windowmenu/windowmenu.c | 174 ++++----
23 files changed, 1567 insertions(+), 1556 deletions(-)
diff --git a/libxfce4panel/libxfce4panel-deprecated.h b/libxfce4panel/libxfce4panel-deprecated.h
index bb1e537..febdcee 100644
--- a/libxfce4panel/libxfce4panel-deprecated.h
+++ b/libxfce4panel/libxfce4panel-deprecated.h
@@ -103,47 +103,47 @@ enum /*< skip >*/
\
switch (message) \
{ \
- case PANEL_CLIENT_EVENT_REMOVED: \
- xfce_panel_plugin_provider_removed (provider); \
- break; \
- \
- case PANEL_CLIENT_EVENT_SAVE: \
- xfce_panel_plugin_provider_save (provider); \
- break; \
- \
- case PANEL_CLIENT_EVENT_SET_BACKGROUND_ALPHA: \
- _xpp_alpha = value / 100.00; \
- if (_xpp_composited) \
- gtk_widget_queue_draw (plug); \
- break; \
- \
- case PANEL_CLIENT_EVENT_SET_ORIENTATION: \
- xfce_panel_plugin_provider_set_orientation (provider, value); \
- break; \
- \
- case PANEL_CLIENT_EVENT_SET_SCREEN_POSITION: \
- xfce_panel_plugin_provider_set_screen_position (provider, value); \
- break; \
- \
- case PANEL_CLIENT_EVENT_SET_SENSITIVE: \
- gtk_widget_set_sensitive (plug, value); \
- break; \
- \
- case PANEL_CLIENT_EVENT_SET_SIZE: \
- xfce_panel_plugin_provider_set_size (provider, value); \
- break; \
- \
- case PANEL_CLIENT_EVENT_SHOW_ABOUT: \
- xfce_panel_plugin_provider_show_about (provider); \
- break; \
- \
- case PANEL_CLIENT_EVENT_SHOW_CONFIGURE: \
- xfce_panel_plugin_provider_show_configure (provider); \
- break; \
- \
- default: \
- g_warning ("Received unknow client event %d", message); \
- break; \
+ case PANEL_CLIENT_EVENT_REMOVED: \
+ xfce_panel_plugin_provider_removed (provider); \
+ break; \
+ \
+ case PANEL_CLIENT_EVENT_SAVE: \
+ xfce_panel_plugin_provider_save (provider); \
+ break; \
+ \
+ case PANEL_CLIENT_EVENT_SET_BACKGROUND_ALPHA: \
+ _xpp_alpha = value / 100.00; \
+ if (_xpp_composited) \
+ gtk_widget_queue_draw (plug); \
+ break; \
+ \
+ case PANEL_CLIENT_EVENT_SET_ORIENTATION: \
+ xfce_panel_plugin_provider_set_orientation (provider, value); \
+ break; \
+ \
+ case PANEL_CLIENT_EVENT_SET_SCREEN_POSITION: \
+ xfce_panel_plugin_provider_set_screen_position (provider, value); \
+ break; \
+ \
+ case PANEL_CLIENT_EVENT_SET_SENSITIVE: \
+ gtk_widget_set_sensitive (plug, value); \
+ break; \
+ \
+ case PANEL_CLIENT_EVENT_SET_SIZE: \
+ xfce_panel_plugin_provider_set_size (provider, value); \
+ break; \
+ \
+ case PANEL_CLIENT_EVENT_SHOW_ABOUT: \
+ xfce_panel_plugin_provider_show_about (provider); \
+ break; \
+ \
+ case PANEL_CLIENT_EVENT_SHOW_CONFIGURE: \
+ xfce_panel_plugin_provider_show_configure (provider); \
+ break; \
+ \
+ default: \
+ g_warning ("Received unknow client event %d", message); \
+ break; \
} \
\
return FALSE; \
diff --git a/libxfce4panel/xfce-arrow-button.c b/libxfce4panel/xfce-arrow-button.c
index a38856d..67426e3 100644
--- a/libxfce4panel/xfce-arrow-button.c
+++ b/libxfce4panel/xfce-arrow-button.c
@@ -198,13 +198,13 @@ xfce_arrow_button_set_property (GObject *object,
switch (prop_id)
{
- case PROP_ARROW_TYPE:
- xfce_arrow_button_set_arrow_type (button, g_value_get_enum (value));
- break;
+ case PROP_ARROW_TYPE:
+ xfce_arrow_button_set_arrow_type (button, g_value_get_enum (value));
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -220,13 +220,13 @@ xfce_arrow_button_get_property (GObject *object,
switch (prop_id)
{
- case PROP_ARROW_TYPE:
- g_value_set_enum (value, xfce_arrow_button_get_arrow_type (button));
- break;
+ case PROP_ARROW_TYPE:
+ g_value_set_enum (value, xfce_arrow_button_get_arrow_type (button));
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -314,18 +314,18 @@ xfce_arrow_button_size_request (GtkWidget *widget,
/* reserve space for the arrow */
switch (button->priv->arrow_type)
{
- case GTK_ARROW_UP:
- case GTK_ARROW_DOWN:
- requisition->width += ARROW_WIDTH;
- break;
-
- case GTK_ARROW_LEFT:
- case GTK_ARROW_RIGHT:
- requisition->height += ARROW_WIDTH;
- break;
-
- default:
- break;
+ case GTK_ARROW_UP:
+ case GTK_ARROW_DOWN:
+ requisition->width += ARROW_WIDTH;
+ break;
+
+ case GTK_ARROW_LEFT:
+ case GTK_ARROW_RIGHT:
+ requisition->height += ARROW_WIDTH;
+ break;
+
+ default:
+ break;
}
}
else if (button->priv->arrow_type != GTK_ARROW_NONE)
@@ -359,16 +359,16 @@ xfce_arrow_button_size_allocate (GtkWidget *widget,
/* update the allocation to make space for the arrow */
switch (button->priv->arrow_type)
{
- case GTK_ARROW_LEFT:
- case GTK_ARROW_RIGHT:
- child_allocation.height -= ARROW_WIDTH;
- child_allocation.y += ARROW_WIDTH;
- break;
-
- default:
- child_allocation.width -= ARROW_WIDTH;
- child_allocation.x += ARROW_WIDTH;
- break;
+ case GTK_ARROW_LEFT:
+ case GTK_ARROW_RIGHT:
+ child_allocation.height -= ARROW_WIDTH;
+ child_allocation.y += ARROW_WIDTH;
+ break;
+
+ default:
+ child_allocation.width -= ARROW_WIDTH;
+ child_allocation.x += ARROW_WIDTH;
+ break;
}
/* set the child allocation again */
diff --git a/libxfce4panel/xfce-hvbox.c b/libxfce4panel/xfce-hvbox.c
index 45983a8..724d72c 100644
--- a/libxfce4panel/xfce-hvbox.c
+++ b/libxfce4panel/xfce-hvbox.c
@@ -134,13 +134,13 @@ xfce_hvbox_get_property (GObject *object,
switch (prop_id)
{
- case PROP_ORIENTATION:
- g_value_set_enum (value, hvbox->orientation);
- break;
+ case PROP_ORIENTATION:
+ g_value_set_enum (value, hvbox->orientation);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -156,13 +156,13 @@ xfce_hvbox_set_property (GObject *object,
switch (prop_id)
{
- case PROP_ORIENTATION:
- xfce_hvbox_set_orientation (hvbox, g_value_get_enum (value));
- break;
+ case PROP_ORIENTATION:
+ xfce_hvbox_set_orientation (hvbox, g_value_get_enum (value));
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
diff --git a/libxfce4panel/xfce-panel-image.c b/libxfce4panel/xfce-panel-image.c
index 2b88450..2d5817c 100644
--- a/libxfce4panel/xfce-panel-image.c
+++ b/libxfce4panel/xfce-panel-image.c
@@ -206,21 +206,21 @@ xfce_panel_image_get_property (GObject *object,
switch (prop_id)
{
- case PROP_SOURCE:
- g_value_set_string (value, priv->source);
- break;
+ case PROP_SOURCE:
+ g_value_set_string (value, priv->source);
+ break;
- case PROP_PIXBUF:
- g_value_set_object (value, priv->pixbuf);
- break;
+ case PROP_PIXBUF:
+ g_value_set_object (value, priv->pixbuf);
+ break;
- case PROP_SIZE:
- g_value_set_int (value, priv->size);
- break;
+ case PROP_SIZE:
+ g_value_set_int (value, priv->size);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -237,29 +237,29 @@ xfce_panel_image_set_property (GObject *object,
switch (prop_id)
{
- case PROP_SOURCE:
- xfce_panel_image_set_from_source (XFCE_PANEL_IMAGE (object),
- g_value_get_string (value));
- break;
-
- case PROP_PIXBUF:
- xfce_panel_image_set_from_pixbuf (XFCE_PANEL_IMAGE (object),
- g_value_get_object (value));
- break;
-
- case PROP_SIZE:
- priv = XFCE_PANEL_IMAGE (object)->priv;
- size = g_value_get_int (value);
- if (G_LIKELY (priv->size != size))
- {
- priv->size = size;
- gtk_widget_queue_resize (GTK_WIDGET (object));
- }
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_SOURCE:
+ xfce_panel_image_set_from_source (XFCE_PANEL_IMAGE (object),
+ g_value_get_string (value));
+ break;
+
+ case PROP_PIXBUF:
+ xfce_panel_image_set_from_pixbuf (XFCE_PANEL_IMAGE (object),
+ g_value_get_object (value));
+ break;
+
+ case PROP_SIZE:
+ priv = XFCE_PANEL_IMAGE (object)->priv;
+ size = g_value_get_int (value);
+ if (G_LIKELY (priv->size != size))
+ {
+ priv->size = size;
+ gtk_widget_queue_resize (GTK_WIDGET (object));
+ }
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index c7a7a1f..effea33 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -590,45 +590,45 @@ xfce_panel_plugin_get_property (GObject *object,
switch (prop_id)
{
- case PROP_NAME:
- g_value_set_static_string (value, private->name);
- break;
+ case PROP_NAME:
+ g_value_set_static_string (value, private->name);
+ break;
- case PROP_DISPLAY_NAME:
- g_value_set_static_string (value, private->display_name);
- break;
+ case PROP_DISPLAY_NAME:
+ g_value_set_static_string (value, private->display_name);
+ break;
- case PROP_COMMENT:
- g_value_set_static_string (value, private->comment);
- break;
+ case PROP_COMMENT:
+ g_value_set_static_string (value, private->comment);
+ break;
- case PROP_UNIQUE_ID:
- g_value_set_int (value, private->unique_id);
- break;
+ case PROP_UNIQUE_ID:
+ g_value_set_int (value, private->unique_id);
+ break;
- case PROP_ARGUMENTS:
- g_value_set_boxed (value, private->arguments);
- break;
+ case PROP_ARGUMENTS:
+ g_value_set_boxed (value, private->arguments);
+ break;
- case PROP_ORIENTATION:
- g_value_set_enum (value, private->orientation);
- break;
+ case PROP_ORIENTATION:
+ g_value_set_enum (value, private->orientation);
+ break;
- case PROP_SIZE:
- g_value_set_int (value, private->size);
- break;
+ case PROP_SIZE:
+ g_value_set_int (value, private->size);
+ break;
- case PROP_SCREEN_POSITION:
- g_value_set_enum (value, private->screen_position);
- break;
+ case PROP_SCREEN_POSITION:
+ g_value_set_enum (value, private->screen_position);
+ break;
- case PROP_EXPAND:
- g_value_set_boolean (value, private->expand);
- break;
+ case PROP_EXPAND:
+ g_value_set_boolean (value, private->expand);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -644,34 +644,34 @@ xfce_panel_plugin_set_property (GObject *object,
switch (prop_id)
{
- case PROP_NAME:
- private->name = g_value_dup_string (value);
- break;
-
- case PROP_DISPLAY_NAME:
- private->display_name = g_value_dup_string (value);
- break;
-
- case PROP_COMMENT:
- private->comment = g_value_dup_string (value);
- break;
-
- case PROP_UNIQUE_ID:
- private->unique_id = g_value_get_int (value);
- break;
-
- case PROP_ARGUMENTS:
- private->arguments = g_value_dup_boxed (value);
- break;
-
- case PROP_EXPAND:
- xfce_panel_plugin_set_expand (XFCE_PANEL_PLUGIN (object),
- g_value_get_boolean (value));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_NAME:
+ private->name = g_value_dup_string (value);
+ break;
+
+ case PROP_DISPLAY_NAME:
+ private->display_name = g_value_dup_string (value);
+ break;
+
+ case PROP_COMMENT:
+ private->comment = g_value_dup_string (value);
+ break;
+
+ case PROP_UNIQUE_ID:
+ private->unique_id = g_value_get_int (value);
+ break;
+
+ case PROP_ARGUMENTS:
+ private->arguments = g_value_dup_boxed (value);
+ break;
+
+ case PROP_EXPAND:
+ xfce_panel_plugin_set_expand (XFCE_PANEL_PLUGIN (object),
+ g_value_get_boolean (value));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -1876,21 +1876,21 @@ xfce_panel_plugin_position_widget (XfcePanelPlugin *plugin,
switch (xfce_panel_plugin_arrow_type (plugin))
{
- case GTK_ARROW_UP:
- *y -= requisition.height;
- break;
+ case GTK_ARROW_UP:
+ *y -= requisition.height;
+ break;
- case GTK_ARROW_DOWN:
- *y += attach_widget->allocation.height;
- break;
+ case GTK_ARROW_DOWN:
+ *y += attach_widget->allocation.height;
+ break;
- case GTK_ARROW_LEFT:
- *x -= requisition.width;
- break;
+ case GTK_ARROW_LEFT:
+ *x -= requisition.width;
+ break;
- default: /* GTK_ARROW_RIGHT and GTK_ARROW_NONE */
- *x += attach_widget->allocation.width;
- break;
+ default: /* GTK_ARROW_RIGHT and GTK_ARROW_NONE */
+ *x += attach_widget->allocation.width;
+ break;
}
/* get the monitor geometry */
diff --git a/panel/panel-application.c b/panel/panel-application.c
index 17dcf69..820709c 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -464,91 +464,91 @@ panel_application_plugin_provider_signal (XfcePanelPluginProvider *provide
switch (provider_signal)
{
- case PROVIDER_SIGNAL_MOVE_PLUGIN:
- /* start plugin drag */
- panel_application_plugin_move (GTK_WIDGET (provider), application);
- break;
-
- case PROVIDER_SIGNAL_EXPAND_PLUGIN:
- case PROVIDER_SIGNAL_COLLAPSE_PLUGIN:
- itembar = gtk_bin_get_child (GTK_BIN (window));
- gtk_container_child_set (GTK_CONTAINER (itembar),
- GTK_WIDGET (provider),
- "expand",
- provider_signal == PROVIDER_SIGNAL_EXPAND_PLUGIN,
- NULL);
- break;
-
- case PROVIDER_SIGNAL_WRAP_PLUGIN:
- case PROVIDER_SIGNAL_UNWRAP_PLUGIN:
- itembar = gtk_bin_get_child (GTK_BIN (window));
- gtk_container_child_set (GTK_CONTAINER (itembar),
- GTK_WIDGET (provider),
- "wrap",
- provider_signal == PROVIDER_SIGNAL_WRAP_PLUGIN,
- NULL);
- break;
-
- case PROVIDER_SIGNAL_LOCK_PANEL:
- /* increase window's autohide counter */
- panel_window_freeze_autohide (window);
- break;
-
- case PROVIDER_SIGNAL_UNLOCK_PANEL:
- /* decrease window's autohide counter */
- panel_window_thaw_autohide (window);
- break;
-
- case PROVIDER_SIGNAL_REMOVE_PLUGIN:
- /* give plugin the opportunity to cleanup special configuration */
- xfce_panel_plugin_provider_removed (provider);
-
- /* store the provider's unique id and name (lost after destroy) */
- unique_id = xfce_panel_plugin_provider_get_unique_id (provider);
- name = g_strdup (xfce_panel_plugin_provider_get_name (provider));
-
- /* destroy the plugin */
- gtk_widget_destroy (GTK_WIDGET (provider));
-
- /* remove the plugin configuration */
- panel_application_plugin_delete_config (application, name, unique_id);
- g_free (name);
- break;
-
- case PROVIDER_SIGNAL_ADD_NEW_ITEMS:
- /* open the items dialog */
- panel_item_dialog_show (window);
- break;
-
- case PROVIDER_SIGNAL_PANEL_PREFERENCES:
- /* open the panel preferences */
- panel_preferences_dialog_show (window);
- break;
-
- case PROVIDER_SIGNAL_PANEL_QUIT:
- case PROVIDER_SIGNAL_PANEL_RESTART:
- /* quit or restart */
- panel_dbus_service_exit_panel (provider_signal == PROVIDER_SIGNAL_PANEL_RESTART);
- break;
-
- case PROVIDER_SIGNAL_PANEL_ABOUT:
- /* show the about dialog */
- panel_dialogs_show_about ();
- break;
-
- case PROVIDER_SIGNAL_FOCUS_PLUGIN:
- /* focus the panel window (as part of focusing a widget within the plugin) */
- gtk_window_present_with_time (GTK_WINDOW (window), GDK_CURRENT_TIME);
- break;
-
- case PROVIDER_SIGNAL_SHOW_CONFIGURE:
- case PROVIDER_SIGNAL_SHOW_ABOUT:
- /* signals we can ignore, only for external plugins */
- break;
-
- default:
- g_critical ("Received unknown provider signal %d", provider_signal);
- break;
+ case PROVIDER_SIGNAL_MOVE_PLUGIN:
+ /* start plugin drag */
+ panel_application_plugin_move (GTK_WIDGET (provider), application);
+ break;
+
+ case PROVIDER_SIGNAL_EXPAND_PLUGIN:
+ case PROVIDER_SIGNAL_COLLAPSE_PLUGIN:
+ itembar = gtk_bin_get_child (GTK_BIN (window));
+ gtk_container_child_set (GTK_CONTAINER (itembar),
+ GTK_WIDGET (provider),
+ "expand",
+ provider_signal == PROVIDER_SIGNAL_EXPAND_PLUGIN,
+ NULL);
+ break;
+
+ case PROVIDER_SIGNAL_WRAP_PLUGIN:
+ case PROVIDER_SIGNAL_UNWRAP_PLUGIN:
+ itembar = gtk_bin_get_child (GTK_BIN (window));
+ gtk_container_child_set (GTK_CONTAINER (itembar),
+ GTK_WIDGET (provider),
+ "wrap",
+ provider_signal == PROVIDER_SIGNAL_WRAP_PLUGIN,
+ NULL);
+ break;
+
+ case PROVIDER_SIGNAL_LOCK_PANEL:
+ /* increase window's autohide counter */
+ panel_window_freeze_autohide (window);
+ break;
+
+ case PROVIDER_SIGNAL_UNLOCK_PANEL:
+ /* decrease window's autohide counter */
+ panel_window_thaw_autohide (window);
+ break;
+
+ case PROVIDER_SIGNAL_REMOVE_PLUGIN:
+ /* give plugin the opportunity to cleanup special configuration */
+ xfce_panel_plugin_provider_removed (provider);
+
+ /* store the provider's unique id and name (lost after destroy) */
+ unique_id = xfce_panel_plugin_provider_get_unique_id (provider);
+ name = g_strdup (xfce_panel_plugin_provider_get_name (provider));
+
+ /* destroy the plugin */
+ gtk_widget_destroy (GTK_WIDGET (provider));
+
+ /* remove the plugin configuration */
+ panel_application_plugin_delete_config (application, name, unique_id);
+ g_free (name);
+ break;
+
+ case PROVIDER_SIGNAL_ADD_NEW_ITEMS:
+ /* open the items dialog */
+ panel_item_dialog_show (window);
+ break;
+
+ case PROVIDER_SIGNAL_PANEL_PREFERENCES:
+ /* open the panel preferences */
+ panel_preferences_dialog_show (window);
+ break;
+
+ case PROVIDER_SIGNAL_PANEL_QUIT:
+ case PROVIDER_SIGNAL_PANEL_RESTART:
+ /* quit or restart */
+ panel_dbus_service_exit_panel (provider_signal == PROVIDER_SIGNAL_PANEL_RESTART);
+ break;
+
+ case PROVIDER_SIGNAL_PANEL_ABOUT:
+ /* show the about dialog */
+ panel_dialogs_show_about ();
+ break;
+
+ case PROVIDER_SIGNAL_FOCUS_PLUGIN:
+ /* focus the panel window (as part of focusing a widget within the plugin) */
+ gtk_window_present_with_time (GTK_WINDOW (window), GDK_CURRENT_TIME);
+ break;
+
+ case PROVIDER_SIGNAL_SHOW_CONFIGURE:
+ case PROVIDER_SIGNAL_SHOW_ABOUT:
+ /* signals we can ignore, only for external plugins */
+ break;
+
+ default:
+ g_critical ("Received unknown provider signal %d", provider_signal);
+ break;
}
}
@@ -758,77 +758,77 @@ panel_application_drag_data_received (PanelWindow *window,
switch (info)
{
- case TARGET_PLUGIN_NAME:
- if (G_LIKELY (selection_data->length > 0))
- {
- /* create a new item with a unique id */
- name = (const gchar *) selection_data->data;
- succeed = panel_application_plugin_insert (application, window,
- screen, name,
- -1, NULL, position);
- }
- break;
-
- case TARGET_PLUGIN_WIDGET:
- /* get the source widget */
- provider = gtk_drag_get_source_widget (context);
-
- /* debug check */
- panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider));
-
- /* check if we move to another itembar */
- if (gtk_widget_get_parent (provider) == itembar)
- {
- /* get the current position on the itembar */
- old_position = panel_itembar_get_child_index (PANEL_ITEMBAR (itembar),
- provider);
-
- /* decrease the counter if we drop after the current position */
- if (position > old_position)
- position--;
-
- /* reorder the child if needed */
- if (old_position != position)
- panel_itembar_reorder_child (PANEL_ITEMBAR (itembar), provider, position);
- }
- else
- {
- /* reparent the widget, this will also call remove and add for the itembar */
- gtk_widget_reparent (provider, itembar);
-
- /* move the item to the correct position on the itembar */
+ case TARGET_PLUGIN_NAME:
+ if (G_LIKELY (selection_data->length > 0))
+ {
+ /* create a new item with a unique id */
+ name = (const gchar *) selection_data->data;
+ succeed = panel_application_plugin_insert (application, window,
+ screen, name,
+ -1, NULL, position);
+ }
+ break;
+
+ case TARGET_PLUGIN_WIDGET:
+ /* get the source widget */
+ provider = gtk_drag_get_source_widget (context);
+
+ /* debug check */
+ panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider));
+
+ /* check if we move to another itembar */
+ if (gtk_widget_get_parent (provider) == itembar)
+ {
+ /* get the current position on the itembar */
+ old_position = panel_itembar_get_child_index (PANEL_ITEMBAR (itembar),
+ provider);
+
+ /* decrease the counter if we drop after the current position */
+ if (position > old_position)
+ position--;
+
+ /* reorder the child if needed */
+ if (old_position != position)
panel_itembar_reorder_child (PANEL_ITEMBAR (itembar), provider, position);
+ }
+ else
+ {
+ /* reparent the widget, this will also call remove and add for the itembar */
+ gtk_widget_reparent (provider, itembar);
+
+ /* move the item to the correct position on the itembar */
+ panel_itembar_reorder_child (PANEL_ITEMBAR (itembar), provider, position);
+
+ /* send all the needed panel information to the plugin */
+ panel_window_set_povider_info (window, provider);
+ }
+
+ /* everything went fine */
+ succeed = TRUE;
+ break;
+
+ case TARGET_TEXT_URI_LIST:
+ if (G_LIKELY (application->drop_desktop_files))
+ {
+ /* pass all the uris to the launcher, it will filter out
+ * the desktop files on it's own */
+ uris = gtk_selection_data_get_uris (selection_data);
+ if (G_LIKELY (uris != NULL))
+ {
+ /* create a new item with a unique id */
+ succeed = panel_application_plugin_insert (application, window,
+ screen, LAUNCHER_PLUGIN_NAME,
+ -1, uris, position);
+ g_strfreev (uris);
+ }
+
+ application->drop_desktop_files = FALSE;
+ }
+ break;
- /* send all the needed panel information to the plugin */
- panel_window_set_povider_info (window, provider);
- }
-
- /* everything went fine */
- succeed = TRUE;
- break;
-
- case TARGET_TEXT_URI_LIST:
- if (G_LIKELY (application->drop_desktop_files))
- {
- /* pass all the uris to the launcher, it will filter out
- * the desktop files on it's own */
- uris = gtk_selection_data_get_uris (selection_data);
- if (G_LIKELY (uris != NULL))
- {
- /* create a new item with a unique id */
- succeed = panel_application_plugin_insert (application, window,
- screen, LAUNCHER_PLUGIN_NAME,
- -1, uris, position);
- g_strfreev (uris);
- }
-
- application->drop_desktop_files = FALSE;
- }
- break;
-
- default:
- panel_assert_not_reached ();
- break;
+ default:
+ panel_assert_not_reached ();
+ break;
}
/* save the panel configuration if we succeeded */
diff --git a/panel/panel-base-window.c b/panel/panel-base-window.c
index 06d2128..ec2936f 100644
--- a/panel/panel-base-window.c
+++ b/panel/panel-base-window.c
@@ -188,33 +188,33 @@ panel_base_window_get_property (GObject *object,
switch (prop_id)
{
- case PROP_ENTER_OPACITY:
- g_value_set_uint (value, rint (priv->enter_opacity * 100.00));
- break;
+ case PROP_ENTER_OPACITY:
+ g_value_set_uint (value, rint (priv->enter_opacity * 100.00));
+ break;
- case PROP_LEAVE_OPACITY:
- g_value_set_uint (value, rint (priv->leave_opacity * 100.00));
- break;
+ case PROP_LEAVE_OPACITY:
+ g_value_set_uint (value, rint (priv->leave_opacity * 100.00));
+ break;
- case PROP_BACKGROUND_ALPHA:
- g_value_set_uint (value, rint (window->background_alpha * 100.00));
- break;
+ case PROP_BACKGROUND_ALPHA:
+ g_value_set_uint (value, rint (window->background_alpha * 100.00));
+ break;
- case PROP_BORDERS:
- g_value_set_uint (value, priv->borders);
- break;
+ case PROP_BORDERS:
+ g_value_set_uint (value, priv->borders);
+ break;
- case PROP_ACTIVE:
- g_value_set_boolean (value, !!(priv->active_timeout_id != 0));
- break;
+ case PROP_ACTIVE:
+ g_value_set_boolean (value, !!(priv->active_timeout_id != 0));
+ break;
- case PROP_COMPOSITED:
- g_value_set_boolean (value, window->is_composited);
- break;
+ case PROP_COMPOSITED:
+ g_value_set_boolean (value, window->is_composited);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -232,62 +232,62 @@ panel_base_window_set_property (GObject *object,
switch (prop_id)
{
- case PROP_ENTER_OPACITY:
- /* set the new enter opacity */
- priv->enter_opacity = g_value_get_uint (value) / 100.00;
- break;
-
- case PROP_LEAVE_OPACITY:
- /* set the new leave opacity */
- priv->leave_opacity = g_value_get_uint (value) / 100.00;
- if (window->is_composited)
- gtk_window_set_opacity (GTK_WINDOW (object), priv->leave_opacity);
- break;
-
- case PROP_BACKGROUND_ALPHA:
- /* set the new background alpha */
- window->background_alpha = g_value_get_uint (value) / 100.00;
- if (window->is_composited)
- gtk_widget_queue_draw (GTK_WIDGET (object));
-
- /* send the new background alpha to the external plugins */
- itembar = gtk_bin_get_child (GTK_BIN (window));
- if (G_LIKELY (itembar != NULL))
- gtk_container_foreach (GTK_CONTAINER (itembar),
- panel_base_window_set_plugin_background_alpha, window);
- break;
-
- case PROP_BORDERS:
- /* set new window borders and redraw the widget */
- panel_base_window_set_borders (PANEL_BASE_WINDOW (object),
- g_value_get_uint (value));
- break;
-
- case PROP_ACTIVE:
- if (g_value_get_boolean (value))
- {
- if (priv->active_timeout_id == 0)
- {
- /* start timeout for the marching ants selection */
- priv->active_timeout_id = g_timeout_add_seconds_full (
- G_PRIORITY_DEFAULT_IDLE, 1,
- panel_base_window_active_timeout, object,
- panel_base_window_active_timeout_destroyed);
- }
- }
- else if (priv->active_timeout_id != 0)
- {
- /* stop timeout */
- g_source_remove (priv->active_timeout_id);
- }
-
- /* queue a draw for first second */
- gtk_widget_queue_resize (GTK_WIDGET (object));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_ENTER_OPACITY:
+ /* set the new enter opacity */
+ priv->enter_opacity = g_value_get_uint (value) / 100.00;
+ break;
+
+ case PROP_LEAVE_OPACITY:
+ /* set the new leave opacity */
+ priv->leave_opacity = g_value_get_uint (value) / 100.00;
+ if (window->is_composited)
+ gtk_window_set_opacity (GTK_WINDOW (object), priv->leave_opacity);
+ break;
+
+ case PROP_BACKGROUND_ALPHA:
+ /* set the new background alpha */
+ window->background_alpha = g_value_get_uint (value) / 100.00;
+ if (window->is_composited)
+ gtk_widget_queue_draw (GTK_WIDGET (object));
+
+ /* send the new background alpha to the external plugins */
+ itembar = gtk_bin_get_child (GTK_BIN (window));
+ if (G_LIKELY (itembar != NULL))
+ gtk_container_foreach (GTK_CONTAINER (itembar),
+ panel_base_window_set_plugin_background_alpha, window);
+ break;
+
+ case PROP_BORDERS:
+ /* set new window borders and redraw the widget */
+ panel_base_window_set_borders (PANEL_BASE_WINDOW (object),
+ g_value_get_uint (value));
+ break;
+
+ case PROP_ACTIVE:
+ if (g_value_get_boolean (value))
+ {
+ if (priv->active_timeout_id == 0)
+ {
+ /* start timeout for the marching ants selection */
+ priv->active_timeout_id = g_timeout_add_seconds_full (
+ G_PRIORITY_DEFAULT_IDLE, 1,
+ panel_base_window_active_timeout, object,
+ panel_base_window_active_timeout_destroyed);
+ }
+ }
+ else if (priv->active_timeout_id != 0)
+ {
+ /* stop timeout */
+ g_source_remove (priv->active_timeout_id);
+ }
+
+ /* queue a draw for first second */
+ gtk_widget_queue_resize (GTK_WIDGET (object));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
diff --git a/panel/panel-itembar.c b/panel/panel-itembar.c
index 358b00a..1136740 100644
--- a/panel/panel-itembar.c
+++ b/panel/panel-itembar.c
@@ -219,17 +219,17 @@ panel_itembar_set_property (GObject *object,
switch (prop_id)
{
- case PROP_HORIZONTAL:
- itembar->horizontal = g_value_get_boolean (value);
- break;
+ case PROP_HORIZONTAL:
+ itembar->horizontal = g_value_get_boolean (value);
+ break;
- case PROP_SIZE:
- itembar->size = g_value_get_uint (value);
- break;
+ case PROP_SIZE:
+ itembar->size = g_value_get_uint (value);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
gtk_widget_queue_resize (GTK_WIDGET (itembar));
@@ -245,9 +245,9 @@ panel_itembar_get_property (GObject *object,
{
switch (prop_id)
{
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -640,23 +640,23 @@ panel_itembar_set_child_property (GtkContainer *container,
switch (prop_id)
{
- case CHILD_PROP_EXPAND:
- boolean = g_value_get_boolean (value);
- if (child->expand == boolean)
- return;
- child->expand = boolean;
- break;
-
- case CHILD_PROP_WRAP:
- boolean = g_value_get_boolean (value);
- if (child->wrap == boolean)
- return;
- child->wrap = boolean;
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (container, prop_id, pspec);
- break;
+ case CHILD_PROP_EXPAND:
+ boolean = g_value_get_boolean (value);
+ if (child->expand == boolean)
+ return;
+ child->expand = boolean;
+ break;
+
+ case CHILD_PROP_WRAP:
+ boolean = g_value_get_boolean (value);
+ if (child->wrap == boolean)
+ return;
+ child->wrap = boolean;
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (container, prop_id, pspec);
+ break;
}
gtk_widget_queue_resize (GTK_WIDGET (container));
@@ -679,17 +679,17 @@ panel_itembar_get_child_property (GtkContainer *container,
switch (prop_id)
{
- case CHILD_PROP_EXPAND:
- g_value_set_boolean (value, child->expand);
- break;
+ case CHILD_PROP_EXPAND:
+ g_value_set_boolean (value, child->expand);
+ break;
- case CHILD_PROP_WRAP:
- g_value_set_boolean (value, child->wrap);
- break;
+ case CHILD_PROP_WRAP:
+ g_value_set_boolean (value, child->wrap);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (container, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (container, prop_id, pspec);
+ break;
}
}
diff --git a/panel/panel-module.c b/panel/panel-module.c
index fdf849e..778044a 100644
--- a/panel/panel-module.c
+++ b/panel/panel-module.c
@@ -404,51 +404,51 @@ panel_module_new_plugin (PanelModule *module,
switch (module->mode)
{
- case INTERNAL:
- if (g_type_module_use (G_TYPE_MODULE (module)))
- {
- if (module->plugin_type != G_TYPE_NONE)
- {
- /* plugin is build as an object, to use its gtype */
- plugin = g_object_new (module->plugin_type,
- "name", panel_module_get_name (module),
- "unique-id", unique_id,
- "display-name", module->display_name,
- "comment", module->comment,
- "arguments", arguments,
- NULL);
- }
- else if (module->construct_func != NULL)
- {
- /* create plugin using the 'old style' construct function */
- plugin = (*module->construct_func) (panel_module_get_name (module),
- unique_id,
- module->display_name,
- module->comment,
- arguments,
- screen);
- }
-
- if (G_LIKELY (plugin != NULL))
- break;
- else
- g_type_module_unuse (G_TYPE_MODULE (module));
- }
-
- /* fall-through (make wrapper plugin), probably a plugin with
- * preinit_func which is not supported for internal plugins */
-
- case WRAPPER:
- plugin = panel_plugin_external_new (module, unique_id, arguments);
- break;
-
- case EXTERNAL_46:
- plugin = panel_plugin_external_46_new (module, unique_id, arguments);
- break;
-
- default:
- panel_assert_not_reached ();
- break;
+ case INTERNAL:
+ if (g_type_module_use (G_TYPE_MODULE (module)))
+ {
+ if (module->plugin_type != G_TYPE_NONE)
+ {
+ /* plugin is build as an object, to use its gtype */
+ plugin = g_object_new (module->plugin_type,
+ "name", panel_module_get_name (module),
+ "unique-id", unique_id,
+ "display-name", module->display_name,
+ "comment", module->comment,
+ "arguments", arguments,
+ NULL);
+ }
+ else if (module->construct_func != NULL)
+ {
+ /* create plugin using the 'old style' construct function */
+ plugin = (*module->construct_func) (panel_module_get_name (module),
+ unique_id,
+ module->display_name,
+ module->comment,
+ arguments,
+ screen);
+ }
+
+ if (G_LIKELY (plugin != NULL))
+ break;
+ else
+ g_type_module_unuse (G_TYPE_MODULE (module));
+ }
+
+ /* fall-through (make wrapper plugin), probably a plugin with
+ * preinit_func which is not supported for internal plugins */
+
+ case WRAPPER:
+ plugin = panel_plugin_external_new (module, unique_id, arguments);
+ break;
+
+ case EXTERNAL_46:
+ plugin = panel_plugin_external_46_new (module, unique_id, arguments);
+ break;
+
+ default:
+ panel_assert_not_reached ();
+ break;
}
if (G_LIKELY (plugin != NULL))
diff --git a/panel/panel-plugin-external-46.c b/panel/panel-plugin-external-46.c
index b1a7c55..7efbebd 100644
--- a/panel/panel-plugin-external-46.c
+++ b/panel/panel-plugin-external-46.c
@@ -281,21 +281,21 @@ panel_plugin_external_46_get_property (GObject *object,
switch (prop_id)
{
- case PROP_UNIQUE_ID:
- g_value_set_int (value, external->unique_id);
- break;
+ case PROP_UNIQUE_ID:
+ g_value_set_int (value, external->unique_id);
+ break;
- case PROP_ARGUMENTS:
- g_value_set_boxed (value, external->arguments);
- break;
+ case PROP_ARGUMENTS:
+ g_value_set_boxed (value, external->arguments);
+ break;
- case PROP_MODULE:
- g_value_set_object (value, external->module);
- break;
+ case PROP_MODULE:
+ g_value_set_object (value, external->module);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -311,21 +311,21 @@ panel_plugin_external_46_set_property (GObject *object,
switch (prop_id)
{
- case PROP_UNIQUE_ID:
- external->unique_id = g_value_get_int (value);
- break;
+ case PROP_UNIQUE_ID:
+ external->unique_id = g_value_get_int (value);
+ break;
- case PROP_ARGUMENTS:
- external->arguments = g_value_dup_boxed (value);
- break;
+ case PROP_ARGUMENTS:
+ external->arguments = g_value_dup_boxed (value);
+ break;
- case PROP_MODULE:
- external->module = g_value_dup_object (value);
- break;
+ case PROP_MODULE:
+ external->module = g_value_dup_object (value);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -409,19 +409,19 @@ panel_plugin_external_46_client_event (GtkWidget *widget,
switch (provider_signal)
{
- case PROVIDER_SIGNAL_SHOW_CONFIGURE:
- external->show_configure = TRUE;
- break;
-
- case PROVIDER_SIGNAL_SHOW_ABOUT:
- external->show_about = TRUE;
- break;
-
- default:
- /* other signals are handled in panel-applications.c */
- xfce_panel_plugin_provider_emit_signal (XFCE_PANEL_PLUGIN_PROVIDER (external),
- provider_signal);
- break;
+ case PROVIDER_SIGNAL_SHOW_CONFIGURE:
+ external->show_configure = TRUE;
+ break;
+
+ case PROVIDER_SIGNAL_SHOW_ABOUT:
+ external->show_about = TRUE;
+ break;
+
+ default:
+ /* other signals are handled in panel-applications.c */
+ xfce_panel_plugin_provider_emit_signal (XFCE_PANEL_PLUGIN_PROVIDER (external),
+ provider_signal);
+ break;
}
return FALSE;
@@ -768,15 +768,15 @@ panel_plugin_external_46_child_watch (GPid pid,
/* extract our return value from the status */
switch (WEXITSTATUS (status))
{
- case PLUGIN_EXIT_SUCCESS:
- case PLUGIN_EXIT_FAILURE:
- case PLUGIN_EXIT_PREINIT_FAILED:
- case PLUGIN_EXIT_CHECK_FAILED:
- case PLUGIN_EXIT_NO_PROVIDER:
- /* wait until everything is settled, then destroy the
- * external plugin so it is removed from the configuration */
- exo_gtk_object_destroy_later (GTK_OBJECT (external));
- break;
+ case PLUGIN_EXIT_SUCCESS:
+ case PLUGIN_EXIT_FAILURE:
+ case PLUGIN_EXIT_PREINIT_FAILED:
+ case PLUGIN_EXIT_CHECK_FAILED:
+ case PLUGIN_EXIT_NO_PROVIDER:
+ /* wait until everything is settled, then destroy the
+ * external plugin so it is removed from the configuration */
+ exo_gtk_object_destroy_later (GTK_OBJECT (external));
+ break;
}
}
diff --git a/panel/panel-plugin-external.c b/panel/panel-plugin-external.c
index 9a74ad7..fa680ba 100644
--- a/panel/panel-plugin-external.c
+++ b/panel/panel-plugin-external.c
@@ -348,21 +348,21 @@ panel_plugin_external_get_property (GObject *object,
switch (prop_id)
{
- case PROP_UNIQUE_ID:
- g_value_set_int (value, external->unique_id);
- break;
+ case PROP_UNIQUE_ID:
+ g_value_set_int (value, external->unique_id);
+ break;
- case PROP_ARGUMENTS:
- g_value_set_boxed (value, external->arguments);
- break;
+ case PROP_ARGUMENTS:
+ g_value_set_boxed (value, external->arguments);
+ break;
- case PROP_MODULE:
- g_value_set_object (value, external->module);
- break;
+ case PROP_MODULE:
+ g_value_set_object (value, external->module);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -378,21 +378,21 @@ panel_plugin_external_set_property (GObject *object,
switch (prop_id)
{
- case PROP_UNIQUE_ID:
- external->unique_id = g_value_get_int (value);
- break;
+ case PROP_UNIQUE_ID:
+ external->unique_id = g_value_get_int (value);
+ break;
- case PROP_ARGUMENTS:
- external->arguments = g_value_dup_boxed (value);
- break;
+ case PROP_ARGUMENTS:
+ external->arguments = g_value_dup_boxed (value);
+ break;
- case PROP_MODULE:
- external->module = g_value_dup_object (value);
- break;
+ case PROP_MODULE:
+ external->module = g_value_dup_object (value);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -576,19 +576,19 @@ panel_plugin_external_dbus_provider_signal (PanelPluginExternal *exte
switch (provider_signal)
{
- case PROVIDER_SIGNAL_SHOW_CONFIGURE:
- external->show_configure = TRUE;
- break;
-
- case PROVIDER_SIGNAL_SHOW_ABOUT:
- external->show_about = TRUE;
- break;
-
- default:
- /* other signals are handled in panel-applications.c */
- xfce_panel_plugin_provider_emit_signal (XFCE_PANEL_PLUGIN_PROVIDER (external),
- provider_signal);
- break;
+ case PROVIDER_SIGNAL_SHOW_CONFIGURE:
+ external->show_configure = TRUE;
+ break;
+
+ case PROVIDER_SIGNAL_SHOW_ABOUT:
+ external->show_about = TRUE;
+ break;
+
+ default:
+ /* other signals are handled in panel-applications.c */
+ xfce_panel_plugin_provider_emit_signal (XFCE_PANEL_PLUGIN_PROVIDER (external),
+ provider_signal);
+ break;
}
return TRUE;
@@ -887,15 +887,15 @@ panel_plugin_external_child_watch (GPid pid,
/* extract our return value from the status */
switch (WEXITSTATUS (status))
{
- case PLUGIN_EXIT_SUCCESS:
- case PLUGIN_EXIT_FAILURE:
- case PLUGIN_EXIT_PREINIT_FAILED:
- case PLUGIN_EXIT_CHECK_FAILED:
- case PLUGIN_EXIT_NO_PROVIDER:
- /* wait until everything is settled, then destroy the
- * external plugin so it is removed from the configuration */
- exo_gtk_object_destroy_later (GTK_OBJECT (external));
- break;
+ case PLUGIN_EXIT_SUCCESS:
+ case PLUGIN_EXIT_FAILURE:
+ case PLUGIN_EXIT_PREINIT_FAILED:
+ case PLUGIN_EXIT_CHECK_FAILED:
+ case PLUGIN_EXIT_NO_PROVIDER:
+ /* wait until everything is settled, then destroy the
+ * external plugin so it is removed from the configuration */
+ exo_gtk_object_destroy_later (GTK_OBJECT (external));
+ break;
}
}
diff --git a/panel/panel-window.c b/panel/panel-window.c
index 941ba33..4bfad54 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -441,49 +441,49 @@ panel_window_get_property (GObject *object,
switch (prop_id)
{
- case PROP_HORIZONTAL:
- g_value_set_boolean (value, window->horizontal);
- break;
-
- case PROP_SIZE:
- g_value_set_uint (value, window->size);
- break;
-
- case PROP_LENGTH:
- g_value_set_uint (value, rint (window->length * 100.00));
- break;
-
- case PROP_LOCKED:
- g_value_set_boolean (value, window->locked);
- break;
-
- case PROP_AUTOHIDE:
- g_value_set_boolean (value, !!(window->autohide_state != AUTOHIDE_DISABLED));
- break;
-
- case PROP_SPAN_MONITORS:
- g_value_set_boolean (value, window->span_monitors);
- break;
-
- case PROP_OUTPUT_NAME:
- g_value_set_static_string (value, window->output_name);
- break;
-
- case PROP_POSITION:
- position = g_strdup_printf ("p=%d;x=%d;y=%d",
- window->snap_position,
- window->base_x,
- window->base_y);
- g_value_take_string (value, position);
- break;
-
- case PROP_DISABLE_STRUTS:
- g_value_set_boolean (value, window->struts_disabled);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_HORIZONTAL:
+ g_value_set_boolean (value, window->horizontal);
+ break;
+
+ case PROP_SIZE:
+ g_value_set_uint (value, window->size);
+ break;
+
+ case PROP_LENGTH:
+ g_value_set_uint (value, rint (window->length * 100.00));
+ break;
+
+ case PROP_LOCKED:
+ g_value_set_boolean (value, window->locked);
+ break;
+
+ case PROP_AUTOHIDE:
+ g_value_set_boolean (value, !!(window->autohide_state != AUTOHIDE_DISABLED));
+ break;
+
+ case PROP_SPAN_MONITORS:
+ g_value_set_boolean (value, window->span_monitors);
+ break;
+
+ case PROP_OUTPUT_NAME:
+ g_value_set_static_string (value, window->output_name);
+ break;
+
+ case PROP_POSITION:
+ position = g_strdup_printf ("p=%d;x=%d;y=%d",
+ window->snap_position,
+ window->base_x,
+ window->base_y);
+ g_value_take_string (value, position);
+ break;
+
+ case PROP_DISABLE_STRUTS:
+ g_value_set_boolean (value, window->struts_disabled);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -506,120 +506,120 @@ panel_window_set_property (GObject *object,
switch (prop_id)
{
- case PROP_HORIZONTAL:
- val_bool = g_value_get_boolean (value);
- if (window->horizontal != val_bool)
- {
- window->horizontal = !!val_bool;
- panel_window_screen_layout_changed (window->screen, window);
- }
+ case PROP_HORIZONTAL:
+ val_bool = g_value_get_boolean (value);
+ if (window->horizontal != val_bool)
+ {
+ window->horizontal = !!val_bool;
+ panel_window_screen_layout_changed (window->screen, window);
+ }
- /* send the new orientation to the panel plugins */
- itembar = gtk_bin_get_child (GTK_BIN (window));
- if (G_LIKELY (itembar != NULL))
- gtk_container_foreach (GTK_CONTAINER (itembar),
- panel_window_set_plugin_orientation, window);
-
- /* send the new screen position */
- if (G_LIKELY (itembar != NULL))
- gtk_container_foreach (GTK_CONTAINER (itembar),
- panel_window_set_plugin_screen_position, window);
- break;
-
- case PROP_SIZE:
- val_uint = g_value_get_uint (value);
- if (window->size != val_uint)
- {
- window->size = val_uint;
- gtk_widget_queue_resize (GTK_WIDGET (window));
- }
+ /* send the new orientation to the panel plugins */
+ itembar = gtk_bin_get_child (GTK_BIN (window));
+ if (G_LIKELY (itembar != NULL))
+ gtk_container_foreach (GTK_CONTAINER (itembar),
+ panel_window_set_plugin_orientation, window);
+
+ /* send the new screen position */
+ if (G_LIKELY (itembar != NULL))
+ gtk_container_foreach (GTK_CONTAINER (itembar),
+ panel_window_set_plugin_screen_position, window);
+ break;
+
+ case PROP_SIZE:
+ val_uint = g_value_get_uint (value);
+ if (window->size != val_uint)
+ {
+ window->size = val_uint;
+ gtk_widget_queue_resize (GTK_WIDGET (window));
+ }
- /* send the new size to the panel plugins */
- itembar = gtk_bin_get_child (GTK_BIN (window));
- if (G_LIKELY (itembar != NULL))
- gtk_container_foreach (GTK_CONTAINER (itembar),
- panel_window_set_plugin_size, window);
- break;
+ /* send the new size to the panel plugins */
+ itembar = gtk_bin_get_child (GTK_BIN (window));
+ if (G_LIKELY (itembar != NULL))
+ gtk_container_foreach (GTK_CONTAINER (itembar),
+ panel_window_set_plugin_size, window);
+ break;
- case PROP_LENGTH:
- val_double = g_value_get_uint (value) / 100.00;
- if (window->length != val_double)
- {
- if (window->length == 1.00 || val_double == 1.00)
- update = TRUE;
+ case PROP_LENGTH:
+ val_double = g_value_get_uint (value) / 100.00;
+ if (window->length != val_double)
+ {
+ if (window->length == 1.00 || val_double == 1.00)
+ update = TRUE;
- window->length = val_double;
+ window->length = val_double;
- if (update)
- panel_window_screen_update_borders (window);
+ if (update)
+ panel_window_screen_update_borders (window);
- gtk_widget_queue_resize (GTK_WIDGET (window));
- }
- break;
+ gtk_widget_queue_resize (GTK_WIDGET (window));
+ }
+ break;
- case PROP_LOCKED:
- val_bool = g_value_get_boolean (value);
- if (window->locked != val_bool)
- {
- window->locked = !!val_bool;
- gtk_widget_queue_resize (GTK_WIDGET (window));
- }
- break;
+ case PROP_LOCKED:
+ val_bool = g_value_get_boolean (value);
+ if (window->locked != val_bool)
+ {
+ window->locked = !!val_bool;
+ gtk_widget_queue_resize (GTK_WIDGET (window));
+ }
+ break;
- case PROP_AUTOHIDE:
- panel_window_set_autohide (window, g_value_get_boolean (value));
- break;
+ case PROP_AUTOHIDE:
+ panel_window_set_autohide (window, g_value_get_boolean (value));
+ break;
- case PROP_SPAN_MONITORS:
- val_bool = g_value_get_boolean (value);
- if (window->span_monitors == val_bool)
- {
- window->span_monitors = !!val_bool;
- panel_window_screen_layout_changed (window->screen, window);
- }
- break;
-
- case PROP_OUTPUT_NAME:
- g_free (window->output_name);
- window->output_name = g_value_dup_string (value);
- panel_window_screen_layout_changed (window->screen, window);
- break;
-
- case PROP_POSITION:
- val_string = g_value_get_string (value);
- if (!exo_str_is_empty (val_string)
- && sscanf (val_string, "p=%d;x=%d;y=%d", &snap_position, &x, &y) == 3)
- {
- window->snap_position = CLAMP (snap_position, SNAP_POSITION_NONE, SNAP_POSITION_S);
- window->base_x = x;
- window->base_y = y;
+ case PROP_SPAN_MONITORS:
+ val_bool = g_value_get_boolean (value);
+ if (window->span_monitors == val_bool)
+ {
+ window->span_monitors = !!val_bool;
+ panel_window_screen_layout_changed (window->screen, window);
+ }
+ break;
- panel_window_screen_layout_changed (window->screen, window);
+ case PROP_OUTPUT_NAME:
+ g_free (window->output_name);
+ window->output_name = g_value_dup_string (value);
+ panel_window_screen_layout_changed (window->screen, window);
+ break;
- /* send the new screen position to the panel plugins */
- itembar = gtk_bin_get_child (GTK_BIN (window));
- if (G_LIKELY (itembar != NULL))
- gtk_container_foreach (GTK_CONTAINER (itembar),
- panel_window_set_plugin_screen_position, window);
- }
- else
- {
- g_message ("no valid position defined");
- }
- break;
+ case PROP_POSITION:
+ val_string = g_value_get_string (value);
+ if (!exo_str_is_empty (val_string)
+ && sscanf (val_string, "p=%d;x=%d;y=%d", &snap_position, &x, &y) == 3)
+ {
+ window->snap_position = CLAMP (snap_position, SNAP_POSITION_NONE, SNAP_POSITION_S);
+ window->base_x = x;
+ window->base_y = y;
- case PROP_DISABLE_STRUTS:
- val_bool = g_value_get_boolean (value);
- if (val_bool != window->struts_disabled)
- {
- window->struts_disabled = val_bool;
- panel_window_screen_layout_changed (window->screen, window);
- }
- break;
+ panel_window_screen_layout_changed (window->screen, window);
+
+ /* send the new screen position to the panel plugins */
+ itembar = gtk_bin_get_child (GTK_BIN (window));
+ if (G_LIKELY (itembar != NULL))
+ gtk_container_foreach (GTK_CONTAINER (itembar),
+ panel_window_set_plugin_screen_position, window);
+ }
+ else
+ {
+ g_message ("no valid position defined");
+ }
+ break;
+
+ case PROP_DISABLE_STRUTS:
+ val_bool = g_value_get_boolean (value);
+ if (val_bool != window->struts_disabled)
+ {
+ window->struts_disabled = val_bool;
+ panel_window_screen_layout_changed (window->screen, window);
+ }
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -1141,71 +1141,71 @@ panel_window_size_allocate_set_xy (PanelWindow *window,
/* x-position */
switch (window->snap_position)
{
- case SNAP_POSITION_NONE:
- case SNAP_POSITION_N:
- case SNAP_POSITION_S:
- /* clamp base point on screen */
- value = window->base_x - (window_width / 2);
- hight = window->area.x + window->area.width - window_width;
- *return_x = CLAMP (value, window->area.x, hight);
- break;
-
- case SNAP_POSITION_W:
- case SNAP_POSITION_NW:
- case SNAP_POSITION_WC:
- case SNAP_POSITION_SW:
- /* left */
- *return_x = window->area.x;
- break;
-
- case SNAP_POSITION_E:
- case SNAP_POSITION_NE:
- case SNAP_POSITION_EC:
- case SNAP_POSITION_SE:
- /* right */
- *return_x = window->area.x + window->area.width - window_width;
- break;
-
- case SNAP_POSITION_NC:
- case SNAP_POSITION_SC:
- /* center */
- *return_x = window->area.x + (window->area.width - window_width) / 2;
- break;
+ case SNAP_POSITION_NONE:
+ case SNAP_POSITION_N:
+ case SNAP_POSITION_S:
+ /* clamp base point on screen */
+ value = window->base_x - (window_width / 2);
+ hight = window->area.x + window->area.width - window_width;
+ *return_x = CLAMP (value, window->area.x, hight);
+ break;
+
+ case SNAP_POSITION_W:
+ case SNAP_POSITION_NW:
+ case SNAP_POSITION_WC:
+ case SNAP_POSITION_SW:
+ /* left */
+ *return_x = window->area.x;
+ break;
+
+ case SNAP_POSITION_E:
+ case SNAP_POSITION_NE:
+ case SNAP_POSITION_EC:
+ case SNAP_POSITION_SE:
+ /* right */
+ *return_x = window->area.x + window->area.width - window_width;
+ break;
+
+ case SNAP_POSITION_NC:
+ case SNAP_POSITION_SC:
+ /* center */
+ *return_x = window->area.x + (window->area.width - window_width) / 2;
+ break;
}
/* y-position */
switch (window->snap_position)
{
- case SNAP_POSITION_NONE:
- case SNAP_POSITION_E:
- case SNAP_POSITION_W:
- /* clamp base point on screen */
- value = window->base_y - (window_height / 2);
- hight = window->area.y + window->area.height - window_height;
- *return_y = CLAMP (value, window->area.y, hight);
- break;
-
- case SNAP_POSITION_NE:
- case SNAP_POSITION_NW:
- case SNAP_POSITION_NC:
- case SNAP_POSITION_N:
- /* top */
- *return_y = window->area.y;
- break;
-
- case SNAP_POSITION_SE:
- case SNAP_POSITION_SW:
- case SNAP_POSITION_SC:
- case SNAP_POSITION_S:
- /* bottom */
- *return_y = window->area.y + window->area.height - window_height;
- break;
-
- case SNAP_POSITION_EC:
- case SNAP_POSITION_WC:
- /* center */
- *return_y = window->area.y + (window->area.height - window_height) / 2;
- break;
+ case SNAP_POSITION_NONE:
+ case SNAP_POSITION_E:
+ case SNAP_POSITION_W:
+ /* clamp base point on screen */
+ value = window->base_y - (window_height / 2);
+ hight = window->area.y + window->area.height - window_height;
+ *return_y = CLAMP (value, window->area.y, hight);
+ break;
+
+ case SNAP_POSITION_NE:
+ case SNAP_POSITION_NW:
+ case SNAP_POSITION_NC:
+ case SNAP_POSITION_N:
+ /* top */
+ *return_y = window->area.y;
+ break;
+
+ case SNAP_POSITION_SE:
+ case SNAP_POSITION_SW:
+ case SNAP_POSITION_SC:
+ case SNAP_POSITION_S:
+ /* bottom */
+ *return_y = window->area.y + window->area.height - window_height;
+ break;
+
+ case SNAP_POSITION_EC:
+ case SNAP_POSITION_WC:
+ /* center */
+ *return_y = window->area.y + (window->area.height - window_height) / 2;
+ break;
}
}
@@ -1280,36 +1280,36 @@ panel_window_screen_struts_edge (PanelWindow *window)
* visually snapped and where the struts are set */
switch (window->snap_position)
{
- case SNAP_POSITION_NONE:
- return STRUTS_EDGE_NONE;
+ case SNAP_POSITION_NONE:
+ return STRUTS_EDGE_NONE;
- case SNAP_POSITION_E:
- case SNAP_POSITION_EC:
- return window->horizontal ? STRUTS_EDGE_NONE : STRUTS_EDGE_RIGHT;
+ case SNAP_POSITION_E:
+ case SNAP_POSITION_EC:
+ return window->horizontal ? STRUTS_EDGE_NONE : STRUTS_EDGE_RIGHT;
- case SNAP_POSITION_NE:
- return window->horizontal ? STRUTS_EDGE_TOP : STRUTS_EDGE_RIGHT;
+ case SNAP_POSITION_NE:
+ return window->horizontal ? STRUTS_EDGE_TOP : STRUTS_EDGE_RIGHT;
- case SNAP_POSITION_SE:
- return window->horizontal ? STRUTS_EDGE_BOTTOM : STRUTS_EDGE_RIGHT;
+ case SNAP_POSITION_SE:
+ return window->horizontal ? STRUTS_EDGE_BOTTOM : STRUTS_EDGE_RIGHT;
- case SNAP_POSITION_W:
- case SNAP_POSITION_WC:
- return window->horizontal ? STRUTS_EDGE_NONE : STRUTS_EDGE_LEFT;
+ case SNAP_POSITION_W:
+ case SNAP_POSITION_WC:
+ return window->horizontal ? STRUTS_EDGE_NONE : STRUTS_EDGE_LEFT;
- case SNAP_POSITION_NW:
- return window->horizontal ? STRUTS_EDGE_TOP : STRUTS_EDGE_LEFT;
+ case SNAP_POSITION_NW:
+ return window->horizontal ? STRUTS_EDGE_TOP : STRUTS_EDGE_LEFT;
- case SNAP_POSITION_SW:
- return window->horizontal ? STRUTS_EDGE_BOTTOM : STRUTS_EDGE_LEFT;
+ case SNAP_POSITION_SW:
+ return window->horizontal ? STRUTS_EDGE_BOTTOM : STRUTS_EDGE_LEFT;
- case SNAP_POSITION_NC:
- case SNAP_POSITION_N:
- return window->horizontal ? STRUTS_EDGE_TOP : STRUTS_EDGE_NONE;
+ case SNAP_POSITION_NC:
+ case SNAP_POSITION_N:
+ return window->horizontal ? STRUTS_EDGE_TOP : STRUTS_EDGE_NONE;
- case SNAP_POSITION_SC:
- case SNAP_POSITION_S:
- return window->horizontal ? STRUTS_EDGE_BOTTOM : STRUTS_EDGE_NONE;
+ case SNAP_POSITION_SC:
+ case SNAP_POSITION_S:
+ return window->horizontal ? STRUTS_EDGE_BOTTOM : STRUTS_EDGE_NONE;
}
return STRUTS_EDGE_NONE;
@@ -1457,44 +1457,44 @@ panel_window_screen_update_borders (PanelWindow *window)
/* the border we want to hide */
switch (window->snap_position)
{
- case SNAP_POSITION_NONE:
- break;
-
- case SNAP_POSITION_E:
- case SNAP_POSITION_EC:
- unset_borders = PANEL_BORDER_RIGHT;
- break;
-
- case SNAP_POSITION_W:
- case SNAP_POSITION_WC:
- unset_borders = PANEL_BORDER_LEFT;
- break;
-
- case SNAP_POSITION_N:
- case SNAP_POSITION_NC:
- unset_borders = PANEL_BORDER_TOP;
- break;
-
- case SNAP_POSITION_S:
- case SNAP_POSITION_SC:
- unset_borders = PANEL_BORDER_BOTTOM;
- break;
-
- case SNAP_POSITION_NE:
- unset_borders = PANEL_BORDER_RIGHT | PANEL_BORDER_TOP;
- break;
-
- case SNAP_POSITION_SE:
- unset_borders = PANEL_BORDER_RIGHT | PANEL_BORDER_BOTTOM;
- break;
-
- case SNAP_POSITION_NW:
- unset_borders = PANEL_BORDER_LEFT | PANEL_BORDER_TOP;
- break;
-
- case SNAP_POSITION_SW:
- unset_borders = PANEL_BORDER_LEFT | PANEL_BORDER_BOTTOM;
- break;
+ case SNAP_POSITION_NONE:
+ break;
+
+ case SNAP_POSITION_E:
+ case SNAP_POSITION_EC:
+ unset_borders = PANEL_BORDER_RIGHT;
+ break;
+
+ case SNAP_POSITION_W:
+ case SNAP_POSITION_WC:
+ unset_borders = PANEL_BORDER_LEFT;
+ break;
+
+ case SNAP_POSITION_N:
+ case SNAP_POSITION_NC:
+ unset_borders = PANEL_BORDER_TOP;
+ break;
+
+ case SNAP_POSITION_S:
+ case SNAP_POSITION_SC:
+ unset_borders = PANEL_BORDER_BOTTOM;
+ break;
+
+ case SNAP_POSITION_NE:
+ unset_borders = PANEL_BORDER_RIGHT | PANEL_BORDER_TOP;
+ break;
+
+ case SNAP_POSITION_SE:
+ unset_borders = PANEL_BORDER_RIGHT | PANEL_BORDER_BOTTOM;
+ break;
+
+ case SNAP_POSITION_NW:
+ unset_borders = PANEL_BORDER_LEFT | PANEL_BORDER_TOP;
+ break;
+
+ case SNAP_POSITION_SW:
+ unset_borders = PANEL_BORDER_LEFT | PANEL_BORDER_BOTTOM;
+ break;
}
/* the visible borders */
@@ -2142,58 +2142,58 @@ panel_window_set_plugin_screen_position (GtkWidget *widget,
switch (window->snap_position)
{
- case SNAP_POSITION_NONE:
- position = window->horizontal ? XFCE_SCREEN_POSITION_FLOATING_H :
- XFCE_SCREEN_POSITION_FLOATING_V;
- break;
-
- case SNAP_POSITION_NW:
- position = window->horizontal ? XFCE_SCREEN_POSITION_NW_H :
- XFCE_SCREEN_POSITION_NW_V;
- break;
-
- case SNAP_POSITION_NE:
- position = window->horizontal ? XFCE_SCREEN_POSITION_NE_H :
- XFCE_SCREEN_POSITION_NE_V;
- break;
-
- case SNAP_POSITION_SW:
- position = window->horizontal ? XFCE_SCREEN_POSITION_SW_H :
- XFCE_SCREEN_POSITION_SW_V;
- break;
-
- case SNAP_POSITION_SE:
- position = window->horizontal ? XFCE_SCREEN_POSITION_SE_H :
- XFCE_SCREEN_POSITION_SE_V;
- break;
-
- case SNAP_POSITION_W:
- case SNAP_POSITION_WC:
- position = window->horizontal ? XFCE_SCREEN_POSITION_FLOATING_H :
- XFCE_SCREEN_POSITION_W;
- break;
-
- case SNAP_POSITION_E:
- case SNAP_POSITION_EC:
- position = window->horizontal ? XFCE_SCREEN_POSITION_FLOATING_H :
- XFCE_SCREEN_POSITION_E;
- break;
-
- case SNAP_POSITION_S:
- case SNAP_POSITION_SC:
- position = window->horizontal ? XFCE_SCREEN_POSITION_S :
- XFCE_SCREEN_POSITION_FLOATING_V;
- break;
-
- case SNAP_POSITION_N:
- case SNAP_POSITION_NC:
- position = window->horizontal ? XFCE_SCREEN_POSITION_N :
- XFCE_SCREEN_POSITION_FLOATING_V;
- break;
-
- default:
- panel_assert_not_reached ();
- break;
+ case SNAP_POSITION_NONE:
+ position = window->horizontal ? XFCE_SCREEN_POSITION_FLOATING_H :
+ XFCE_SCREEN_POSITION_FLOATING_V;
+ break;
+
+ case SNAP_POSITION_NW:
+ position = window->horizontal ? XFCE_SCREEN_POSITION_NW_H :
+ XFCE_SCREEN_POSITION_NW_V;
+ break;
+
+ case SNAP_POSITION_NE:
+ position = window->horizontal ? XFCE_SCREEN_POSITION_NE_H :
+ XFCE_SCREEN_POSITION_NE_V;
+ break;
+
+ case SNAP_POSITION_SW:
+ position = window->horizontal ? XFCE_SCREEN_POSITION_SW_H :
+ XFCE_SCREEN_POSITION_SW_V;
+ break;
+
+ case SNAP_POSITION_SE:
+ position = window->horizontal ? XFCE_SCREEN_POSITION_SE_H :
+ XFCE_SCREEN_POSITION_SE_V;
+ break;
+
+ case SNAP_POSITION_W:
+ case SNAP_POSITION_WC:
+ position = window->horizontal ? XFCE_SCREEN_POSITION_FLOATING_H :
+ XFCE_SCREEN_POSITION_W;
+ break;
+
+ case SNAP_POSITION_E:
+ case SNAP_POSITION_EC:
+ position = window->horizontal ? XFCE_SCREEN_POSITION_FLOATING_H :
+ XFCE_SCREEN_POSITION_E;
+ break;
+
+ case SNAP_POSITION_S:
+ case SNAP_POSITION_SC:
+ position = window->horizontal ? XFCE_SCREEN_POSITION_S :
+ XFCE_SCREEN_POSITION_FLOATING_V;
+ break;
+
+ case SNAP_POSITION_N:
+ case SNAP_POSITION_NC:
+ position = window->horizontal ? XFCE_SCREEN_POSITION_N :
+ XFCE_SCREEN_POSITION_FLOATING_V;
+ break;
+
+ default:
+ panel_assert_not_reached ();
+ break;
}
xfce_panel_plugin_provider_set_screen_position (XFCE_PANEL_PLUGIN_PROVIDER (widget),
diff --git a/plugins/actions/actions.c b/plugins/actions/actions.c
index 8f13f90..ced4bdc 100644
--- a/plugins/actions/actions.c
+++ b/plugins/actions/actions.c
@@ -206,17 +206,17 @@ actions_plugin_get_property (GObject *object,
switch (prop_id)
{
- case PROP_FIRST_ACTION:
- g_value_set_uint (value, plugin->first_action - 1);
- break;
+ case PROP_FIRST_ACTION:
+ g_value_set_uint (value, plugin->first_action - 1);
+ break;
- case PROP_SECOND_ACTION:
- g_value_set_uint (value, plugin->second_action);
- break;
+ case PROP_SECOND_ACTION:
+ g_value_set_uint (value, plugin->second_action);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -233,44 +233,44 @@ actions_plugin_set_property (GObject *object,
switch (prop_id)
{
- case PROP_FIRST_ACTION:
- /* set new value and update icon */
- action = plugin->first_action = g_value_get_uint (value) + 1;
- gtk_widget_set_tooltip_text (plugin->first_button,
- _(action_entries[action].title));
- xfce_panel_image_set_from_source (
- XFCE_PANEL_IMAGE (plugin->first_image),
- action_entries[action].icon_name);
- break;
-
- case PROP_SECOND_ACTION:
- /* set new value */
- action = plugin->second_action = g_value_get_uint (value);
-
- /* update button visibility and icon */
- if (action == ACTION_DISABLED)
- {
- gtk_widget_hide (plugin->second_button);
- }
- else
- {
- gtk_widget_show (plugin->second_button);
- gtk_widget_set_tooltip_text (plugin->second_button,
- _(action_entries[action].title));
- xfce_panel_image_set_from_source (
- XFCE_PANEL_IMAGE (plugin->second_image),
- action_entries[action].icon_name);
- }
-
- /* update plugin size */
- actions_plugin_size_changed (XFCE_PANEL_PLUGIN (plugin),
- xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin)));
-
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_FIRST_ACTION:
+ /* set new value and update icon */
+ action = plugin->first_action = g_value_get_uint (value) + 1;
+ gtk_widget_set_tooltip_text (plugin->first_button,
+ _(action_entries[action].title));
+ xfce_panel_image_set_from_source (
+ XFCE_PANEL_IMAGE (plugin->first_image),
+ action_entries[action].icon_name);
+ break;
+
+ case PROP_SECOND_ACTION:
+ /* set new value */
+ action = plugin->second_action = g_value_get_uint (value);
+
+ /* update button visibility and icon */
+ if (action == ACTION_DISABLED)
+ {
+ gtk_widget_hide (plugin->second_button);
+ }
+ else
+ {
+ gtk_widget_show (plugin->second_button);
+ gtk_widget_set_tooltip_text (plugin->second_button,
+ _(action_entries[action].title));
+ xfce_panel_image_set_from_source (
+ XFCE_PANEL_IMAGE (plugin->second_image),
+ action_entries[action].icon_name);
+ }
+
+ /* update plugin size */
+ actions_plugin_size_changed (XFCE_PANEL_PLUGIN (plugin),
+ xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin)));
+
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
diff --git a/plugins/clock/clock-analog.c b/plugins/clock/clock-analog.c
index dd3cf41..cb39a44 100644
--- a/plugins/clock/clock-analog.c
+++ b/plugins/clock/clock-analog.c
@@ -139,13 +139,13 @@ xfce_clock_analog_set_property (GObject *object,
switch (prop_id)
{
- case PROP_SHOW_SECONDS:
- analog->show_seconds = g_value_get_boolean (value);
- break;
+ case PROP_SHOW_SECONDS:
+ analog->show_seconds = g_value_get_boolean (value);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
/* reschedule the timeout and redraw */
@@ -166,13 +166,13 @@ xfce_clock_analog_get_property (GObject *object,
switch (prop_id)
{
- case PROP_SHOW_SECONDS:
- g_value_set_boolean (value, analog->show_seconds);
- break;
+ case PROP_SHOW_SECONDS:
+ g_value_set_boolean (value, analog->show_seconds);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
diff --git a/plugins/clock/clock-binary.c b/plugins/clock/clock-binary.c
index 2f92d67..46ac351 100644
--- a/plugins/clock/clock-binary.c
+++ b/plugins/clock/clock-binary.c
@@ -139,17 +139,17 @@ xfce_clock_binary_set_property (GObject *object,
switch (prop_id)
{
- case PROP_SHOW_SECONDS:
- binary->show_seconds = g_value_get_boolean (value);
- break;
+ case PROP_SHOW_SECONDS:
+ binary->show_seconds = g_value_get_boolean (value);
+ break;
- case PROP_TRUE_BINARY:
- binary->true_binary = g_value_get_boolean (value);
- break;
+ case PROP_TRUE_BINARY:
+ binary->true_binary = g_value_get_boolean (value);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
/* reschedule the timeout and resize */
@@ -170,17 +170,17 @@ xfce_clock_binary_get_property (GObject *object,
switch (prop_id)
{
- case PROP_SHOW_SECONDS:
- g_value_set_boolean (value, binary->show_seconds);
- break;
+ case PROP_SHOW_SECONDS:
+ g_value_set_boolean (value, binary->show_seconds);
+ break;
- case PROP_TRUE_BINARY:
- g_value_set_boolean (value, binary->true_binary);
- break;
+ case PROP_TRUE_BINARY:
+ g_value_set_boolean (value, binary->true_binary);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
diff --git a/plugins/clock/clock-digital.c b/plugins/clock/clock-digital.c
index c5827b1..6ff8d45 100644
--- a/plugins/clock/clock-digital.c
+++ b/plugins/clock/clock-digital.c
@@ -113,14 +113,14 @@ xfce_clock_digital_set_property (GObject *object,
switch (prop_id)
{
- case PROP_DIGITAL_FORMAT:
- g_free (digital->format);
- digital->format = g_value_dup_string (value);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_DIGITAL_FORMAT:
+ g_free (digital->format);
+ digital->format = g_value_dup_string (value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
/* reschedule the timeout and redraw */
@@ -141,13 +141,13 @@ xfce_clock_digital_get_property (GObject *object,
switch (prop_id)
{
- case PROP_DIGITAL_FORMAT:
- g_value_set_string (value, digital->format);
- break;
+ case PROP_DIGITAL_FORMAT:
+ g_value_set_string (value, digital->format);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
diff --git a/plugins/clock/clock-fuzzy.c b/plugins/clock/clock-fuzzy.c
index 11019ca..61dddac 100644
--- a/plugins/clock/clock-fuzzy.c
+++ b/plugins/clock/clock-fuzzy.c
@@ -155,18 +155,18 @@ xfce_clock_fuzzy_set_property (GObject *object,
switch (prop_id)
{
- case PROP_FUZZINESS:
- fuzziness = g_value_get_uint (value);
- if (G_LIKELY (fuzzy->fuzziness != fuzziness))
- {
- fuzzy->fuzziness = fuzziness;
- xfce_clock_fuzzy_update (fuzzy);
- }
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_FUZZINESS:
+ fuzziness = g_value_get_uint (value);
+ if (G_LIKELY (fuzzy->fuzziness != fuzziness))
+ {
+ fuzzy->fuzziness = fuzziness;
+ xfce_clock_fuzzy_update (fuzzy);
+ }
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -182,13 +182,13 @@ xfce_clock_fuzzy_get_property (GObject *object,
switch (prop_id)
{
- case PROP_FUZZINESS:
- g_value_set_uint (value, fuzzy->fuzziness);
- break;
+ case PROP_FUZZINESS:
+ g_value_set_uint (value, fuzzy->fuzziness);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
diff --git a/plugins/clock/clock-lcd.c b/plugins/clock/clock-lcd.c
index 1fca0a3..16711cf 100644
--- a/plugins/clock/clock-lcd.c
+++ b/plugins/clock/clock-lcd.c
@@ -177,25 +177,25 @@ xfce_clock_lcd_set_property (GObject *object,
switch (prop_id)
{
- case PROP_SHOW_SECONDS:
- lcd->show_seconds = g_value_get_boolean (value);
- break;
+ case PROP_SHOW_SECONDS:
+ lcd->show_seconds = g_value_get_boolean (value);
+ break;
- case PROP_SHOW_MILITARY:
- lcd->show_military = g_value_get_boolean (value);
- break;
+ case PROP_SHOW_MILITARY:
+ lcd->show_military = g_value_get_boolean (value);
+ break;
- case PROP_SHOW_MERIDIEM:
- lcd->show_meridiem = g_value_get_boolean (value);
- break;
+ case PROP_SHOW_MERIDIEM:
+ lcd->show_meridiem = g_value_get_boolean (value);
+ break;
- case PROP_FLASH_SEPARATORS:
- lcd->flash_separators = g_value_get_boolean (value);
- break;
+ case PROP_FLASH_SEPARATORS:
+ lcd->flash_separators = g_value_get_boolean (value);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
/* reschedule the timeout and resize */
@@ -217,25 +217,25 @@ xfce_clock_lcd_get_property (GObject *object,
switch (prop_id)
{
- case PROP_SHOW_SECONDS:
- g_value_set_boolean (value, lcd->show_seconds);
- break;
+ case PROP_SHOW_SECONDS:
+ g_value_set_boolean (value, lcd->show_seconds);
+ break;
- case PROP_SHOW_MILITARY:
- g_value_set_boolean (value, lcd->show_military);
- break;
+ case PROP_SHOW_MILITARY:
+ g_value_set_boolean (value, lcd->show_military);
+ break;
- case PROP_SHOW_MERIDIEM:
- g_value_set_boolean (value, lcd->show_meridiem);
- break;
+ case PROP_SHOW_MERIDIEM:
+ g_value_set_boolean (value, lcd->show_meridiem);
+ break;
- case PROP_FLASH_SEPARATORS:
- g_value_set_boolean (value, lcd->flash_separators);
- break;
+ case PROP_FLASH_SEPARATORS:
+ g_value_set_boolean (value, lcd->flash_separators);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
diff --git a/plugins/clock/clock.c b/plugins/clock/clock.c
index 98ef10c..732333c 100644
--- a/plugins/clock/clock.c
+++ b/plugins/clock/clock.c
@@ -243,21 +243,21 @@ clock_plugin_get_property (GObject *object,
switch (prop_id)
{
- case PROP_MODE:
- g_value_set_uint (value, plugin->mode);
- break;
+ case PROP_MODE:
+ g_value_set_uint (value, plugin->mode);
+ break;
- case PROP_SHOW_FRAME:
- g_value_set_boolean (value, plugin->show_frame);
- break;
+ case PROP_SHOW_FRAME:
+ g_value_set_boolean (value, plugin->show_frame);
+ break;
- case PROP_TOOLTIP_FORMAT:
- g_value_set_string (value, plugin->tooltip_format);
- break;
+ case PROP_TOOLTIP_FORMAT:
+ g_value_set_string (value, plugin->tooltip_format);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -274,32 +274,32 @@ clock_plugin_set_property (GObject *object,
switch (prop_id)
{
- case PROP_MODE:
- if (plugin->mode != g_value_get_uint (value))
- {
- plugin->mode = g_value_get_uint (value);
- clock_plugin_set_mode (plugin);
- }
- break;
-
- case PROP_SHOW_FRAME:
- show_frame = g_value_get_boolean (value);
- if (plugin->show_frame != show_frame)
- {
- plugin->show_frame = show_frame;
- gtk_frame_set_shadow_type (GTK_FRAME (plugin->frame),
- show_frame ? GTK_SHADOW_ETCHED_IN : GTK_SHADOW_NONE);
- }
- break;
-
- case PROP_TOOLTIP_FORMAT:
- g_free (plugin->tooltip_format);
- plugin->tooltip_format = g_value_dup_string (value);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_MODE:
+ if (plugin->mode != g_value_get_uint (value))
+ {
+ plugin->mode = g_value_get_uint (value);
+ clock_plugin_set_mode (plugin);
+ }
+ break;
+
+ case PROP_SHOW_FRAME:
+ show_frame = g_value_get_boolean (value);
+ if (plugin->show_frame != show_frame)
+ {
+ plugin->show_frame = show_frame;
+ gtk_frame_set_shadow_type (GTK_FRAME (plugin->frame),
+ show_frame ? GTK_SHADOW_ETCHED_IN : GTK_SHADOW_NONE);
+ }
+ break;
+
+ case PROP_TOOLTIP_FORMAT:
+ g_free (plugin->tooltip_format);
+ plugin->tooltip_format = g_value_dup_string (value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -450,30 +450,30 @@ clock_plugin_configure_plugin_mode_changed (GtkComboBox *combo,
mode = gtk_combo_box_get_active (combo);
switch (mode)
{
- case CLOCK_PLUGIN_MODE_ANALOG:
- active = 1 << 1;
- break;
-
- case CLOCK_PLUGIN_MODE_BINARY:
- active = 1 << 1 | 1 << 2;
- break;
-
- case CLOCK_PLUGIN_MODE_DIGITAL:
- active = 1 << 6;
- break;
-
- case CLOCK_PLUGIN_MODE_FUZZY:
- active = 1 << 7;
- break;
-
- case CLOCK_PLUGIN_MODE_LCD:
- active = 1 << 1 | 1 << 3 | 1 << 4 | 1 << 5;
- break;
-
- default:
- panel_assert_not_reached ();
- active = 0;
- break;
+ case CLOCK_PLUGIN_MODE_ANALOG:
+ active = 1 << 1;
+ break;
+
+ case CLOCK_PLUGIN_MODE_BINARY:
+ active = 1 << 1 | 1 << 2;
+ break;
+
+ case CLOCK_PLUGIN_MODE_DIGITAL:
+ active = 1 << 6;
+ break;
+
+ case CLOCK_PLUGIN_MODE_FUZZY:
+ active = 1 << 7;
+ break;
+
+ case CLOCK_PLUGIN_MODE_LCD:
+ active = 1 << 1 | 1 << 3 | 1 << 4 | 1 << 5;
+ break;
+
+ default:
+ panel_assert_not_reached ();
+ active = 0;
+ break;
}
/* show or hide the dialog widgets */
@@ -975,14 +975,14 @@ clock_plugin_interval_from_format (const gchar *format)
{
switch (*++p)
{
- case 'c':
- case 'N':
- case 'r':
- case 's':
- case 'S':
- case 'T':
- case 'X':
- return CLOCK_INTERVAL_SECOND;
+ case 'c':
+ case 'N':
+ case 'r':
+ case 's':
+ case 'S':
+ case 'T':
+ case 'X':
+ return CLOCK_INTERVAL_SECOND;
}
}
}
diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 08a7a4d..090f57d 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -413,44 +413,44 @@ launcher_plugin_get_property (GObject *object,
switch (prop_id)
{
- case PROP_ITEMS:
- array = g_ptr_array_new ();
- for (li = plugin->items; li != NULL; li = li->next)
- {
- tmp = g_new0 (GValue, 1);
- g_value_init (tmp, G_TYPE_STRING);
- panel_return_if_fail (GARCON_IS_MENU_ITEM (li->data));
- item_file = garcon_menu_item_get_file (li->data);
- if (g_file_has_prefix (item_file, plugin->config_directory))
- g_value_take_string (tmp, g_file_get_basename (item_file));
- else
- g_value_take_string (tmp, g_file_get_uri (item_file));
- g_object_unref (G_OBJECT (item_file));
- g_ptr_array_add (array, tmp);
- }
- g_value_set_boxed (value, array);
- xfconf_array_free (array);
- break;
-
- case PROP_DISABLE_TOOLTIPS:
- g_value_set_boolean (value, plugin->disable_tooltips);
- break;
-
- case PROP_MOVE_FIRST:
- g_value_set_boolean (value, plugin->move_first);
- break;
-
- case PROP_SHOW_LABEL:
- g_value_set_boolean (value, plugin->show_label);
- break;
-
- case PROP_ARROW_POSITION:
- g_value_set_uint (value, plugin->arrow_position);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_ITEMS:
+ array = g_ptr_array_new ();
+ for (li = plugin->items; li != NULL; li = li->next)
+ {
+ tmp = g_new0 (GValue, 1);
+ g_value_init (tmp, G_TYPE_STRING);
+ panel_return_if_fail (GARCON_IS_MENU_ITEM (li->data));
+ item_file = garcon_menu_item_get_file (li->data);
+ if (g_file_has_prefix (item_file, plugin->config_directory))
+ g_value_take_string (tmp, g_file_get_basename (item_file));
+ else
+ g_value_take_string (tmp, g_file_get_uri (item_file));
+ g_object_unref (G_OBJECT (item_file));
+ g_ptr_array_add (array, tmp);
+ }
+ g_value_set_boxed (value, array);
+ xfconf_array_free (array);
+ break;
+
+ case PROP_DISABLE_TOOLTIPS:
+ g_value_set_boolean (value, plugin->disable_tooltips);
+ break;
+
+ case PROP_MOVE_FIRST:
+ g_value_set_boolean (value, plugin->move_first);
+ break;
+
+ case PROP_SHOW_LABEL:
+ g_value_set_boolean (value, plugin->show_label);
+ break;
+
+ case PROP_ARROW_POSITION:
+ g_value_set_uint (value, plugin->arrow_position);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -740,74 +740,74 @@ launcher_plugin_set_property (GObject *object,
switch (prop_id)
{
- case PROP_ITEMS:
- /* load new items from the array */
- array = g_value_get_boxed (value);
- if (G_LIKELY (array != NULL))
- launcher_plugin_items_load (plugin, array);
- else
- launcher_plugin_items_free (plugin->items);
-
- /* emit signal */
- g_signal_emit (G_OBJECT (plugin), launcher_signals[ITEMS_CHANGED], 0);
-
- /* update the button */
- launcher_plugin_button_update (plugin);
+ case PROP_ITEMS:
+ /* load new items from the array */
+ array = g_value_get_boxed (value);
+ if (G_LIKELY (array != NULL))
+ launcher_plugin_items_load (plugin, array);
+ else
+ launcher_plugin_items_free (plugin->items);
- /* update the widget packing */
- goto update_arrow;
- break;
+ /* emit signal */
+ g_signal_emit (G_OBJECT (plugin), launcher_signals[ITEMS_CHANGED], 0);
- case PROP_DISABLE_TOOLTIPS:
- plugin->disable_tooltips = g_value_get_boolean (value);
- gtk_widget_set_has_tooltip (plugin->button, !plugin->disable_tooltips);
- break;
+ /* update the button */
+ launcher_plugin_button_update (plugin);
- case PROP_MOVE_FIRST:
- plugin->move_first = g_value_get_boolean (value);
- break;
+ /* update the widget packing */
+ goto update_arrow;
+ break;
- case PROP_SHOW_LABEL:
- plugin->show_label = g_value_get_boolean (value);
+ case PROP_DISABLE_TOOLTIPS:
+ plugin->disable_tooltips = g_value_get_boolean (value);
+ gtk_widget_set_has_tooltip (plugin->button, !plugin->disable_tooltips);
+ break;
- /* destroy the old child */
- if (plugin->child != NULL)
- gtk_widget_destroy (plugin->child);
+ case PROP_MOVE_FIRST:
+ plugin->move_first = g_value_get_boolean (value);
+ break;
- /* create child */
- if (G_UNLIKELY (plugin->show_label))
- plugin->child = gtk_label_new (NULL);
- else
- plugin->child = xfce_panel_image_new ();
- gtk_container_add (GTK_CONTAINER (plugin->button), plugin->child);
- gtk_widget_show (plugin->child);
+ case PROP_SHOW_LABEL:
+ plugin->show_label = g_value_get_boolean (value);
- /* update size */
- launcher_plugin_size_changed (XFCE_PANEL_PLUGIN (plugin),
- xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin)));
+ /* destroy the old child */
+ if (plugin->child != NULL)
+ gtk_widget_destroy (plugin->child);
- /* update the button */
- launcher_plugin_button_update (plugin);
- break;
+ /* create child */
+ if (G_UNLIKELY (plugin->show_label))
+ plugin->child = gtk_label_new (NULL);
+ else
+ plugin->child = xfce_panel_image_new ();
+ gtk_container_add (GTK_CONTAINER (plugin->button), plugin->child);
+ gtk_widget_show (plugin->child);
+
+ /* update size */
+ launcher_plugin_size_changed (XFCE_PANEL_PLUGIN (plugin),
+ xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin)));
+
+ /* update the button */
+ launcher_plugin_button_update (plugin);
+ break;
- case PROP_ARROW_POSITION:
- plugin->arrow_position = g_value_get_uint (value);
+ case PROP_ARROW_POSITION:
+ plugin->arrow_position = g_value_get_uint (value);
update_arrow:
- /* update the arrow button visibility */
- launcher_plugin_arrow_visibility (plugin);
+ /* update the arrow button visibility */
+ launcher_plugin_arrow_visibility (plugin);
- /* repack the widgets */
- launcher_plugin_pack_widgets (plugin);
+ /* repack the widgets */
+ launcher_plugin_pack_widgets (plugin);
- /* update the plugin size */
- launcher_plugin_size_changed (XFCE_PANEL_PLUGIN (plugin),
- xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin)));
- break;
+ /* update the plugin size */
+ launcher_plugin_size_changed (XFCE_PANEL_PLUGIN (plugin),
+ xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin)));
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -1176,24 +1176,24 @@ launcher_plugin_size_changed (XfcePanelPlugin *panel_plugin,
switch (plugin->arrow_position)
{
- case LAUNCHER_ARROW_NORTH:
- case LAUNCHER_ARROW_SOUTH:
- a_height = ARROW_BUTTON_SIZE;
-
- if (horizontal)
- p_width -= ARROW_BUTTON_SIZE;
- else
- p_height += ARROW_BUTTON_SIZE;
- break;
-
- default:
- a_width = ARROW_BUTTON_SIZE;
-
- if (horizontal)
- p_width += ARROW_BUTTON_SIZE;
- else
- p_height -= ARROW_BUTTON_SIZE;
- break;
+ case LAUNCHER_ARROW_NORTH:
+ case LAUNCHER_ARROW_SOUTH:
+ a_height = ARROW_BUTTON_SIZE;
+
+ if (horizontal)
+ p_width -= ARROW_BUTTON_SIZE;
+ else
+ p_height += ARROW_BUTTON_SIZE;
+ break;
+
+ default:
+ a_width = ARROW_BUTTON_SIZE;
+
+ if (horizontal)
+ p_width += ARROW_BUTTON_SIZE;
+ else
+ p_height -= ARROW_BUTTON_SIZE;
+ break;
}
/* set the arrow size */
@@ -1857,25 +1857,25 @@ launcher_plugin_button_expose_event (GtkWidget *widget,
/* calculate the position based on the arrow type */
switch (arrow_type)
{
- case GTK_ARROW_UP:
- /* north east */
- x += widget->allocation.width - offset;
- break;
-
- case GTK_ARROW_DOWN:
- /* south west */
- y += widget->allocation.height - offset;
- break;
-
- case GTK_ARROW_RIGHT:
- /* south east */
- x += widget->allocation.width - offset;
- y += widget->allocation.height - offset;
- break;
-
- default:
- /* north west */
- break;
+ case GTK_ARROW_UP:
+ /* north east */
+ x += widget->allocation.width - offset;
+ break;
+
+ case GTK_ARROW_DOWN:
+ /* south west */
+ y += widget->allocation.height - offset;
+ break;
+
+ case GTK_ARROW_RIGHT:
+ /* south east */
+ x += widget->allocation.width - offset;
+ y += widget->allocation.height - offset;
+ break;
+
+ default:
+ /* north west */
+ break;
}
/* paint the arrow */
@@ -2246,62 +2246,62 @@ launcher_plugin_exec_parse (GarconMenuItem *item,
{
switch (*++p)
{
- case 'f':
- case 'F':
- for (li = uri_list; li != NULL; li = li->next)
- {
- filename = g_filename_from_uri ((const gchar *) li->data,
- NULL, NULL);
- if (G_LIKELY (filename != NULL))
- launcher_plugin_exec_append_quoted (string, filename);
- g_free (filename);
-
- if (*p == 'f')
- break;
- if (li->next != NULL)
- g_string_append_c (string, ' ');
- }
- break;
-
- case 'u':
- case 'U':
- for (li = uri_list; li != NULL; li = li->next)
- {
- launcher_plugin_exec_append_quoted (string, (const gchar *)
- li->data);
-
- if (*p == 'u')
- break;
- if (li->next != NULL)
- g_string_append_c (string, ' ');
- }
- break;
-
- case 'i':
- tmp = garcon_menu_item_get_icon_name (item);
- if (!exo_str_is_empty (tmp))
- {
- g_string_append (string, "--icon ");
- launcher_plugin_exec_append_quoted (string, tmp);
- }
- break;
-
- case 'c':
- tmp = garcon_menu_item_get_name (item);
- if (!exo_str_is_empty (tmp))
+ case 'f':
+ case 'F':
+ for (li = uri_list; li != NULL; li = li->next)
+ {
+ filename = g_filename_from_uri ((const gchar *) li->data,
+ NULL, NULL);
+ if (G_LIKELY (filename != NULL))
+ launcher_plugin_exec_append_quoted (string, filename);
+ g_free (filename);
+
+ if (*p == 'f')
+ break;
+ if (li->next != NULL)
+ g_string_append_c (string, ' ');
+ }
+ break;
+
+ case 'u':
+ case 'U':
+ for (li = uri_list; li != NULL; li = li->next)
+ {
+ launcher_plugin_exec_append_quoted (string, (const gchar *)
+ li->data);
+
+ if (*p == 'u')
+ break;
+ if (li->next != NULL)
+ g_string_append_c (string, ' ');
+ }
+ break;
+
+ case 'i':
+ tmp = garcon_menu_item_get_icon_name (item);
+ if (!exo_str_is_empty (tmp))
+ {
+ g_string_append (string, "--icon ");
launcher_plugin_exec_append_quoted (string, tmp);
- break;
-
- case 'k':
- uri = garcon_menu_item_get_uri (item);
- if (!exo_str_is_empty (uri))
- launcher_plugin_exec_append_quoted (string, uri);
- g_free (uri);
- break;
-
- case '%':
- g_string_append_c (string, '%');
- break;
+ }
+ break;
+
+ case 'c':
+ tmp = garcon_menu_item_get_name (item);
+ if (!exo_str_is_empty (tmp))
+ launcher_plugin_exec_append_quoted (string, tmp);
+ break;
+
+ case 'k':
+ uri = garcon_menu_item_get_uri (item);
+ if (!exo_str_is_empty (uri))
+ launcher_plugin_exec_append_quoted (string, uri);
+ g_free (uri);
+ break;
+
+ case '%':
+ g_string_append_c (string, '%');
+ break;
}
}
else
diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c
index df824ff..c3c6f59 100644
--- a/plugins/pager/pager.c
+++ b/plugins/pager/pager.c
@@ -159,21 +159,21 @@ pager_plugin_get_property (GObject *object,
switch (prop_id)
{
- case PROP_WORKSPACE_SCROLLING:
- g_value_set_boolean (value, plugin->scrolling);
- break;
+ case PROP_WORKSPACE_SCROLLING:
+ g_value_set_boolean (value, plugin->scrolling);
+ break;
- case PROP_SHOW_NAMES:
- g_value_set_boolean (value, plugin->show_names);
- break;
+ case PROP_SHOW_NAMES:
+ g_value_set_boolean (value, plugin->show_names);
+ break;
- case PROP_ROWS:
- g_value_set_uint (value, plugin->rows);
- break;
+ case PROP_ROWS:
+ g_value_set_uint (value, plugin->rows);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -189,30 +189,30 @@ pager_plugin_set_property (GObject *object,
switch (prop_id)
{
- case PROP_WORKSPACE_SCROLLING:
- plugin->scrolling = g_value_get_boolean (value);
- break;
-
- case PROP_SHOW_NAMES:
- plugin->show_names = g_value_get_boolean (value);
-
- if (plugin->wnck_pager != NULL)
- wnck_pager_set_display_mode (WNCK_PAGER (plugin->wnck_pager),
- plugin->show_names ?
- WNCK_PAGER_DISPLAY_NAME :
- WNCK_PAGER_DISPLAY_CONTENT);
- break;
-
- case PROP_ROWS:
- plugin->rows = g_value_get_uint (value);
-
- if (plugin->wnck_pager != NULL)
- wnck_pager_set_n_rows (WNCK_PAGER (plugin->wnck_pager), plugin->rows);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_WORKSPACE_SCROLLING:
+ plugin->scrolling = g_value_get_boolean (value);
+ break;
+
+ case PROP_SHOW_NAMES:
+ plugin->show_names = g_value_get_boolean (value);
+
+ if (plugin->wnck_pager != NULL)
+ wnck_pager_set_display_mode (WNCK_PAGER (plugin->wnck_pager),
+ plugin->show_names ?
+ WNCK_PAGER_DISPLAY_NAME :
+ WNCK_PAGER_DISPLAY_CONTENT);
+ break;
+
+ case PROP_ROWS:
+ plugin->rows = g_value_get_uint (value);
+
+ if (plugin->wnck_pager != NULL)
+ wnck_pager_set_n_rows (WNCK_PAGER (plugin->wnck_pager), plugin->rows);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -235,10 +235,21 @@ pager_plugin_scroll_event (GtkWidget *widget,
/* translate the gdk scroll direction into a wnck motion direction */
switch (event->direction)
{
- case GDK_SCROLL_UP: direction = WNCK_MOTION_UP; break;
- case GDK_SCROLL_DOWN: direction = WNCK_MOTION_DOWN; break;
- case GDK_SCROLL_LEFT: direction = WNCK_MOTION_LEFT; break;
- default: direction = WNCK_MOTION_RIGHT; break;
+ case GDK_SCROLL_UP:
+ direction = WNCK_MOTION_UP;
+ break;
+
+ case GDK_SCROLL_DOWN:
+ direction = WNCK_MOTION_DOWN;
+ break;
+
+ case GDK_SCROLL_LEFT:
+ direction = WNCK_MOTION_LEFT;
+ break;
+
+ default:
+ direction = WNCK_MOTION_RIGHT;
+ break;
}
/* get the active workspace's neighbor */
diff --git a/plugins/separator/separator.c b/plugins/separator/separator.c
index 0b975b7..0ca8e75 100644
--- a/plugins/separator/separator.c
+++ b/plugins/separator/separator.c
@@ -170,18 +170,18 @@ separator_plugin_get_property (GObject *object,
switch (prop_id)
{
- case PROP_STYLE:
- g_value_set_uint (value, plugin->style);
- break;
-
- case PROP_EXPAND:
- expand = xfce_panel_plugin_get_expand (XFCE_PANEL_PLUGIN (plugin));
- g_value_set_boolean (value, expand);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_STYLE:
+ g_value_set_uint (value, plugin->style);
+ break;
+
+ case PROP_EXPAND:
+ expand = xfce_panel_plugin_get_expand (XFCE_PANEL_PLUGIN (plugin));
+ g_value_set_boolean (value, expand);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -198,23 +198,23 @@ separator_plugin_set_property (GObject *object,
switch (prop_id)
{
- case PROP_STYLE:
- plugin->style = g_value_get_uint (value);
- gtk_widget_queue_draw (GTK_WIDGET (object));
-
- wrap = plugin->style == SEPARATOR_PLUGIN_STYLE_WRAP;
- xfce_panel_plugin_provider_emit_signal (XFCE_PANEL_PLUGIN_PROVIDER (object),
- wrap ? PROVIDER_SIGNAL_WRAP_PLUGIN : PROVIDER_SIGNAL_UNWRAP_PLUGIN);
- break;
-
- case PROP_EXPAND:
- xfce_panel_plugin_set_expand (XFCE_PANEL_PLUGIN (plugin),
- g_value_get_boolean (value));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_STYLE:
+ plugin->style = g_value_get_uint (value);
+ gtk_widget_queue_draw (GTK_WIDGET (object));
+
+ wrap = plugin->style == SEPARATOR_PLUGIN_STYLE_WRAP;
+ xfce_panel_plugin_provider_emit_signal (XFCE_PANEL_PLUGIN_PROVIDER (object),
+ wrap ? PROVIDER_SIGNAL_WRAP_PLUGIN : PROVIDER_SIGNAL_UNWRAP_PLUGIN);
+ break;
+
+ case PROP_EXPAND:
+ xfce_panel_plugin_set_expand (XFCE_PANEL_PLUGIN (plugin),
+ g_value_get_boolean (value));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -235,99 +235,99 @@ separator_plugin_expose_event (GtkWidget *widget,
switch (plugin->style)
{
- case SEPARATOR_PLUGIN_STYLE_TRANSPARENT:
- case SEPARATOR_PLUGIN_STYLE_WRAP:
- /* do nothing */
- break;
-
- case SEPARATOR_PLUGIN_STYLE_SEPARATOR:
- if (xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin)) ==
- GTK_ORIENTATION_HORIZONTAL)
- {
- gtk_paint_vline (widget->style,
- widget->window,
- state,
- &(event->area),
- widget, "separator",
- alloc->y + alloc->height * SEPARATOR_OFFSET,
- alloc->y + alloc->height * (1.00 - SEPARATOR_OFFSET),
- alloc->x + alloc->width / 2 - 1);
- }
- else
- {
- gtk_paint_hline (widget->style,
- widget->window,
- state,
- &(event->area),
- widget, "separator",
- alloc->x + alloc->width * SEPARATOR_OFFSET,
- alloc->x + alloc->width * (1.00 - SEPARATOR_OFFSET),
- alloc->y + alloc->height / 2 - 1);
- }
- break;
-
- case SEPARATOR_PLUGIN_STYLE_HANDLE:
- gtk_paint_handle (widget->style,
- widget->window,
- state,
- GTK_SHADOW_NONE,
- &(event->area),
- widget, "handlebox",
- alloc->x, alloc->y,
- alloc->width,
- alloc->height,
- xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin)) ==
- GTK_ORIENTATION_HORIZONTAL ? GTK_ORIENTATION_VERTICAL
- : GTK_ORIENTATION_HORIZONTAL);
- break;
-
- case SEPARATOR_PLUGIN_STYLE_DOTS:
- if (xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin)) ==
- GTK_ORIENTATION_HORIZONTAL)
- {
- rows = MAX (alloc->height / DOTS_SIZE, 1);
- w = DOTS_SIZE;
- h = rows * DOTS_SIZE;
- }
- else
- {
- cols = MAX (alloc->width / DOTS_SIZE, 1);
- h = DOTS_SIZE;
- w = cols * DOTS_SIZE;
- }
-
- x = alloc->x + (alloc->width - w) / 2;
- y = alloc->y + (alloc->height - h) / 2;
-
- for (i = 0; i < G_N_ELEMENTS (bits); i++)
- {
- /* pick color, but be same order as bits array */
- if (i == 0)
- gc = widget->style->dark_gc[state];
- else if (i == 1)
- gc = widget->style->light_gc[state];
- else
- gc = widget->style->mid_gc[state];
-
- /* clip to drawing area */
- gdk_gc_set_clip_rectangle (gc, &(event->area));
-
- /* set the stipple for the gc */
- bmap = gdk_bitmap_create_from_data (widget->window, bits[i],
- DOTS_SIZE, DOTS_SIZE);
- gdk_gc_set_stipple (gc, bmap);
- gdk_gc_set_fill (gc, GDK_STIPPLED);
- g_object_unref (G_OBJECT (bmap));
-
- /* draw the dots */
- gdk_gc_set_ts_origin (gc, x, y);
- gdk_draw_rectangle (widget->window, gc, TRUE, x, y, w, h);
- gdk_gc_set_fill (gc, GDK_SOLID);
-
- /* unset the clip */
- gdk_gc_set_clip_rectangle (gc, NULL);
- }
- break;
+ case SEPARATOR_PLUGIN_STYLE_TRANSPARENT:
+ case SEPARATOR_PLUGIN_STYLE_WRAP:
+ /* do nothing */
+ break;
+
+ case SEPARATOR_PLUGIN_STYLE_SEPARATOR:
+ if (xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin)) ==
+ GTK_ORIENTATION_HORIZONTAL)
+ {
+ gtk_paint_vline (widget->style,
+ widget->window,
+ state,
+ &(event->area),
+ widget, "separator",
+ alloc->y + alloc->height * SEPARATOR_OFFSET,
+ alloc->y + alloc->height * (1.00 - SEPARATOR_OFFSET),
+ alloc->x + alloc->width / 2 - 1);
+ }
+ else
+ {
+ gtk_paint_hline (widget->style,
+ widget->window,
+ state,
+ &(event->area),
+ widget, "separator",
+ alloc->x + alloc->width * SEPARATOR_OFFSET,
+ alloc->x + alloc->width * (1.00 - SEPARATOR_OFFSET),
+ alloc->y + alloc->height / 2 - 1);
+ }
+ break;
+
+ case SEPARATOR_PLUGIN_STYLE_HANDLE:
+ gtk_paint_handle (widget->style,
+ widget->window,
+ state,
+ GTK_SHADOW_NONE,
+ &(event->area),
+ widget, "handlebox",
+ alloc->x, alloc->y,
+ alloc->width,
+ alloc->height,
+ xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin)) ==
+ GTK_ORIENTATION_HORIZONTAL ? GTK_ORIENTATION_VERTICAL
+ : GTK_ORIENTATION_HORIZONTAL);
+ break;
+
+ case SEPARATOR_PLUGIN_STYLE_DOTS:
+ if (xfce_panel_plugin_get_orientation (XFCE_PANEL_PLUGIN (plugin)) ==
+ GTK_ORIENTATION_HORIZONTAL)
+ {
+ rows = MAX (alloc->height / DOTS_SIZE, 1);
+ w = DOTS_SIZE;
+ h = rows * DOTS_SIZE;
+ }
+ else
+ {
+ cols = MAX (alloc->width / DOTS_SIZE, 1);
+ h = DOTS_SIZE;
+ w = cols * DOTS_SIZE;
+ }
+
+ x = alloc->x + (alloc->width - w) / 2;
+ y = alloc->y + (alloc->height - h) / 2;
+
+ for (i = 0; i < G_N_ELEMENTS (bits); i++)
+ {
+ /* pick color, but be same order as bits array */
+ if (i == 0)
+ gc = widget->style->dark_gc[state];
+ else if (i == 1)
+ gc = widget->style->light_gc[state];
+ else
+ gc = widget->style->mid_gc[state];
+
+ /* clip to drawing area */
+ gdk_gc_set_clip_rectangle (gc, &(event->area));
+
+ /* set the stipple for the gc */
+ bmap = gdk_bitmap_create_from_data (widget->window, bits[i],
+ DOTS_SIZE, DOTS_SIZE);
+ gdk_gc_set_stipple (gc, bmap);
+ gdk_gc_set_fill (gc, GDK_STIPPLED);
+ g_object_unref (G_OBJECT (bmap));
+
+ /* draw the dots */
+ gdk_gc_set_ts_origin (gc, x, y);
+ gdk_draw_rectangle (widget->window, gc, TRUE, x, y, w, h);
+ gdk_gc_set_fill (gc, GDK_SOLID);
+
+ /* unset the clip */
+ gdk_gc_set_clip_rectangle (gc, NULL);
+ }
+ break;
}
return FALSE;
diff --git a/plugins/windowmenu/windowmenu.c b/plugins/windowmenu/windowmenu.c
index bc44237..d798705 100644
--- a/plugins/windowmenu/windowmenu.c
+++ b/plugins/windowmenu/windowmenu.c
@@ -269,29 +269,29 @@ window_menu_plugin_get_property (GObject *object,
switch (prop_id)
{
- case PROP_STYLE:
- g_value_set_uint (value, plugin->button_style);
- break;
+ case PROP_STYLE:
+ g_value_set_uint (value, plugin->button_style);
+ break;
- case PROP_WORKSPACE_ACTIONS:
- g_value_set_boolean (value, plugin->workspace_actions);
- break;
+ case PROP_WORKSPACE_ACTIONS:
+ g_value_set_boolean (value, plugin->workspace_actions);
+ break;
- case PROP_WORKSPACE_NAMES:
- g_value_set_boolean (value, plugin->workspace_names);
- break;
+ case PROP_WORKSPACE_NAMES:
+ g_value_set_boolean (value, plugin->workspace_names);
+ break;
- case PROP_URGENTCY_NOTIFICATION:
- g_value_set_boolean (value, plugin->urgentcy_notification);
- break;
+ case PROP_URGENTCY_NOTIFICATION:
+ g_value_set_boolean (value, plugin->urgentcy_notification);
+ break;
- case PROP_ALL_WORKSPACES:
- g_value_set_boolean (value, plugin->all_workspaces);
- break;
+ case PROP_ALL_WORKSPACES:
+ g_value_set_boolean (value, plugin->all_workspaces);
+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -312,60 +312,60 @@ window_menu_plugin_set_property (GObject *object,
switch (prop_id)
{
- case PROP_STYLE:
- button_style = g_value_get_uint (value);
- if (plugin->button_style != button_style)
- {
- plugin->button_style = button_style;
-
- /* show or hide the icon */
- if (button_style == BUTTON_STYLE_ICON)
- gtk_widget_show (plugin->icon);
- else
- gtk_widget_hide (plugin->icon);
-
- /* update the plugin */
- window_menu_plugin_size_changed (panel_plugin,
- xfce_panel_plugin_get_size (panel_plugin));
- window_menu_plugin_screen_position_changed (panel_plugin,
- xfce_panel_plugin_get_screen_position (panel_plugin));
- window_menu_plugin_active_window_changed (plugin->screen,
- NULL, plugin);
- }
- break;
-
- case PROP_WORKSPACE_ACTIONS:
- plugin->workspace_actions = g_value_get_boolean (value);
- break;
-
- case PROP_WORKSPACE_NAMES:
- plugin->workspace_names = g_value_get_boolean (value);
- break;
-
- case PROP_URGENTCY_NOTIFICATION:
- urgentcy_notification = g_value_get_boolean (value);
- if (plugin->urgentcy_notification != urgentcy_notification)
- {
- plugin->urgentcy_notification = urgentcy_notification;
-
- if (plugin->screen != NULL)
- {
- /* (dis)connect window signals */
- if (plugin->urgentcy_notification)
- window_menu_plugin_windows_connect (plugin, TRUE);
- else
- window_menu_plugin_windows_disconnect (plugin);
- }
- }
- break;
-
- case PROP_ALL_WORKSPACES:
- plugin->all_workspaces = g_value_get_boolean (value);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_STYLE:
+ button_style = g_value_get_uint (value);
+ if (plugin->button_style != button_style)
+ {
+ plugin->button_style = button_style;
+
+ /* show or hide the icon */
+ if (button_style == BUTTON_STYLE_ICON)
+ gtk_widget_show (plugin->icon);
+ else
+ gtk_widget_hide (plugin->icon);
+
+ /* update the plugin */
+ window_menu_plugin_size_changed (panel_plugin,
+ xfce_panel_plugin_get_size (panel_plugin));
+ window_menu_plugin_screen_position_changed (panel_plugin,
+ xfce_panel_plugin_get_screen_position (panel_plugin));
+ window_menu_plugin_active_window_changed (plugin->screen,
+ NULL, plugin);
+ }
+ break;
+
+ case PROP_WORKSPACE_ACTIONS:
+ plugin->workspace_actions = g_value_get_boolean (value);
+ break;
+
+ case PROP_WORKSPACE_NAMES:
+ plugin->workspace_names = g_value_get_boolean (value);
+ break;
+
+ case PROP_URGENTCY_NOTIFICATION:
+ urgentcy_notification = g_value_get_boolean (value);
+ if (plugin->urgentcy_notification != urgentcy_notification)
+ {
+ plugin->urgentcy_notification = urgentcy_notification;
+
+ if (plugin->screen != NULL)
+ {
+ /* (dis)connect window signals */
+ if (plugin->urgentcy_notification)
+ window_menu_plugin_windows_connect (plugin, TRUE);
+ else
+ window_menu_plugin_windows_disconnect (plugin);
+ }
+ }
+ break;
+
+ case PROP_ALL_WORKSPACES:
+ plugin->all_workspaces = g_value_get_boolean (value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -1067,21 +1067,21 @@ window_menu_plugin_menu_key_press_event (GtkWidget *menu,
/* construct an event */
switch (event->keyval)
{
- case GDK_space:
- case GDK_Return:
- case GDK_KP_Space:
- case GDK_KP_Enter:
- /* active the menu item */
- fake_event.button = 1;
- break;
-
- case GDK_Menu:
- /* popup the window actions menu */
- fake_event.button = 3;
- break;
-
- default:
- return FALSE;
+ case GDK_space:
+ case GDK_Return:
+ case GDK_KP_Space:
+ case GDK_KP_Enter:
+ /* active the menu item */
+ fake_event.button = 1;
+ break;
+
+ case GDK_Menu:
+ /* popup the window actions menu */
+ fake_event.button = 3;
+ break;
+
+ default:
+ return FALSE;
}
/* popdown the menu, this will also update the active item */
More information about the Xfce4-commits
mailing list