[empathy/gnome-2-30] Update the Tabs menu when a tab is moved.



commit e095c83e79fed15c8bb42edf5fc8e872e6006bcf
Author: Mike Ruprecht <mike ruprecht collabora co uk>
Date:   Sat Apr 17 03:31:04 2010 -0500

    Update the Tabs menu when a tab is moved.
    
    Previously when a tab was moved, the Tabs menu didn't update
    regarding the directions the tab could further be moved. If
    wrapping is off, a tab on the edge moved one way couldn't be
    moved back. Fixes #616012

 src/empathy-chat-window.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 192bf6d..519a3fc 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1065,7 +1065,7 @@ chat_window_tabs_left_activate_cb (GtkAction         *action,
 {
 	EmpathyChatWindowPriv *priv;
 	EmpathyChat           *chat;
-	gint                  index_;
+	gint                  index_, num_pages;
 
 	priv = GET_PRIV (window);
 
@@ -1078,6 +1078,9 @@ chat_window_tabs_left_activate_cb (GtkAction         *action,
 	gtk_notebook_reorder_child (GTK_NOTEBOOK (priv->notebook),
 				    GTK_WIDGET (chat),
 				    index_ - 1);
+
+	num_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (priv->notebook));
+	chat_window_menu_context_update (priv, num_pages);
 }
 
 static void
@@ -1086,7 +1089,7 @@ chat_window_tabs_right_activate_cb (GtkAction         *action,
 {
 	EmpathyChatWindowPriv *priv;
 	EmpathyChat           *chat;
-	gint                  index_;
+	gint                  index_, num_pages;
 
 	priv = GET_PRIV (window);
 
@@ -1096,6 +1099,9 @@ chat_window_tabs_right_activate_cb (GtkAction         *action,
 	gtk_notebook_reorder_child (GTK_NOTEBOOK (priv->notebook),
 				    GTK_WIDGET (chat),
 				    index_ + 1);
+
+	num_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (priv->notebook));
+	chat_window_menu_context_update (priv, num_pages);
 }
 
 static void



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