Make sure gtkui.conf is written on quit.

This commit is contained in:
Andrew Resch 2007-09-22 03:13:32 +00:00
parent 0ed8ac1cdc
commit 1f6798c98a
4 changed files with 12 additions and 1 deletions

View file

@ -101,8 +101,11 @@ class GtkUI:
# Start the gtk main loop
gtk.main()
log.debug("gtkui shutting down..")
# Clean-up
del self.mainwindow
del self.signal_receiver
del self.plugins
# Make sure the config file is closed and saved to disk.
deluge.configmanager.close("gtkui.conf")
del deluge.configmanager

View file

@ -92,6 +92,12 @@ class MainWindow:
self.window.hide()
def quit(self):
del self.menubar
del self.toolbar
del self.torrentview
del self.torrentdetails
del self.preferences
del self.config
self.hide()
gtk.main_quit()

View file

@ -78,6 +78,9 @@ class Preferences:
"on_toggle": self.on_toggle
})
def __del__(self):
del self.gtkui_config
def add_page(self, name, widget):
"""Add a another page to the notebook"""
index = self.notebook.append_page(widget)

View file

@ -32,7 +32,6 @@
# statement from all source files in the program, then also delete it here.
import deluge.ui.functions as functions
from deluge.config import Config
from deluge.log import LOG as log
class Signals: