[anjal] Make tabs not reorderable. Our view assumes tabs in some order.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjal] Make tabs not reorderable. Our view assumes tabs in some order.
- Date: Tue, 2 Jun 2009 02:16:43 -0400 (EDT)
commit 2c2a8619921c0259cf20ee984ec7491d37ee96fd
Author: Srinivasa Ragavan <sragavan novell com>
Date: Mon Jun 1 22:50:07 2009 +0530
Make tabs not reorderable. Our view assumes tabs in some order.
---
src/mail-view.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/mail-view.c b/src/mail-view.c
index 8837e8b..b3675c2 100644
--- a/src/mail-view.c
+++ b/src/mail-view.c
@@ -171,6 +171,9 @@ mv_new_tab_button (MailView *shell)
gtk_widget_show (box);
shell->priv->new = box;
position = gtk_notebook_append_page (shell, box, label);
+ gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (shell), box, FALSE);
+ gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (shell), box, FALSE);
+
}
#endif
@@ -270,8 +273,10 @@ mail_view_add_folder (MailView *mv, gpointer data)
mv->priv->current_view = (MailViewChild *)mfv;
mv->priv->children = g_list_append (mv->priv->children, mfv);
position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)mfv, mfv->tab_label);
+ gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)mfv, FALSE);
+ gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)mfv, FALSE);
+
g_signal_connect (mfv, "view-close", G_CALLBACK(mv_close_mcv), mv);
- gtk_notebook_set_tab_reorderable ((GtkNotebook *)mv, (GtkWidget *)mfv, TRUE);
gtk_notebook_set_current_page ((GtkNotebook *)mv, position);
gtk_notebook_set_tab_label_packing ((GtkNotebook *)mv, (GtkWidget *)mfv, FALSE, FALSE, 0);
g_signal_connect (mfv, "message-shown", G_CALLBACK(mv_message_shown), mv);
@@ -297,7 +302,8 @@ mail_view_add_composer (MailView *mv, gpointer data)
mv->priv->children = g_list_append (mv->priv->children, mcv);
position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)mcv, mcv->tab_label);
- gtk_notebook_set_tab_reorderable ((GtkNotebook *)mv, (GtkWidget *)mcv, TRUE);
+ gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)mcv, FALSE);
+ gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)mcv, FALSE);
gtk_notebook_set_current_page ((GtkNotebook *)mv, position);
gtk_notebook_set_tab_label_packing ((GtkNotebook *)mv, (GtkWidget *)mcv, FALSE, FALSE, 0);
mail_composer_view_activate (mcv, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE);
@@ -319,7 +325,8 @@ mail_view_add_message (MailView *mv, gpointer data)
mv->priv->children = g_list_append (mv->priv->children, mcv);
position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)mcv, mail_conv_view_get_tab_widget(mcv));
- gtk_notebook_set_tab_reorderable ((GtkNotebook *)mv, (GtkWidget *)mcv, TRUE);
+ gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)mcv, FALSE);
+ gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)mcv, FALSE);
gtk_notebook_set_current_page ((GtkNotebook *)mv, position);
gtk_notebook_set_tab_label_packing ((GtkNotebook *)mv, (GtkWidget *)mcv, FALSE, FALSE, 0);
mail_conv_view_activate (mcv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE);
@@ -347,7 +354,8 @@ mail_view_add_settings (MailView *mv, gpointer data)
position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_settings_view_get_tab_widget(msv));
g_signal_connect (msv, "view-close", G_CALLBACK(mv_close_mcv), mv);
g_signal_connect (msv, "show-account", G_CALLBACK(mv_show_acc_mcv), mv);
- gtk_notebook_set_tab_reorderable ((GtkNotebook *)mv, (GtkWidget *)msv, TRUE);
+ gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, FALSE);
+ gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, FALSE);
gtk_notebook_set_current_page ((GtkNotebook *)mv, position);
gtk_notebook_set_tab_label_packing ((GtkNotebook *)mv, (GtkWidget *)msv, FALSE, FALSE, 0);
@@ -365,7 +373,8 @@ mail_view_add_account (MailView *mv, gpointer data)
mv->priv->children = g_list_append (mv->priv->children, msv);
position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_account_view_get_tab_widget(msv));
g_signal_connect_after (msv, "view-close", G_CALLBACK(mv_close_mcv), mv);
- gtk_notebook_set_tab_reorderable ((GtkNotebook *)mv, (GtkWidget *)msv, TRUE);
+ gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, FALSE);
+ gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, FALSE);
gtk_notebook_set_current_page ((GtkNotebook *)mv, position);
gtk_notebook_set_tab_label_packing ((GtkNotebook *)mv, (GtkWidget *)msv, FALSE, FALSE, 0);
mail_account_view_activate (msv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]