do not load at startup manage emoticons window [respect the RAM of user]

This commit is contained in:
Nikos Kouremenos 2005-11-13 14:55:52 +00:00
parent e57ce76bdd
commit 287b40bde6
3 changed files with 10 additions and 12 deletions

View File

@ -495,11 +495,10 @@ class PreferencesWindow:
[self.xml.get_widget('add_remove_emoticons_button')])
def on_add_remove_emoticons_button_clicked(self, widget):
window = gajim.interface.windows['add_remove_emoticons'].window
if window.get_property('visible'):
window.present()
if gajim.interface.windows.has_key('manage_emots'):
gajim.interface.windows['manage_emots'].window.present()
else:
window.show_all()
gajim.interface.windows['manage_emots'] = ManageEmoticonsWindow()
def on_iconset_combobox_changed(self, widget):
model = widget.get_model()
@ -1936,15 +1935,16 @@ class ManageEmoticonsWindow:
self.emot_tree.get_model().connect('row-changed',
self.on_emoticons_treemodel_row_changed)
self.window.show_all()
self.xml.signal_autoconnect(self)
def on_add_remove_emoticons_window_delete_event(self, widget, event):
self.window.hide()
def on_manage_emoticons_window_destroy(self, widget):
gajim.interface.init_regexp() # update regexp [emoticons included]
return True # do NOT destroy the window
# remove us from open windows
del gajim.interface.windows['manage_emots']
def on_close_button_clicked(self, widget):
self.window.hide()
self.window.destroy()
def on_emoticons_treemodel_row_changed(self, model, path, iter):
emots = gajim.config.get_per('emoticons')

View File

@ -22,7 +22,7 @@ exec python -OOt "$0" ${1+"$@"}
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
import sys
import os
import pygtk
@ -1331,8 +1331,6 @@ class Interface:
# get instances for windows/dialogs that will show_all()/hide()
self.windows['file_transfers'] = dialogs.FileTransfersWindow()
self.windows['preferences'] = config.PreferencesWindow()
self.windows['add_remove_emoticons'] = config.ManageEmoticonsWindow()
self.windows['roster'] = self.roster
for account in gajim.connections:
self.windows[account]['xml_console'] = \

View File

@ -12236,7 +12236,7 @@ Status message</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<signal name="delete_event" handler="on_add_remove_emoticons_window_delete_event" last_modification_time="Wed, 06 Apr 2005 15:34:38 GMT"/>
<signal name="destroy" handler="on_manage_emoticons_window_destroy" last_modification_time="Sun, 13 Nov 2005 14:52:28 GMT"/>
<child>
<widget class="GtkHBox" id="hbox2948">