Author: nicfit Date: 2007-12-15 22:04:49 +0100 (Sat, 15 Dec 2007) New Revision: 9154
Modified: branches/one_window/data/glade/preferences_window.glade branches/one_window/src/common/config.py branches/one_window/src/config.py Log: Scratch the chckbox for with roster mode, use one_message_window opt and combo
Modified: branches/one_window/data/glade/preferences_window.glade =================================================================== --- branches/one_window/data/glade/preferences_window.glade 2007-12-15 20:41:46 UTC (rev 9153) +++ branches/one_window/data/glade/preferences_window.glade 2007-12-15 21:04:49 UTC (rev 9154) @@ -122,45 +122,27 @@ <widget class="GtkTable" id="table1"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="n_rows">7</property> + <property name="n_rows">6</property> <property name="n_columns">2</property> <property name="column_spacing">6</property> <property name="row_spacing">6</property> <child> - <widget class="GtkCheckButton" id="one_window_with_roster_checkbutton"> + <widget class="GtkCheckButton" id="speller_checkbutton"> <property name="can_focus">True</property> - <property name="tooltip" translatable="yes">Hides buttons in chatwindows to </property> - <property name="label" translatable="yes">Combine roster and messages in a single _window</property> + <property name="label" translatable="yes">_Highlight misspelled words</property> <property name="use_underline">True</property> <property name="response_id">0</property> <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_one_window_with_roster_checkbutton_toggled"/> + <signal name="toggled" handler="on_speller_checkbutton_toggled"/> </widget> <packing> <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="x_options">GTK_FILL</property> </packing> </child> <child> - <widget class="GtkCheckButton" id="compact_view_checkbutton"> - <property name="can_focus">True</property> - <property name="tooltip" translatable="yes">Hides buttons in chatwindows to </property> - <property name="label" translatable="yes">_Make message windows compact</property> - <property name="use_underline">True</property> - <property name="response_id">0</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_compact_view_checkbutton_toggled"/> - </widget> - <packing> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">GTK_FILL</property> - </packing> - </child> - <child> <widget class="GtkCheckButton" id="xhtml_checkbutton"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -173,24 +155,25 @@ </widget> <packing> <property name="right_attach">2</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> <property name="x_options">GTK_FILL</property> </packing> </child> <child> - <widget class="GtkCheckButton" id="speller_checkbutton"> + <widget class="GtkCheckButton" id="compact_view_checkbutton"> <property name="can_focus">True</property> - <property name="label" translatable="yes">_Highlight misspelled words</property> + <property name="tooltip" translatable="yes">Hides buttons in chatwindows to </property> + <property name="label" translatable="yes">_Make message windows compact</property> <property name="use_underline">True</property> <property name="response_id">0</property> <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_speller_checkbutton_toggled"/> + <signal name="toggled" handler="on_compact_view_checkbutton_toggled"/> </widget> <packing> <property name="right_attach">2</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="x_options">GTK_FILL</property> </packing> </child> @@ -227,6 +210,7 @@ <property name="visible">True</property> <property name="items" translatable="yes">Never Always +Always (with Roster) Per account Per type</property> <signal name="changed" handler="on_one_window_type_combo_changed"/>
Modified: branches/one_window/src/common/config.py =================================================================== --- branches/one_window/src/common/config.py 2007-12-15 20:41:46 UTC (rev 9153) +++ branches/one_window/src/common/config.py 2007-12-15 21:04:49 UTC (rev 9154) @@ -45,7 +45,7 @@ opt_str = [ 'string', 0 ] opt_bool = [ 'boolean', 0 ] opt_color = [ 'color', '^(#[0-9a-fA-F]{6})|()$' ] -opt_one_window_types = ['never', 'always', 'peracct', 'pertype'] +opt_one_window_types = ['never', 'always', 'always_with_roster', 'peracct', 'pertype'] opt_treat_incoming_messages = ['', 'chat', 'normal']
class Config: @@ -229,9 +229,7 @@ 'send_sha_in_gc_presence': [opt_bool, True, _('Jabberd1.4 does not like sha info when one join a password protected group chat. Turn this option to False to stop sending sha info in group chat presences.')], 'one_message_window': [opt_str, 'always', #always, never, peracct, pertype should not be translated - _('Controls the window where new messages are placed.\n'always' - All messages are sent to a single window.\n'never' - All messages get their own window.\n'peracct' - Messages for each account are sent to a specific window.\n'pertype' - Each message type (e.g., chats vs. groupchats) are sent to a specific window. Note, changing this option requires restarting Gajim before the changes will take effect.')], - 'one_message_window_with_roster': [opt_bool, False, - _('If True, messages will appear in the roster instead of a separate window. This option has no effect if one_message_window is not 'always'')], + _('Controls the window where new messages are placed.\n'always' - All messages are sent to a single window.\n'always_with_roster' - Like 'always' but the messages are in a single window along with the roster.\n'never' - All messages get their own window.\n'peracct' - Messages for each account are sent to a specific window.\n'pertype' - Each message type (e.g., chats vs. groupchats) are sent to a specific window.')], 'show_avatar_in_chat': [opt_bool, True, _('If False, you will no longer see the avatar in the chat window.')], 'escape_key_closes': [opt_bool, True, _('If True, pressing the escape key closes a tab/window.')], 'compact_view': [opt_bool, False, _('Hides the buttons in chat windows.')],
Modified: branches/one_window/src/config.py =================================================================== --- branches/one_window/src/config.py 2007-12-15 20:41:46 UTC (rev 9153) +++ branches/one_window/src/config.py 2007-12-15 21:04:49 UTC (rev 9154) @@ -150,12 +150,6 @@ else: self.one_window_type_combobox.set_active(0)
- # Set sensitive of combined roster/msgs checkbox iff one_message_window is 'always' - if type == 'always': - self.xml.get_widget('one_window_with_roster_checkbutton').set_sensitive(True) - else: - self.xml.get_widget('one_window_with_roster_checkbutton').set_sensitive(False) - # Compact View st = gajim.config.get('compact_view') self.xml.get_widget('compact_view_checkbutton').set_active(st) @@ -181,7 +175,7 @@ # iconset iconsets_list = os.listdir(os.path.join(gajim.DATA_DIR, 'iconsets')) if os.path.isdir(gajim.MY_ICONSETS_PATH): - iconsets_list += os.listdir(gajim.MY_ICONSETS_PATH) + iconsets_list += os.listdir(gajim.MY_ICONSETS_PATH) # new model, image in 0, string in 1 model = gtk.ListStore(gtk.Image, str) renderer_image = cell_renderer_image.CellRendererImage(0, 0) @@ -652,21 +646,10 @@ def on_one_window_type_combo_changed(self, widget): active = widget.get_active() config_type = common.config.opt_one_window_types[active] - if config_type == 'always': - self.xml.get_widget('one_window_with_roster_checkbutton').set_sensitive(True) - else: - self.xml.get_widget('one_window_with_roster_checkbutton').set_sensitive(False) gajim.config.set('one_message_window', config_type) gajim.interface.save_config() gajim.interface.msg_win_mgr.reconfig()
- def on_one_window_with_roster_checkbutton_toggled(self, widget): - active = widget.get_active() - gajim.config.set('one_message_window_with_roster', active) - gajim.interface.save_config() - # FIXME - #gajim.interface.msg_win_mgr.reconfig() - def on_compact_view_checkbutton_toggled(self, widget): active = widget.get_active() for ctl in gajim.interface.msg_win_mgr.controls():