From 448dd4ace0f6fe9486c53fa1eeb5bde1ecaa9fed Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 24 Nov 2005 18:12:51 +0000 Subject: [PATCH] if we have tabs in notebook, top-padding is 1 --- src/chat.py | 16 +- src/gtkgui.glade | 2050 +++++++++++++++++++++++----------------------- 2 files changed, 1053 insertions(+), 1013 deletions(-) diff --git a/src/chat.py b/src/chat.py index ca8557412..b290472a9 100644 --- a/src/chat.py +++ b/src/chat.py @@ -72,9 +72,12 @@ class Chat: self.typing_new = {} self.orig_msg = {} + # alignment before notebook (to control top padding for when showing tabs) + self.alignment = self.xml.get_widget('alignment') + # notebook customizations self.notebook = self.xml.get_widget('chat_notebook') - self.notebook.remove_page(0) + self.notebook.remove_page(0) # FIXME why?? pref_pos = gajim.config.get('tabs_position') if pref_pos != 'top': if pref_pos == 'bottom': @@ -88,7 +91,11 @@ class Chat: else: nb_pos = gtk.POS_TOP self.notebook.set_tab_pos(nb_pos) - self.notebook.set_show_tabs(gajim.config.get('tabs_always_visible')) + if gajim.config.get('tabs_always_visible'): + self.notebook.set_show_tabs(True) + self.alignment.set_property('top-padding', 1) + else: + self.notebook.set_show_tabs(False) self.notebook.set_show_border(gajim.config.get('tabs_border')) if gajim.config.get('useemoticons'): @@ -611,6 +618,10 @@ class Chat: if len(self.xmls) == 1: # we now have only one tab show_tabs_if_one_tab = gajim.config.get('tabs_always_visible') self.notebook.set_show_tabs(show_tabs_if_one_tab) + + if not show_tabs_if_one_tab: + self.alignment.set_property('top-padding', 0) + self.show_title() def bring_scroll_to_end(self, textview, diff_y = 0): @@ -737,6 +748,7 @@ class Chat: if len(self.xmls) > 1: self.notebook.set_show_tabs(True) + self.alignment.set_property('top-padding', 1) if self.widget_name == 'tabbed_chat_window': xm = gtk.glade.XML(GTKGUI_GLADE, 'chats_eventbox', APP) diff --git a/src/gtkgui.glade b/src/gtkgui.glade index ef7830d01..bde36d762 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -9106,105 +9106,144 @@ Custom - + True - False - False - GTK_POS_TOP - True - False - - + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 - - 3 - False - 0 + + True + False + False + GTK_POS_TOP + True + False + + - - True - 0.5 - 0.5 - 1 - 1 - 0 - 1 - 3 - 3 + + 3 + False + 0 - - - - 0 - False - False - - - - - - 3 - True - True - 495 - - 150 + + 3 True - False - 6 + True + 495 - + + 150 True False 6 - - 200 - 60 + True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT + False + 6 - + + 200 + 60 + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + + + + 0 + True + True + + + + + + True + True + GTK_POLICY_NEVER + GTK_POLICY_NEVER + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + + + + 0 + False + True + @@ -9213,181 +9252,47 @@ topic True + + + False + False + + + + + + 100 + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT - + + 1 True True - GTK_POLICY_NEVER - GTK_POLICY_NEVER - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - - - - 0 - False - True - - - - - 0 - True - True - - - - - False - False - - - - - - 100 - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 1 - True - True - False - False - False - True - False - False - False - - - - - - - - - - - - False - False - - - - - 0 - True - True - - - - - - 3 - True - False - 0 - - - - False - 0 - - - - - - - - Bold - True - GTK_RELIEF_NONE - False - False - False - - - - True - gtk-bold - 3 - 0.5 - 0.5 - 0 - 0 + False + False + False + True + False + False + False + + + + + + + - 0 - False - False - - - - - - Italic - True - GTK_RELIEF_NONE - False - False - False - - - - True - gtk-italic - 3 - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - - - - - - Underline - True - GTK_RELIEF_NONE - False - False - False - - - - True - gtk-underline - 3 - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False + False + False @@ -9399,137 +9304,150 @@ topic - + + 3 True False - 6 + 0 - - True - Click to insert an emoticon (Alt+E) - True - GTK_RELIEF_NORMAL - True - + + False + 0 - - True - False - 0 + + + + + + Bold + True + GTK_RELIEF_NONE + False + False + False - + True - 0.5 - 0.5 - 2 - 0 - - - 0 - True - True - - - - - - True - GTK_ARROW_DOWN - GTK_SHADOW_OUT + gtk-bold + 3 0.5 0.5 0 0 - - 0 - True - True - + + 0 + False + False + + + + + + Italic + True + GTK_RELIEF_NONE + False + False + False + + + + True + gtk-italic + 3 + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + Underline + True + GTK_RELIEF_NONE + False + False + False + + + + True + gtk-underline + 3 + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + 0 - False - False + True + True - + True - True - GTK_RELIEF_NORMAL - True - + False + 6 - + True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 + Click to insert an emoticon (Alt+E) + True + GTK_RELIEF_NORMAL + True + - + True False - 2 + 0 - + True - gtk-preferences - 4 0.5 0.5 - 0 + 2 0 0 - False - False + True + True - - True - _Actions - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - + True GTK_ARROW_DOWN GTK_SHADOW_OUT @@ -9540,109 +9458,210 @@ topic 0 - False - False + True + True + + 0 + False + False + - - - 0 - False - False - - - - - - True - - - 2 - False - True - - - - - - True - True - GTK_RELIEF_NORMAL - True - - + True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 + True + GTK_RELIEF_NORMAL + True + - + True - False - 2 + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 - + True - gtk-jump-to - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - + False + 2 - - - True - _Send - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + + + True + gtk-preferences + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Actions + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + GTK_ARROW_DOWN + GTK_SHADOW_OUT + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + - - 0 - False - False - + + 0 + False + False + + + + + + True + + + 2 + False + True + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-jump-to + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Send + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + 0 False - False + True @@ -9654,91 +9673,86 @@ topic - 0 - False - True + False + True - - - False - True - - - - - - True - False - False - - - 2 + True - False - 4 + False + False + - + + 2 True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - 20 - 20 - True - True - GTK_RELIEF_NONE - True - + False + 4 - + True - gtk-close - 1 + + False + False + GTK_JUSTIFY_LEFT + False + False 0.5 0.5 0 - 6 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + 0 + False + False + + + + + + 20 + 20 + True + True + GTK_RELIEF_NONE + True + + + + + True + gtk-close + 1 + 0.5 + 0.5 + 0 + 6 + + + + + 0 + False + False + - - 0 - False - False - + + tab + - - tab - @@ -10641,479 +10655,397 @@ topic - + True - False - False - GTK_POS_TOP - True - False - - + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 - - 3 - True - False - 1 + + True + False + False + GTK_POS_TOP + True + False + + - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 3 - 3 - - - - - - - 0 - False - False - - - - - - True + + 3 + True False - 0 + 1 - - 3 - 60 + True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 3 + 3 - - - - - 0 - True - True - - - - - - 3 - True - True - GTK_POLICY_NEVER - GTK_POLICY_NEVER - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - - - - 0 - False - True - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - False - 1 - - - + - - 0 - False - True - - - - - - True - - - 0 - False - True - - - - - - Bold - True - GTK_RELIEF_NONE - False - False - False - - - - True - gtk-bold - 3 - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - - - - - - Italic - True - GTK_RELIEF_NONE - False - False - False - - - - True - gtk-italic - 3 - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - - - - - - Underline - True - GTK_RELIEF_NONE - False - False - False - - - - True - gtk-underline - 3 - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - - - - - 0 - True - True - - - - - - 3 - True - False - 6 - - - - True - Click to insert an emoticon (Alt+E) - True - GTK_RELIEF_NORMAL - True - - - - + + + + + 0 + False + False + + + + + + True + False + 0 + + + + 3 + 60 + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + + 0 - False - False + True + True - + + 3 True True - GTK_RELIEF_NORMAL - True - + GTK_POLICY_NEVER + GTK_POLICY_NEVER + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT - + + + + + 0 + False + True + + + + + 0 + True + True + + + + + + True + False + 0 + + + + True + False + 1 + + + True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 + OpenPGP Encryption + True + False - + True - False - 2 + GTK_RELIEF_NONE + False + False + False - + True - gtk-preferences + gtk-dialog-authentication 4 0.5 0.5 0 0 - - 0 - False - False - + + + + + 0 + False + True + + + + + + True + + + 0 + False + True + + + + + + Bold + True + GTK_RELIEF_NONE + False + False + False + + + + True + gtk-bold + 3 + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + Italic + True + GTK_RELIEF_NONE + False + False + False + + + + True + gtk-italic + 3 + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + + Underline + True + GTK_RELIEF_NONE + False + False + False + + + + True + gtk-underline + 3 + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + + + + + 0 + True + True + + + + + + 3 + True + False + 6 + + + + True + Click to insert an emoticon (Alt+E) + True + GTK_RELIEF_NORMAL + True + + + + + True + False + 0 - + True - _Actions - True - False - GTK_JUSTIFY_LEFT - False - False 0.5 0.5 - 0 + 2 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 0 - False - False + True + True - + True GTK_ARROW_DOWN GTK_SHADOW_OUT @@ -11124,109 +11056,210 @@ Status message 0 - False - False + True + True + + 0 + False + False + - - - 0 - False - False - - - - - - True - - - 0 - False - False - - - - - - True - True - GTK_RELIEF_NORMAL - True - - + True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 + True + GTK_RELIEF_NORMAL + True + - + True - False - 2 + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 - + True - gtk-jump-to - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - + False + 2 - - - True - _Send - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + + + True + gtk-preferences + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Actions + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + GTK_ARROW_DOWN + GTK_SHADOW_OUT + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + - - 0 - False - False - + + 0 + False + False + + + + + + True + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-jump-to + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Send + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + 0 False - False + True @@ -11238,107 +11271,102 @@ Status message - 0 - False - True + False + True - - - False - True - - - - - - True - False - False - - + True - False - 4 + False + False + - + True - gtk-no - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - 20 - 20 - True - True - GTK_RELIEF_NONE - True - + False + 4 - + True - gtk-close - 1 + gtk-no + 4 0.5 0.5 0 - 6 + 0 + + 0 + False + False + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + 20 + 20 + True + True + GTK_RELIEF_NONE + True + + + + + True + gtk-close + 1 + 0.5 + 0.5 + 0 + 6 + + + + + 0 + False + False + - - 0 - False - False - + + tab + - - tab -