~woutc/specto/specto-dbus-client

« back to all changes in this revision

Viewing changes to spectlib/preferences.py

  • Committer: Jean-François Fortin Tam
  • Author(s): Wout Clymans
  • Date: 2008-07-22 23:22:49 UTC
  • Revision ID: jeff@kiki-20080722232249-l64srclhp6u6qyrw
WARNING: this commit contains all the significant changes that happened in a specto-woutc branch over the past year. Large change log follows. Some commit log lines were intentionally left out.

- A dialog with debug information is shown when specto has a system/programming error.
- Disable renaming watches in the listview, make it a Jump To action instead
- All mandatory fields have to be filled in now (add and edit watch)
- The error log now shows the lines in color according to the severity
- Better file size cache name
- Added more error-handling
- The filesize is now saved in a different cache file (not in watches.list), may fix issue 37?
- Icons are now shown in the combobox when you add a new watch (buggy, patches welcome)
- Improved the pop3, imap and gmail watches
- The gmail watch now saves what unread mails there already were last time
- Convert HTML entities for the web diff
- Moved some code so the file dialog will show faster
- A watch will be marked updated when you didn't clear it on quit.
- Removed double call to refresh the watch info
- Made a general gtkutil file where you can define widgets used in the edit and add watch windows
- Removed the class name from the logger
- Clear the watch when you open it using the balloon
- Make some watch names clearer
- Error log tab in notifier window
- Added "clear" button in the edit menu
- Show simple diff from webpage difference
- Console mode (specto --console or specto --console --help)
- Watch menu when you right-click a watch entry in the notifier window
- Ability to run a command when a watch is updated
- Ability to run a command when a watch is cleared
- Fields in the add and edit windows are now dynamic; when creating a new watch plugin, you don't have to write all the gui code anymore
- More space for the extra information in the info panel
- code cleanup
- use plugin-system

- Fix issue 150: Gmail.com - that address is disabled in Germany - hence you can't go to messages directly
- Fix issue 93: Gmail library can support no more than 19 new mails
- Fix issue 131: bombs on special characters
- Fix issue 134: harmonized colors
- Fix issue 119: don't let the log file get huge
- Fix issue 143: Site adress in "About" box is not clickable
- Fix issue 146: Per-watch option to prevent URL redirects; To use this option add "redirect = True" to the watch that is allowed to redirect
- Fix issue 145: abnormal behavior with ampersands in a web watch
- Fix issue 51: Specto stores passwords in plaintext (started keyring support)
- Fix issue 135: Proxy support (already proxy support for web watch)
- Fix issue 128: allow specifying a port for mail watches (add 'port = 323' to your watch config)
- Fix issue 132: removing a watch should remove its cache files
- Fix issue 136: Support specific folder monitor over IMAP (add 'folder = work' to your imap watch config)
- Fix issue 63: Google Reader Watch does not support more than 20 items
- Fix issue 39: POP3 & IMAP watches not on par with gmail watch's message counting logic
- Fix issue 100: gmail with google apps should point to the right domain when clicking Jump to
- Fix issue 95: statusbar should show something else when updates are done
- Fix issue 112: hide error log tabs when debug mode is deactivated
- Fix issue 101: show the import dialog after the file chooser
- Fix issue 114: removing a watch should show a confirmation dialog
- Fix issue 73: brackets in watch name lead to startup crash (brackets can now be used in the name!)
- Fix issue 69: startup fails due to wrong glade file path  
- Fix issue 12: provide more information
- Fix issue 13: watch list importing and exporting
- Fix issue 20: Organise specto source into modules
- Fix issue 33: ability to run a command instead of notifying
- Fix issue 54: freedesktop-compliant user directories
- Fix issue 72: "show in window list" preference is not saved
- Fix issue 77: don't mess up if ekiga's sound files are not present
- Fix issue 118: add http:// automatically for web watches (also @gmail.com added for gmail accounts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    Display the preferences window.
42
42
    """
43
43
    
44
 
    def __init__(self, specto):
 
44
    def __init__(self, specto, notifier):
45
45
        self.specto = specto
 
46
        self.notifier = notifier
46
47
        gladefile= self.specto.PATH + 'glade/preferences.glade'
47
48
        windowname= "preferences"
48
49
        self.wTree=gtk.glade.XML(gladefile,windowname, self.specto.glade_gettext)
56
57
        "on_chkSoundProblem_toggled": self.chkSoundProblem_toggled,
57
58
        "on_chk_libnotify_toggled": self.chkLibnotify_toggled,
58
59
        "on_button_log_clear_clicked": self.specto.logger.clear_log,
59
 
        "on_button_log_open_clicked": self.specto.show_error_log
 
60
        "on_button_log_open_clicked": self.notifier.show_error_log
60
61
        }
61
62
        
62
63
        #attach the events
71
72
        """ Save the preferences. """
72
73
        self.preferences.hide()
73
74
        self.set_preferences()
 
75
        self.notifier.show_watch_info()        
74
76
 
75
77
    def chkSoundUpdate_toggled(self, widget):
76
78
        """ Make the filechooser sensitive or insensitive. """
121
123
        #see if windowlist has to be saved
122
124
        if self.wTree.get_widget("chk_windowlist").get_active():
123
125
            self.specto.specto_gconf.set_entry("show_in_windowlist", True)
124
 
            self.specto.notifier.notifier.set_skip_taskbar_hint(True)
 
126
            self.notifier.notifier.set_skip_taskbar_hint(False)
125
127
        else:
126
 
            self.specto.specto_gconf.set_entry("show_in_windowlist", True)
127
 
            self.specto.notifier.notifier.set_skip_taskbar_hint(False)#note, this is set_SKIP! this explains why it's False to skip.
 
128
            self.specto.specto_gconf.set_entry("show_in_windowlist", False)
 
129
            self.notifier.notifier.set_skip_taskbar_hint(True)#note, this is set_SKIP! this explains why it's False to skip.
128
130
 
129
131
        #see if tray has to be saved
130
132
        if self.wTree.get_widget("chk_tray").get_active():
131
133
            self.specto.specto_gconf.set_entry("always_show_icon", True)
132
134
        else:
133
135
            self.specto.specto_gconf.set_entry("always_show_icon", False)
134
 
        self.specto.recreate_tray()
 
136
        self.notifier.recreate_tray()
135
137
 
136
138
        #see if debug mode has to be saved
137
139
        if self.wTree.get_widget("chk_debug").get_active():
138
140
            self.specto.specto_gconf.set_entry("debug_mode", True)
 
141
            self.specto.DEBUG = True
139
142
        else:
140
143
            self.specto.specto_gconf.set_entry("debug_mode", False)
141
 
 
142
 
 
143
 
 
144
 
 
145
 
 
146
 
 
147
 
 
 
144
            self.specto.DEBUG = False
 
145
            
148
146
    def get_preferences(self):
149
147
        """ Get the preferences from gconf. """
150
148
        #check toast