[gnome-panel/wip/packed-objects: 17/17] panel: Update positions of objects after removal of an object



commit 41c72eb1debcf4117b70b8e6849a592d727a2ff1
Author: Vincent Untz <vuntz gnome org>
Date:   Thu Mar 31 11:14:46 2011 +0530

    panel: Update positions of objects after removal of an object
    
    When an object is removed, this obviously changes the layout inside a
    PanelWidget, so we have to update the positions of all objects.

 gnome-panel/panel-widget.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gnome-panel/panel-widget.c b/gnome-panel/panel-widget.c
index 62c9c80..9a13f63 100644
--- a/gnome-panel/panel-widget.c
+++ b/gnome-panel/panel-widget.c
@@ -89,6 +89,8 @@ static void panel_widget_end_move           (PanelWidget      *panel);
 static gboolean panel_widget_real_focus     (GtkWidget        *widget,
                                              GtkDirectionType  direction);
 
+static void panel_widget_update_positions   (PanelWidget      *panel);
+
 /************************
  convenience functions
  ************************/
@@ -484,6 +486,8 @@ panel_widget_cremove (GtkContainer *container, GtkWidget *widget)
 	if (ad)
 		panel->applet_list = g_list_remove (panel->applet_list, ad);
 
+	panel_widget_update_positions (panel);
+
 	g_signal_emit (G_OBJECT (container),
 		       panel_widget_signals[APPLET_REMOVED_SIGNAL],
 		       0, widget);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]