tabs position can be changed now via preferences window in chat tab in a combobx
This commit is contained in:
parent
fa5f7c85c3
commit
c0be3df59f
|
@ -140,7 +140,6 @@ class Config:
|
|||
'last_send_dir': [opt_str, ''],
|
||||
'last_emoticons_dir': [opt_str, ''],
|
||||
'last_sounds_dir': [opt_str, ''],
|
||||
#FIXME: add combobox in prefs for this in .9
|
||||
'tabs_position': [opt_str, 'top', _('Where to show tabs. Values are:')+" 'top', 'bottom', 'left', 'right'."],
|
||||
'tabs_always_visible': [opt_bool, False, _('Show tab when only one conversation?')],
|
||||
'tabs_border': [opt_bool, False, _('Show tab border if one conversation?')],
|
||||
|
|
|
@ -178,6 +178,16 @@ class PreferencesWindow:
|
|||
st = gajim.config.get('usetabbedchat')
|
||||
self.xml.get_widget('use_tabbed_chat_window_checkbutton').set_active(st)
|
||||
|
||||
st = gajim.config.get('tabs_position')
|
||||
sel = 0
|
||||
if st == 'bottom':
|
||||
sel = 1
|
||||
elif st == 'left':
|
||||
sel = 2
|
||||
elif st == 'right':
|
||||
sel = 3
|
||||
self.xml.get_widget('tabs_pos_combobox').set_active(sel)
|
||||
|
||||
# always compact view
|
||||
st = gajim.config.get('always_compact_view')
|
||||
self.xml.get_widget('always_compact_view_checkbutton').set_active(st)
|
||||
|
@ -609,16 +619,31 @@ class PreferencesWindow:
|
|||
self.plugin.save_config()
|
||||
|
||||
def on_use_tabbed_chat_window_checkbutton_toggled(self, widget):
|
||||
tabs_pos_label = self.xml.get_widget('tabs_pos_label')
|
||||
tabs_pos_combobox = self.xml.get_widget('tabs_pos_combobox')
|
||||
self.on_checkbutton_toggled(widget, 'usetabbedchat',
|
||||
[tabs_pos_label, tabs_pos_combobox])
|
||||
|
||||
if widget.get_active():
|
||||
gajim.config.set('usetabbedchat', True)
|
||||
self.merge_windows('chats')
|
||||
self.merge_windows('gc')
|
||||
else:
|
||||
gajim.config.set('usetabbedchat', False)
|
||||
self.split_windows('chats')
|
||||
self.split_windows('gc')
|
||||
self.plugin.save_config()
|
||||
|
||||
def on_tabs_pos_combobox_changed(self, widget):
|
||||
sel = widget.get_active()
|
||||
if sel == 1:
|
||||
st = 'bottom'
|
||||
elif sel == 2:
|
||||
st = 'left'
|
||||
elif sel == 3:
|
||||
st = 'right'
|
||||
else:
|
||||
st = 'top'
|
||||
gajim.config.set('tabs_position', st)
|
||||
|
||||
def on_always_compact_view_checkbutton_toggled(self, widget):
|
||||
self.on_checkbutton_toggled(widget, 'always_compact_view')
|
||||
|
||||
|
|
|
@ -3508,22 +3508,79 @@
|
|||
<property name="spacing">6</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="use_tabbed_chat_window_checkbutton">
|
||||
<widget class="GtkHBox" id="hbox2994">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Use a single chat window with _tabs</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_use_tabbed_chat_window_checkbutton_toggled" last_modification_time="Sun, 06 Mar 2005 15:11:41 GMT"/>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">12</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="use_tabbed_chat_window_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Use a single chat window with _tabs</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_use_tabbed_chat_window_checkbutton_toggled" last_modification_time="Sun, 06 Mar 2005 15:11:41 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="tabs_pos_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Po_sition:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">tabs_pos_combobox</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkComboBox" id="tabs_pos_combobox">
|
||||
<property name="visible">True</property>
|
||||
<property name="items" translatable="yes">Top
|
||||
Bottom
|
||||
Left
|
||||
Right</property>
|
||||
<property name="add_tearoffs">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="changed" handler="on_tabs_pos_combobox_changed" last_modification_time="Sun, 04 Sep 2005 12:20:33 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
|
|
Loading…
Reference in New Issue