[Xfce4-commits] <xfce4-panel:andrzejr/deskbar-libxfce4panel> xfce-panel-plugin: syncing with nick/desktop-mode branch.
Andrzej
noreply at xfce.org
Tue Dec 13 07:20:07 CET 2011
Updating branch refs/heads/andrzejr/deskbar-libxfce4panel
to 3a569ac0a6a24ed82a39b79efa038639a2871f79 (commit)
from 05fbf8c336644057581b697238a015a1bec5507c (commit)
commit 3a569ac0a6a24ed82a39b79efa038639a2871f79
Author: Andrzej <ndrwrdck at gmail.com>
Date: Tue Dec 13 14:01:47 2011 +0900
xfce-panel-plugin: syncing with nick/desktop-mode branch.
libxfce4panel/xfce-panel-plugin.c | 25 ++++++++-----------------
1 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index 423590b..80adb0f 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -1360,12 +1360,14 @@ xfce_panel_plugin_set_size (XfcePanelPluginProvider *provider,
panel_return_if_fail (XFCE_IS_PANEL_PLUGIN (provider));
- real_size = size * plugin->priv->nrows;
-
- /* check if update is required */
- if (G_LIKELY (plugin->priv->size * (gint) plugin->priv->nrows != real_size))
+ /* check if update is required, -1 for forced property emit
+ * by xfce_panel_plugin_set_nrows */
+ if (G_LIKELY (plugin->priv->size != size))
{
- plugin->priv->size = size;
+ if (size != -1)
+ plugin->priv->size = size;
+
+ real_size = plugin->priv->size * plugin->priv->nrows;
g_signal_emit (G_OBJECT (plugin),
plugin_signals[SIZE_CHANGED], 0, real_size, &handled);
@@ -1421,8 +1423,6 @@ xfce_panel_plugin_set_nrows (XfcePanelPluginProvider *provider,
guint nrows)
{
XfcePanelPlugin *plugin = XFCE_PANEL_PLUGIN (provider);
- gboolean handled = FALSE;
- gint real_size;
panel_return_if_fail (XFCE_IS_PANEL_PLUGIN (provider));
@@ -1439,16 +1439,7 @@ xfce_panel_plugin_set_nrows (XfcePanelPluginProvider *provider,
g_object_notify (G_OBJECT (plugin), "nrows");
/* also the size changed */
- real_size = plugin->priv->size * nrows;
-
- g_signal_emit (G_OBJECT (plugin),
- plugin_signals[SIZE_CHANGED], 0, real_size, &handled);
-
- /* handle the size when not done by the plugin */
- if (!handled)
- gtk_widget_set_size_request (GTK_WIDGET (plugin), real_size, real_size);
-
- g_object_notify (G_OBJECT (plugin), "size");
+ xfce_panel_plugin_set_size (provider, -1);
}
}
More information about the Xfce4-commits
mailing list