[Xfce4-commits] <xfce4-indicator-plugin:master> Removing some assert violations and compiler warnings.

Andrzej noreply at xfce.org
Fri Mar 23 15:40:07 CET 2012


Updating branch refs/heads/master
         to 92aa37ef3025aeffe80679e83c662b187f00cb93 (commit)
       from 7cf3a0d89e28573cfec0f2e4fd3ba23584189b46 (commit)

commit 92aa37ef3025aeffe80679e83c662b187f00cb93
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Wed Mar 21 16:05:44 2012 +0900

    Removing some assert violations and compiler warnings.

 panel-plugin/indicator-button.c |   10 +++++++---
 panel-plugin/indicator.c        |    2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/indicator-button.c b/panel-plugin/indicator-button.c
index 27adffe..9763da5 100644
--- a/panel-plugin/indicator-button.c
+++ b/panel-plugin/indicator-button.c
@@ -273,8 +273,9 @@ xfce_indicator_button_set_image (XfceIndicatorButton *button,
 
       gtk_box_pack_start (GTK_BOX (button->box), button->icon, TRUE, FALSE, 1);
       gtk_widget_show (button->icon);
+
+      xfce_indicator_button_update_layout (button);
     }
-  xfce_indicator_button_update_layout (button);
 }
 
 
@@ -412,8 +413,11 @@ xfce_indicator_button_set_size (XfceIndicatorButton *button,
       border_thickness = 2 * MAX (style->xthickness, style->ythickness) + 2;
       button->icon_size = button->size - border_thickness;
 
-      xfce_indicator_button_update_icon (button);
-      xfce_indicator_button_update_layout (button);
+      if (button->orig_icon != NULL)
+        {
+          xfce_indicator_button_update_icon (button);
+          xfce_indicator_button_update_layout (button);
+        }
     }
 }
 
diff --git a/panel-plugin/indicator.c b/panel-plugin/indicator.c
index cff5d6e..7d265f5 100644
--- a/panel-plugin/indicator.c
+++ b/panel-plugin/indicator.c
@@ -382,7 +382,7 @@ entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_d
   g_signal_connect(button, "scroll-event", G_CALLBACK(entry_scrolled),
                    user_data);
 
-  gtk_container_add(XFCE_INDICATOR_BOX (((IndicatorPlugin *)user_data)->buttonbox), button);
+  gtk_container_add(GTK_CONTAINER (((IndicatorPlugin *)user_data)->buttonbox), button);
   gtk_widget_show(button);
 }
 


More information about the Xfce4-commits mailing list