Permalink
Browse files

Added --background argument.

  • Loading branch information...
1 parent d9b0b30 commit 311caa87486ab32217c642d28ce2ea2a5dddd419 Frank Smit committed Feb 6, 2010
Showing with 14 additions and 15 deletions.
  1. +2 −1 README
  2. +2 −9 TODO
  3. +10 −5 animelist.py
View
3 README
@@ -1,7 +1,7 @@
=== Introduction ===
AnimeList is still under development and not everything works yet and stuff can be bugged.
-Only tested on Linux (Arch linux) and Windows. It has not been test on any other
+Only tested on Linux (Arch linux), Windows and Mac OS X. It has not been test on any other
opererating systems.
Before you can use AnimeList you jave to install GTK[1], Python[2], PyGTK[3], PyCairo[3], PyGObject[3].
@@ -33,6 +33,7 @@ the project page: http://61924.nl/projects/animelist.html
* Works on Linux, Windows and maybe Mac OS X (not tested).
* Login details are encoded before they're saved (your username and password
are not saved as plain text).
+ * Start in background with: animelist.py --background
=== Development ===
View
11 TODO
@@ -2,15 +2,8 @@ A TODO list
# 0.2
- - Done
+ - Run in background (hide window at startup).
# 0.3
- - Wait with shutdown after everything is done
- - Cleanup
- - Plugin API
- - Torrents plugin
-
-# 0.4
-
- - Media plugin (detect mediaplayers).
+ - This version will be based on QT so it also looks nice on Mac OS X and Windows.
View
@@ -9,9 +9,9 @@
__author__ = 'Frank Smit'
__email__ = '61924.00@gmail.com'
-__date__ = 'December 22th, 2009'
+__date__ = 'February 7th, 2010'
__app_name__ = 'AnimeList'
-__version__ = '0.2-beta1'
+__version__ = '0.2'
import os
import sys
@@ -37,7 +37,7 @@ class AnimeList():
and all other things.
"""
- def __init__(self):
+ def __init__(self, cli_options=[]):
# Set some variables
self.HOME = os.path.expanduser('~/.animelist')
@@ -102,6 +102,10 @@ def __init__(self):
# Make all the GUI widgets visible
self.gui['window'].show_all()
+ # Hide window at startup
+ if '--background' in cli_options:
+ self._st_activate_icon()
+
# Hide the systemtray icon if needed
if not self.config.settings['systray']:
self.gui['systray'].set_visible(False)
@@ -177,7 +181,7 @@ def _mw_store_position(self, event, position):
self._position = (position.x, position.y)
- def _st_activate_icon(self, widget):
+ def _st_activate_icon(self, widget=None):
# Private. Hide or show the main windows when the status/systemtray icon has been clicked
if self.gui['window'].get_property('visible'):
@@ -249,7 +253,8 @@ def quit(self, widget=None):
gtk.main_quit()
if __name__ == '__main__':
- AnimeList()
+
+ AnimeList(sys.argv[1:])
try:
gtk.main()

0 comments on commit 311caa8

Please sign in to comment.