Changeset 9260
- Timestamp:
- 01/22/08 22:08:24 (10 months ago)
- Location:
- trunk/src
- Files:
-
- 5 modified
-
common/config.py (modified) (1 diff)
-
config.py (modified) (1 diff)
-
dialogs.py (modified) (2 diffs)
-
message_window.py (modified) (3 diffs)
-
roster_window.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/config.py
r9245 r9260 101 101 'collapsed_rows': [ opt_str, '', _('List (space separated) of rows (accounts and groups) that are collapsed.'), True ], 102 102 'roster_theme': [ opt_str, _('default'), '', True ], 103 'saveposition': [ opt_bool, True ],104 103 'mergeaccounts': [ opt_bool, False, '', True ], 105 104 'sort_by_show': [ opt_bool, True, '', True ], -
trunk/src/config.py
r9253 r9260 591 591 def on_subscribe_tune_checkbutton_toggled(self, widget): 592 592 self.on_checkbutton_toggled(widget, 'subscribe_tune') 593 594 def on_save_position_checkbutton_toggled(self, widget):595 self.on_checkbutton_toggled(widget, 'saveposition')596 593 597 594 def on_sort_by_show_checkbutton_toggled(self, widget): -
trunk/src/dialogs.py
r9259 r9260 2062 2062 self.xml.signal_autoconnect(self) 2063 2063 2064 if gajim.config.get('saveposition'):2065 # get window position and size from config2066 g tkgui_helpers.resize_window(self.window,2067 gajim.config.get('single-msg-width'),2068 gajim.config.get('single-msg-height'))2069 g tkgui_helpers.move_window(self.window,2070 gajim.config.get('single-msg-x-position'),2071 gajim.config.get('single-msg-y-position')) 2064 # get window position and size from config 2065 gtkgui_helpers.resize_window(self.window, 2066 gajim.config.get('single-msg-width'), 2067 gajim.config.get('single-msg-height')) 2068 gtkgui_helpers.move_window(self.window, 2069 gajim.config.get('single-msg-x-position'), 2070 gajim.config.get('single-msg-y-position')) 2071 2072 2072 self.window.show_all() 2073 2073 … … 2080 2080 2081 2081 def save_pos(self): 2082 if gajim.config.get('saveposition'): 2083 # save the window size and position 2084 x, y = self.window.get_position() 2085 gajim.config.set('single-msg-x-position', x) 2086 gajim.config.set('single-msg-y-position', y) 2087 width, height = self.window.get_size() 2088 gajim.config.set('single-msg-width', width) 2089 gajim.config.set('single-msg-height', height) 2090 gajim.interface.save_config() 2082 # save the window size and position 2083 x, y = self.window.get_position() 2084 gajim.config.set('single-msg-x-position', x) 2085 gajim.config.set('single-msg-y-position', y) 2086 width, height = self.window.get_size() 2087 gajim.config.set('single-msg-width', width) 2088 gajim.config.set('single-msg-height', height) 2089 gajim.interface.save_config() 2091 2090 2092 2091 def on_single_message_window_delete_event(self, window, ev): -
trunk/src/message_window.py
r9259 r9260 783 783 def _resize_window(self, win, acct, type): 784 784 '''Resizes window according to config settings''' 785 if not gajim.config.get('saveposition'):786 return787 788 785 if self.mode in (self.ONE_MSG_WINDOW_ALWAYS, 789 786 self.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER): … … 808 805 def _position_window(self, win, acct, type): 809 806 '''Moves window according to config settings''' 810 if (not gajim.config.get('saveposition') or 811 self.mode in [self.ONE_MSG_WINDOW_NEVER, 812 self.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER]): 807 if (self.mode in [self.ONE_MSG_WINDOW_NEVER, 808 self.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER]): 813 809 return 814 810 … … 935 931 936 932 def save_state(self, msg_win, width_adjust=0): 937 if not gajim.config.get('saveposition'):938 return939 940 933 # Save window size and position 941 934 pos_x_key = 'msgwin-x-position' -
trunk/src/roster_window.py
r9259 r9260 4250 4250 tell that to the core and exit gtk''' 4251 4251 msgwin_width_adjust = 0 4252 if gajim.config.get('saveposition'): 4253 # in case show_roster_on_start is False and roster is never shown4254 # window.window is None4255 if self.window.window is not None:4256 x, y = self.window.window.get_root_origin()4257 gajim.config.set('roster_x-position', x)4258 gajim.config.set('roster_y-position', y)4259 width, height = self.window.get_size()4260 # For the width use the size of the vbox containing the tree and4261 # status combo, this will cancel out any hpaned width4262 width = self.xml.get_widget('roster_vbox2').allocation.width4263 gajim.config.set('roster_width', width)4264 gajim.config.set('roster_height', height)4265 if not self.xml.get_widget('roster_vbox2').get_property('visible'):4266 # The roster vbox is hidden, so the message window is larger4267 # then we want to save (i.e. the window will grow every startup)4268 # so adjust.4269 msgwin_width_adjust = -1 * width4252 4253 # in case show_roster_on_start is False and roster is never shown 4254 # window.window is None 4255 if self.window.window is not None: 4256 x, y = self.window.window.get_root_origin() 4257 gajim.config.set('roster_x-position', x) 4258 gajim.config.set('roster_y-position', y) 4259 width, height = self.window.get_size() 4260 # For the width use the size of the vbox containing the tree and 4261 # status combo, this will cancel out any hpaned width 4262 width = self.xml.get_widget('roster_vbox2').allocation.width 4263 gajim.config.set('roster_width', width) 4264 gajim.config.set('roster_height', height) 4265 if not self.xml.get_widget('roster_vbox2').get_property('visible'): 4266 # The roster vbox is hidden, so the message window is larger 4267 # then we want to save (i.e. the window will grow every startup) 4268 # so adjust. 4269 msgwin_width_adjust = -1 * width 4270 4270 4271 4271 … … 5420 5420 # no need of this variable 5421 5421 self.have_new_chat_accel = False # Is the "Ctrl+N" shown ? 5422 if gajim.config.get('saveposition'): 5423 gtkgui_helpers.resize_window(self.window, 5424 gajim.config.get('roster_width'), 5425 gajim.config.get('roster_height')) 5426 gtkgui_helpers.move_window(self.window, 5427 gajim.config.get('roster_x-position'), 5428 gajim.config.get('roster_y-position')) 5422 gtkgui_helpers.resize_window(self.window, 5423 gajim.config.get('roster_width'), 5424 gajim.config.get('roster_height')) 5425 gtkgui_helpers.move_window(self.window, 5426 gajim.config.get('roster_x-position'), 5427 gajim.config.get('roster_y-position')) 5429 5428 5430 5429 self.popups_notification_height = 0
