Changeset 9154
- Timestamp:
- 12/15/07 22:04:49 (10 months ago)
- Location:
- branches/one_window
- Files:
-
- 3 modified
-
data/glade/preferences_window.glade (modified) (3 diffs)
-
src/common/config.py (modified) (2 diffs)
-
src/config.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/one_window/data/glade/preferences_window.glade
r9152 r9154 123 123 <property name="visible">True</property> 124 124 <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> 126 126 <property name="n_columns">2</property> 127 127 <property name="column_spacing">6</property> 128 128 <property name="row_spacing">6</property> 129 129 <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> 134 133 <property name="use_underline">True</property> 135 134 <property name="response_id">0</property> 136 135 <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"/> 138 172 </widget> 139 173 <packing> … … 145 179 </child> 146 180 <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>198 181 <widget class="GtkEventBox" id="eventbox5"> 199 182 <property name="visible">True</property> … … 228 211 <property name="items" translatable="yes">Never 229 212 Always 213 Always (with Roster) 230 214 Per account 231 215 Per type</property> -
branches/one_window/src/common/config.py
r9152 r9154 46 46 opt_bool = [ 'boolean', 0 ] 47 47 opt_color = [ 'color', '^(#[0-9a-fA-F]{6})|()$' ] 48 opt_one_window_types = ['never', 'always', ' peracct', 'pertype']48 opt_one_window_types = ['never', 'always', 'always_with_roster', 'peracct', 'pertype'] 49 49 opt_treat_incoming_messages = ['', 'chat', 'normal'] 50 50 … … 230 230 'one_message_window': [opt_str, 'always', 231 231 #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.')], 235 233 'show_avatar_in_chat': [opt_bool, True, _('If False, you will no longer see the avatar in the chat window.')], 236 234 'escape_key_closes': [opt_bool, True, _('If True, pressing the escape key closes a tab/window.')], -
branches/one_window/src/config.py
r9152 r9154 151 151 self.one_window_type_combobox.set_active(0) 152 152 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 159 153 # Compact View 160 154 st = gajim.config.get('compact_view') … … 182 176 iconsets_list = os.listdir(os.path.join(gajim.DATA_DIR, 'iconsets')) 183 177 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) 185 179 # new model, image in 0, string in 1 186 180 model = gtk.ListStore(gtk.Image, str) … … 653 647 active = widget.get_active() 654 648 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)659 649 gajim.config.set('one_message_window', config_type) 660 650 gajim.interface.save_config() 661 651 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 # FIXME668 #gajim.interface.msg_win_mgr.reconfig()669 652 670 653 def on_compact_view_checkbutton_toggled(self, widget):
