Changeset 9154

Show
Ignore:
Timestamp:
12/15/07 22:04:49 (10 months ago)
Author:
nicfit
Message:

Scratch the chckbox for with roster mode, use one_message_window opt and combo

Location:
branches/one_window
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/one_window/data/glade/preferences_window.glade

    r9152 r9154  
    123123                            <property name="visible">True</property> 
    124124                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> 
    125                             <property name="n_rows">7</property> 
     125                            <property name="n_rows">6</property> 
    126126                            <property name="n_columns">2</property> 
    127127                            <property name="column_spacing">6</property> 
    128128                            <property name="row_spacing">6</property> 
    129129                            <child> 
    130                               <widget class="GtkCheckButton" id="one_window_with_roster_checkbutton"> 
    131                                 <property name="can_focus">True</property> 
    132                                 <property name="tooltip" translatable="yes">Hides buttons in chatwindows to </property> 
    133                                 <property name="label" translatable="yes">Combine roster and messages in a single _window</property> 
     130                              <widget class="GtkCheckButton" id="speller_checkbutton"> 
     131                                <property name="can_focus">True</property> 
     132                                <property name="label" translatable="yes">_Highlight misspelled words</property> 
    134133                                <property name="use_underline">True</property> 
    135134                                <property name="response_id">0</property> 
    136135                                <property name="draw_indicator">True</property> 
    137                                 <signal name="toggled" handler="on_one_window_with_roster_checkbutton_toggled"/> 
     136                                <signal name="toggled" handler="on_speller_checkbutton_toggled"/> 
     137                              </widget> 
     138                              <packing> 
     139                                <property name="right_attach">2</property> 
     140                                <property name="top_attach">5</property> 
     141                                <property name="bottom_attach">6</property> 
     142                                <property name="x_options">GTK_FILL</property> 
     143                              </packing> 
     144                            </child> 
     145                            <child> 
     146                              <widget class="GtkCheckButton" id="xhtml_checkbutton"> 
     147                                <property name="visible">True</property> 
     148                                <property name="can_focus">True</property> 
     149                                <property name="tooltip" translatable="yes">Some messages may include rich content (formatting, colors etc). If checked, Gajim will just display the raw message text.</property> 
     150                                <property name="label" translatable="yes">Ignore rich content in incoming messages</property> 
     151                                <property name="use_underline">True</property> 
     152                                <property name="response_id">0</property> 
     153                                <property name="draw_indicator">True</property> 
     154                                <signal name="toggled" handler="on_xhtml_checkbutton_toggled"/> 
     155                              </widget> 
     156                              <packing> 
     157                                <property name="right_attach">2</property> 
     158                                <property name="top_attach">4</property> 
     159                                <property name="bottom_attach">5</property> 
     160                                <property name="x_options">GTK_FILL</property> 
     161                              </packing> 
     162                            </child> 
     163                            <child> 
     164                              <widget class="GtkCheckButton" id="compact_view_checkbutton"> 
     165                                <property name="can_focus">True</property> 
     166                                <property name="tooltip" translatable="yes">Hides buttons in chatwindows to </property> 
     167                                <property name="label" translatable="yes">_Make message windows compact</property> 
     168                                <property name="use_underline">True</property> 
     169                                <property name="response_id">0</property> 
     170                                <property name="draw_indicator">True</property> 
     171                                <signal name="toggled" handler="on_compact_view_checkbutton_toggled"/> 
    138172                              </widget> 
    139173                              <packing> 
     
    145179                            </child> 
    146180                            <child> 
    147                               <widget class="GtkCheckButton" id="compact_view_checkbutton"> 
    148                                 <property name="can_focus">True</property> 
    149                                 <property name="tooltip" translatable="yes">Hides buttons in chatwindows to </property> 
    150                                 <property name="label" translatable="yes">_Make message windows compact</property> 
    151                                 <property name="use_underline">True</property> 
    152                                 <property name="response_id">0</property> 
    153                                 <property name="draw_indicator">True</property> 
    154                                 <signal name="toggled" handler="on_compact_view_checkbutton_toggled"/> 
    155                               </widget> 
    156                               <packing> 
    157                                 <property name="right_attach">2</property> 
    158                                 <property name="top_attach">4</property> 
    159                                 <property name="bottom_attach">5</property> 
    160                                 <property name="x_options">GTK_FILL</property> 
    161                               </packing> 
    162                             </child> 
    163                             <child> 
    164                               <widget class="GtkCheckButton" id="xhtml_checkbutton"> 
    165                                 <property name="visible">True</property> 
    166                                 <property name="can_focus">True</property> 
    167                                 <property name="tooltip" translatable="yes">Some messages may include rich content (formatting, colors etc). If checked, Gajim will just display the raw message text.</property> 
    168                                 <property name="label" translatable="yes">Ignore rich content in incoming messages</property> 
    169                                 <property name="use_underline">True</property> 
    170                                 <property name="response_id">0</property> 
    171                                 <property name="draw_indicator">True</property> 
    172                                 <signal name="toggled" handler="on_xhtml_checkbutton_toggled"/> 
    173                               </widget> 
    174                               <packing> 
    175                                 <property name="right_attach">2</property> 
    176                                 <property name="top_attach">5</property> 
    177                                 <property name="bottom_attach">6</property> 
    178                                 <property name="x_options">GTK_FILL</property> 
    179                               </packing> 
    180                             </child> 
    181                             <child> 
    182                               <widget class="GtkCheckButton" id="speller_checkbutton"> 
    183                                 <property name="can_focus">True</property> 
    184                                 <property name="label" translatable="yes">_Highlight misspelled words</property> 
    185                                 <property name="use_underline">True</property> 
    186                                 <property name="response_id">0</property> 
    187                                 <property name="draw_indicator">True</property> 
    188                                 <signal name="toggled" handler="on_speller_checkbutton_toggled"/> 
    189                               </widget> 
    190                               <packing> 
    191                                 <property name="right_attach">2</property> 
    192                                 <property name="top_attach">6</property> 
    193                                 <property name="bottom_attach">7</property> 
    194                                 <property name="x_options">GTK_FILL</property> 
    195                               </packing> 
    196                             </child> 
    197                             <child> 
    198181                              <widget class="GtkEventBox" id="eventbox5"> 
    199182                                <property name="visible">True</property> 
     
    228211                                <property name="items" translatable="yes">Never 
    229212Always 
     213Always (with Roster) 
    230214Per account 
    231215Per type</property> 
  • branches/one_window/src/common/config.py

    r9152 r9154  
    4646opt_bool = [ 'boolean', 0 ] 
    4747opt_color = [ 'color', '^(#[0-9a-fA-F]{6})|()$' ] 
    48 opt_one_window_types = ['never', 'always', 'peracct', 'pertype'] 
     48opt_one_window_types = ['never', 'always', 'always_with_roster', 'peracct', 'pertype'] 
    4949opt_treat_incoming_messages = ['', 'chat', 'normal'] 
    5050 
     
    230230                'one_message_window': [opt_str, 'always', 
    231231#always, never, peracct, pertype should not be translated 
    232                         _('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.')], 
    233                 'one_message_window_with_roster': [opt_bool, False, 
    234                                 _('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\'')], 
     232                        _('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.')], 
    235233                'show_avatar_in_chat': [opt_bool, True, _('If False, you will no longer see the avatar in the chat window.')], 
    236234                'escape_key_closes': [opt_bool, True, _('If True, pressing the escape key closes a tab/window.')], 
  • branches/one_window/src/config.py

    r9152 r9154  
    151151                        self.one_window_type_combobox.set_active(0) 
    152152 
    153                 # Set sensitive of combined roster/msgs checkbox iff one_message_window is 'always' 
    154                 if type == 'always': 
    155                         self.xml.get_widget('one_window_with_roster_checkbutton').set_sensitive(True) 
    156                 else: 
    157                         self.xml.get_widget('one_window_with_roster_checkbutton').set_sensitive(False) 
    158  
    159153                # Compact View 
    160154                st = gajim.config.get('compact_view') 
     
    182176                iconsets_list = os.listdir(os.path.join(gajim.DATA_DIR, 'iconsets')) 
    183177                if os.path.isdir(gajim.MY_ICONSETS_PATH): 
    184                         iconsets_list += os.listdir(gajim.MY_ICONSETS_PATH)  
     178                        iconsets_list += os.listdir(gajim.MY_ICONSETS_PATH) 
    185179                # new model, image in 0, string in 1 
    186180                model = gtk.ListStore(gtk.Image, str) 
     
    653647                active = widget.get_active() 
    654648                config_type = common.config.opt_one_window_types[active] 
    655                 if config_type == 'always': 
    656                         self.xml.get_widget('one_window_with_roster_checkbutton').set_sensitive(True) 
    657                 else: 
    658                         self.xml.get_widget('one_window_with_roster_checkbutton').set_sensitive(False) 
    659649                gajim.config.set('one_message_window', config_type) 
    660650                gajim.interface.save_config() 
    661651                gajim.interface.msg_win_mgr.reconfig() 
    662  
    663         def on_one_window_with_roster_checkbutton_toggled(self, widget): 
    664                 active = widget.get_active() 
    665                 gajim.config.set('one_message_window_with_roster', active) 
    666                 gajim.interface.save_config() 
    667                 # FIXME 
    668                 #gajim.interface.msg_win_mgr.reconfig() 
    669652 
    670653        def on_compact_view_checkbutton_toggled(self, widget):