gac-svn Mailing List for gac
Status: Inactive
Brought to you by:
stas_zytkiewicz
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(24) |
Nov
|
Dec
|
---|
From: <sta...@us...> - 2006-10-22 10:56:38
|
Revision: 28 http://svn.sourceforge.net/gac/?rev=28&view=rev Author: stas_zytkiewicz Date: 2006-10-22 03:56:31 -0700 (Sun, 22 Oct 2006) Log Message: ----------- update Modified Paths: -------------- version.py Modified: version.py =================================================================== --- version.py 2006-10-17 18:33:02 UTC (rev 27) +++ version.py 2006-10-22 10:56:31 UTC (rev 28) @@ -1,3 +1,4 @@ # Used by the maketarball script and the about widget -VERSION = 0.8 +VERSION = 0.8.1 + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-17 18:33:30
|
Revision: 27 http://svn.sourceforge.net/gac/?rev=27&view=rev Author: stas_zytkiewicz Date: 2006-10-17 11:33:02 -0700 (Tue, 17 Oct 2006) Log Message: ----------- Added support for commands to be run. Changed the way the gacd calls the alarms. It now passes the dbase key to the alarm gui. Added a check in the dbase. gac now exits when the dbase can't be opened. Modified Paths: -------------- Changelog TODO gac_alarm_gui.py gac_client_gui.py gac_dialogs.py gac_gui.glade gac_gui.glade.bak gacd.py gacd_message.py version.py Modified: Changelog =================================================================== --- Changelog 2006-10-16 08:03:31 UTC (rev 26) +++ Changelog 2006-10-17 18:33:02 UTC (rev 27) @@ -1,3 +1,11 @@ +gac (0.8) + * New release. + * Added support for commands to be run. + * Changed the way the gacd calls the alarms. + It now passes the dbase key to the alarm gui. + * Added a check in the dbase. gac now exits when the dbase + can't be opened. + gac (0.7) * Bugfix release * Fixed crashing when starting without a .gac tree. Modified: TODO =================================================================== --- TODO 2006-10-16 08:03:31 UTC (rev 26) +++ TODO 2006-10-17 18:33:02 UTC (rev 27) @@ -5,5 +5,10 @@ Add menu option: purge old alarms on startup yes/no -Make 'run commands' work +When the deamon is restarted the gui must be updated because the daemon +can remove old alarms +user quits the alarm, how to stop sound? + +about dialog not yet +handbook not yet Modified: gac_alarm_gui.py =================================================================== --- gac_alarm_gui.py 2006-10-16 08:03:31 UTC (rev 26) +++ gac_alarm_gui.py 2006-10-17 18:33:02 UTC (rev 27) @@ -26,6 +26,7 @@ import os,sys,threading from gac_constants import * +import gacd_message import pygtk pygtk.require('2.0') @@ -44,45 +45,59 @@ def on_buttonclose_clicked(self,*args): gtk.main_quit() + + +def worker(obj_key): + print "worker called",obj_key + gdm = gacd_message.GacdMessenger() + objs = gdm.has_message(obj_key) + if objs: + obj = objs[0] + text = obj['text'] + font = obj['font'] + color = obj['bg_color'] + time = obj['alarmtime'] + sound = obj['beep'] + sound_n = obj['beep_times'] + cmd = obj['command'] + if cmd: + if DEBUG: print "command called %s" % obj['command'] + out = os.popen('%s' % obj['command']) + if out.close(): + print "error starting %s" % obj['command'] + else: + # We build and start a GTK toplevel window + dlg = DialogAlarmMessage() + map = dlg.mainwin.get_colormap() + gdkcolor = map.alloc_color(color) -def worker(text,font,color,time,sound,sound_n): - dlg = DialogAlarmMessage() - map = dlg.mainwin.get_colormap() - gdkcolor = map.alloc_color(color) - - # set the color map to the widgets - #style = dlg.mainwin.get_style().copy() - #style.bg[gtk.STATE_NORMAL] = gdkcolor - #dlg.mainwin.set_style(style) - - label = gtk.Label(time) - label.modify_font(pango.FontDescription("sans 24")) - ebox = dlg.gladexml.get_widget('eventbox5') - # The label gets it's bg color from it's parent, in this case an eventbox - #ebox.modify_bg(gtk.STATE_NORMAL,gdkcolor) - ebox.add(label) + label = gtk.Label(time) + label.modify_font(pango.FontDescription("sans 24")) + ebox = dlg.gladexml.get_widget('eventbox5') + # The label gets it's bg color from it's parent, in this case an eventbox + #ebox.modify_bg(gtk.STATE_NORMAL,gdkcolor) + ebox.add(label) + + tv = dlg.gladexml.get_widget('textview3') + tv.modify_base(gtk.STATE_NORMAL,gdkcolor) + tv.modify_font(pango.FontDescription(font)) + tv.set_cursor_visible(0) + buf = tv.get_buffer() + buf.set_text(text) - tv = dlg.gladexml.get_widget('textview3') - tv.modify_base(gtk.STATE_NORMAL,gdkcolor) - tv.modify_font(pango.FontDescription(font)) - tv.set_cursor_visible(0) - buf = tv.get_buffer() - buf.set_text(text) + dlg.mainwin.show_all() + # play the sound if it's set + # TODO: XXX quit the alarm, how to stop sound? + if sound: + import play_alarm + t = threading.Thread(target=play_alarm.play,args=(sound,int(sound_n))) + t.start() - dlg.mainwin.show_all() - # play the sound if it's set - # TODO: XXX quit the alarm? - if sound: - import play_alarm - t = threading.Thread(target=play_alarm.play,args=(sound,int(sound_n))) - t.start() + gtk.main() - gtk.main() - if __name__ == '__main__': if DEBUG: print "sys.argv",sys.argv - t, f, c, ti, snd, snd_n = sys.argv[1:] - worker(text=t,font=f,color=c,time="Time: %s" % ti,sound=snd,sound_n=snd_n) + worker(sys.argv[1]) Modified: gac_client_gui.py =================================================================== --- gac_client_gui.py 2006-10-16 08:03:31 UTC (rev 26) +++ gac_client_gui.py 2006-10-17 18:33:02 UTC (rev 27) @@ -167,17 +167,24 @@ def on_handbook_activate(self, widget, *args): print "on_handbook_activate called with self.%s" % widget.get_name() + # TODO: make this work + text = "Sorry, not ready yet" + gac_dialogs.InfoDialog(txt=text) def on_about_activate(self, widget, *args): print "on_gtkabout_activate called with self.%s" % widget.get_name() + # TODO: make this work + text = "Sorry, not ready yet" + gac_dialogs.InfoDialog(txt=text) + #####test code - data = {'text':'hallo gacd',\ - 'command':'test command',\ - 'bg_color':'None',\ - 'alarmdate':'2006:9:18',\ - 'alarmtime':'17:10',\ - 'stopdaemon':'0'} - self.store_alarm(data) +## data = {'text':'hallo gacd',\ +## 'command':'test command',\ +## 'bg_color':'None',\ +## 'alarmdate':'2006:9:18',\ +## 'alarmtime':'17:10',\ +## 'stopdaemon':'0'} +## self.store_alarm(data) def update_alarm(self,d): """Called by the listview toggle event after changing the alarm in the Modified: gac_dialogs.py =================================================================== --- gac_dialogs.py 2006-10-16 08:03:31 UTC (rev 26) +++ gac_dialogs.py 2006-10-17 18:33:02 UTC (rev 27) @@ -55,6 +55,7 @@ path) self.messageframe = self.gladexml.get_widget('frame_message') self.commandframe = self.gladexml.get_widget('frame_command') + self.path = '' # add a comboentrybox as it's not properly added by glade box = self.gladexml.get_widget('eventbox7') self.cb = gtk.combo_box_entry_new_text() @@ -93,7 +94,7 @@ self.gladexml.get_widget('spinbutton3').set_value(d) self.gladexml.get_widget('spinbutton4').set_value(m) self.gladexml.get_widget('spinbutton5').set_value(y) - + self.gladexml.get_widget('textview1').show_all() def on_message_toggled(self,widget): @@ -128,12 +129,26 @@ # Same as with hexcol self.font = widget.get_font_name() - def on_filechooserbutton_clicked(self,widget): + def on_filechooserbutton_clicked(self,widget,*args): """ Callback when user chooses a path. This sets the 'path' attribute - containing the choosen path""" - # Same as with hexcol - self.path = widget.get_filename() + containing the choosen path""" + # TODO: set command in text entry + dlg = gtk.FileChooserDialog(title=None,\ + action=gtk.FILE_CHOOSER_ACTION_OPEN,\ + buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,\ + gtk.STOCK_OPEN,gtk.RESPONSE_OK)) + dlg.set_current_folder(os.path.expanduser('~')) + response = dlg.run() + if response == gtk.RESPONSE_OK: + self.path = dlg.get_filename() + self.gladexml.get_widget('entry3').set_text(self.path) + elif response == gtk.RESPONSE_CANCEL: + pass + dlg.destroy() + def on_entry3_activate(self,widget,*args): + self.path = widget.get_text() + def get_data(self): """Get data entered by the user""" text = utils.get_all_text_tv(self.gladexml.get_widget('textview1').get_buffer()) Modified: gac_gui.glade =================================================================== --- gac_gui.glade 2006-10-16 08:03:31 UTC (rev 26) +++ gac_gui.glade 2006-10-17 18:33:02 UTC (rev 27) @@ -920,7 +920,7 @@ <widget class="GtkHBox" id="hbox3"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="spacing">4</property> <child> <widget class="GtkLabel" id="label5"> @@ -948,15 +948,17 @@ </child> <child> - <widget class="GtkFileChooserButton" id="filechooserbutton1"> + <widget class="GtkEntry" id="entry3"> <property name="visible">True</property> - <property name="title" translatable="yes">Select A File</property> - <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> - <property name="local_only">True</property> - <property name="show_hidden">False</property> - <property name="do_overwrite_confirmation">False</property> - <property name="width_chars">-1</property> - <signal name="file_activated" handler="on_filechooserbutton_clicked"/> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + <signal name="activate" handler="on_entry3_activate" last_modification_time="Tue, 17 Oct 2006 18:28:09 GMT"/> </widget> <packing> <property name="padding">0</property> @@ -964,6 +966,85 @@ <property name="fill">True</property> </packing> </child> + + <child> + <widget class="GtkButton" id="filechooserbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_filechooserbutton_clicked" last_modification_time="Tue, 17 Oct 2006 15:26:40 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment18"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox13"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image11"> + <property name="visible">True</property> + <property name="stock">gtk-open</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label27"> + <property name="visible">True</property> + <property name="label" translatable="yes">Browse</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="padding">8</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> </child> </widget> @@ -2275,10 +2356,6 @@ </child> </widget> </child> - - <child> - <placeholder/> - </child> </widget> <packing> <property name="padding">0</property> @@ -2337,10 +2414,6 @@ </child> </widget> </child> - - <child> - <placeholder/> - </child> </widget> <packing> <property name="padding">0</property> @@ -2395,10 +2468,6 @@ </child> </widget> </child> - - <child> - <placeholder/> - </child> </widget> <packing> <property name="padding">0</property> Modified: gac_gui.glade.bak =================================================================== --- gac_gui.glade.bak 2006-10-16 08:03:31 UTC (rev 26) +++ gac_gui.glade.bak 2006-10-17 18:33:02 UTC (rev 27) @@ -920,7 +920,7 @@ <widget class="GtkHBox" id="hbox3"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="spacing">4</property> <child> <widget class="GtkLabel" id="label5"> @@ -948,15 +948,16 @@ </child> <child> - <widget class="GtkFileChooserButton" id="filechooserbutton1"> + <widget class="GtkEntry" id="entry3"> <property name="visible">True</property> - <property name="title" translatable="yes">Select A File</property> - <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> - <property name="local_only">True</property> - <property name="show_hidden">False</property> - <property name="do_overwrite_confirmation">False</property> - <property name="width_chars">-1</property> - <signal name="file_activated" handler="on_filechooserbutton_clicked"/> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> </widget> <packing> <property name="padding">0</property> @@ -964,6 +965,85 @@ <property name="fill">True</property> </packing> </child> + + <child> + <widget class="GtkButton" id="filechooserbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_filechooserbutton_clicked" last_modification_time="Tue, 17 Oct 2006 15:26:40 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment18"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox13"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image11"> + <property name="visible">True</property> + <property name="stock">gtk-open</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label27"> + <property name="visible">True</property> + <property name="label" translatable="yes">Browse</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="padding">8</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> </child> </widget> @@ -2275,10 +2355,6 @@ </child> </widget> </child> - - <child> - <placeholder/> - </child> </widget> <packing> <property name="padding">0</property> @@ -2311,7 +2387,15 @@ <widget class="GtkLabel" id="label25"> <property name="visible">True</property> <property name="label">Copyright 2006 Stas Zytkiewicz -contact: sta...@us...</property> +Contact: sta...@us... + +GAC website: http://gac.sf.net + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of +the License, or (at your option) any later version. +</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -2329,10 +2413,6 @@ </child> </widget> </child> - - <child> - <placeholder/> - </child> </widget> <packing> <property name="padding">0</property> @@ -2387,10 +2467,6 @@ </child> </widget> </child> - - <child> - <placeholder/> - </child> </widget> <packing> <property name="padding">0</property> Modified: gacd.py =================================================================== --- gacd.py 2006-10-16 08:03:31 UTC (rev 26) +++ gacd.py 2006-10-17 18:33:02 UTC (rev 27) @@ -77,11 +77,14 @@ try: # we leave the alarm in the dbase, the user can remove it ot # it will purged the next time gac starts. - out = os.popen('cd %s; \ - python gac_alarm_gui.py "%s" "%s" "%s" "%s" "%s" "%s" &' % \ - (os.getcwd(),obj['text'],obj['font'],obj['bg_color'],\ - gacd_message.make_key()[:5],\ - obj['beep'],obj['beep_times'])) +## out = os.popen('cd %s; \ +## python gac_alarm_gui.py "%s" "%s" "%s" "%s" "%s" "%s" &' % \ +## (os.getcwd(),obj['text'],obj['font'],obj['bg_color'],\ +## gacd_message.make_key()[:5],\ +## obj['beep'],obj['beep_times'])) + if _DEBUG: print "gac_alarm_gui called %s %s" % (os.getcwd(),obj['key']) + out = os.popen('cd %s; python gac_alarm_gui.py "%s" &' % \ + (os.getcwd(),obj['key'])) if out.close(): print "error starting gac alarm" except Exception,info: Modified: gacd_message.py =================================================================== --- gacd_message.py 2006-10-16 08:03:31 UTC (rev 26) +++ gacd_message.py 2006-10-17 18:33:02 UTC (rev 27) @@ -80,13 +80,14 @@ same time then the alarmitem is appended to the alarmitem.""" # key is "year:month:day:hour:minute" def __init__(self,filename=shelve_path): - #self.__D = shelve.open(filename,writeback=True) self.filename = filename try: self.__D = cPickle.load(open(self.filename,'rb')) except Exception,info: print "Failed to open",self.filename print info + force_release_lock() + sys.exit(1) if not os.path.exists(shelve_lock): open(shelve_lock,'w').close() # 'keys' is used to hold all current alarm keys Modified: version.py =================================================================== --- version.py 2006-10-16 08:03:31 UTC (rev 26) +++ version.py 2006-10-17 18:33:02 UTC (rev 27) @@ -1,3 +1,3 @@ -# Used by the maketarball script aqnd the about widget +# Used by the maketarball script and the about widget -VERSION = 0.7 +VERSION = 0.8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-16 08:03:43
|
Revision: 26 http://svn.sourceforge.net/gac/?rev=26&view=rev Author: stas_zytkiewicz Date: 2006-10-16 01:03:31 -0700 (Mon, 16 Oct 2006) Log Message: ----------- Change file encoding Changed the copyright notice. Modified Paths: -------------- copyright gac.py gac_alarm_gui.py gac_client_gui.py gac_constants.py gac_dialogs.py gac_widgets.py gacd.py gacd_message.py play_alarm.py utils.py Modified: copyright =================================================================== --- copyright 2006-10-12 13:41:44 UTC (rev 25) +++ copyright 2006-10-16 08:03:31 UTC (rev 26) @@ -4,10 +4,9 @@ Stas Zytkiewicz - sta...@gm... This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - + it under the terms of version 2 of the GNU General Public License + as published by the Free Software Foundation. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Modified: gac.py =================================================================== --- gac.py 2006-10-12 13:41:44 UTC (rev 25) +++ gac.py 2006-10-16 08:03:31 UTC (rev 26) @@ -1,15 +1,15 @@ #!/usr/bin/env python -# -*- coding: latin-1 -*- +# -*- coding: utf-8 -*- # Copyright (c) 2006 Stas Zykiewicz <sta...@gm...> # # gac.py # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License +# as published by the Free Software Foundation. A copy of this license should +# be included in the file GPL-2. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of Modified: gac_alarm_gui.py =================================================================== --- gac_alarm_gui.py 2006-10-12 13:41:44 UTC (rev 25) +++ gac_alarm_gui.py 2006-10-16 08:03:31 UTC (rev 26) @@ -1,13 +1,13 @@ -# -*- coding: latin-1 -*- +# -*- coding: utf-8 -*- # Copyright (c) 2006 Stas Zykiewicz <sta...@gm...> # # gac_alarm_gui.py # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License +# as published by the Free Software Foundation. A copy of this license should +# be included in the file GPL-2. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of Modified: gac_client_gui.py =================================================================== --- gac_client_gui.py 2006-10-12 13:41:44 UTC (rev 25) +++ gac_client_gui.py 2006-10-16 08:03:31 UTC (rev 26) @@ -1,14 +1,14 @@ #!/usr/bin/env python -# -*- coding: latin-1 -*- +# -*- coding: utf-8 -*- # Copyright (c) 2006 Stas Zykiewicz <sta...@gm...> # # gac_client_gui.py # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License +# as published by the Free Software Foundation. A copy of this license should +# be included in the file GPL-2. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of Modified: gac_constants.py =================================================================== --- gac_constants.py 2006-10-12 13:41:44 UTC (rev 25) +++ gac_constants.py 2006-10-16 08:03:31 UTC (rev 26) @@ -1,3 +1,23 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2006 Stas Zykiewicz <sta...@gm...> +# +# gac_constants.py +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License +# as published by the Free Software Foundation. A copy of this license should +# be included in the file GPL-2. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + # This file provides paths and constants used in GAC. # Distro packagers can change the paths in here to suit their needs. Modified: gac_dialogs.py =================================================================== --- gac_dialogs.py 2006-10-12 13:41:44 UTC (rev 25) +++ gac_dialogs.py 2006-10-16 08:03:31 UTC (rev 26) @@ -1,14 +1,14 @@ #!/usr/bin/env python -# -*- coding: latin-1 -*- +# -*- coding: utf-8 -*- # Copyright (c) 2006 Stas Zykiewicz <sta...@gm...> # # gac_alarm_gui.py # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License +# as published by the Free Software Foundation. A copy of this license should +# be included in the file GPL-2. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of Modified: gac_widgets.py =================================================================== --- gac_widgets.py 2006-10-12 13:41:44 UTC (rev 25) +++ gac_widgets.py 2006-10-16 08:03:31 UTC (rev 26) @@ -1,13 +1,13 @@ -# -*- coding: latin-1 -*- +# -*- coding: utf-8 -*- # Copyright (c) 2006 Stas Zykiewicz <sta...@gm...> # # gac_widgets.py # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License +# as published by the Free Software Foundation. A copy of this license should +# be included in the file GPL-2. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of Modified: gacd.py =================================================================== --- gacd.py 2006-10-12 13:41:44 UTC (rev 25) +++ gacd.py 2006-10-16 08:03:31 UTC (rev 26) @@ -1,15 +1,15 @@ #!/usr/bin/env python -# -*- coding: latin-1 -*- +# -*- coding: utf-8 -*- # Copyright (c) 2006 Stas Zykiewicz <sta...@gm...> # # gacd.py # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License +# as published by the Free Software Foundation. A copy of this license should +# be included in the file GPL-2. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of Modified: gacd_message.py =================================================================== --- gacd_message.py 2006-10-12 13:41:44 UTC (rev 25) +++ gacd_message.py 2006-10-16 08:03:31 UTC (rev 26) @@ -1,13 +1,13 @@ -# -*- coding: latin-1 -*- +# -*- coding: utf-8 -*- # Copyright (c) 2006 Stas Zykiewicz <sta...@gm...> # # gac_client.py # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License +# as published by the Free Software Foundation. A copy of this license should +# be included in the file GPL-2. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of Modified: play_alarm.py =================================================================== --- play_alarm.py 2006-10-12 13:41:44 UTC (rev 25) +++ play_alarm.py 2006-10-16 08:03:31 UTC (rev 26) @@ -1,4 +1,23 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2006 Stas Zykiewicz <sta...@gm...> +# +# play_alarm.py +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License +# as published by the Free Software Foundation. A copy of this license should +# be included in the file GPL-2. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + import wave,ossaudiodev,os def play(file,n=1): Modified: utils.py =================================================================== --- utils.py 2006-10-12 13:41:44 UTC (rev 25) +++ utils.py 2006-10-16 08:03:31 UTC (rev 26) @@ -1,13 +1,13 @@ -# -*- coding: latin-1 -*- +# -*- coding: utf-8 -*- # Copyright (c) 2006 Stas Zykiewicz <sta...@gm...> # # utils.py # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License +# as published by the Free Software Foundation. A copy of this license should +# be included in the file GPL-2. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-12 13:41:47
|
Revision: 25 http://svn.sourceforge.net/gac/?rev=25&view=rev Author: stas_zytkiewicz Date: 2006-10-12 06:41:44 -0700 (Thu, 12 Oct 2006) Log Message: ----------- update Modified Paths: -------------- htdocs/index.html Modified: htdocs/index.html =================================================================== --- htdocs/index.html 2006-10-12 13:40:17 UTC (rev 24) +++ htdocs/index.html 2006-10-12 13:41:44 UTC (rev 25) @@ -98,10 +98,11 @@ or send a email to the GAC author: stas <i>underscore</i> zytkiewicz <i>at</i> gmail <i>dot</i> com. </td></tr> </table> +<br><br> <center> <a href="http://www.oxfam.org"><img src="aware468x60.gif" alt="Oxfam - United for a more equitable world." border="0" width="468" height="60"></a> </center> -<BR><BR><BR><BR><BR><BR><BR><BR><BR> +<BR><BR> <center> <a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=178342&type=3" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a> </center> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-12 13:40:25
|
Revision: 24 http://svn.sourceforge.net/gac/?rev=24&view=rev Author: stas_zytkiewicz Date: 2006-10-12 06:40:17 -0700 (Thu, 12 Oct 2006) Log Message: ----------- added oxfam logo Modified Paths: -------------- htdocs/index.html Added Paths: ----------- htdocs/aware468x60.gif Added: htdocs/aware468x60.gif =================================================================== (Binary files differ) Property changes on: htdocs/aware468x60.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: htdocs/index.html =================================================================== --- htdocs/index.html 2006-10-12 13:29:30 UTC (rev 23) +++ htdocs/index.html 2006-10-12 13:40:17 UTC (rev 24) @@ -98,10 +98,9 @@ or send a email to the GAC author: stas <i>underscore</i> zytkiewicz <i>at</i> gmail <i>dot</i> com. </td></tr> </table> -<!-- -<H3>.: thank you!</h3> -<p align="justify">Thank you for choosing Steves-Templates! I appreciate your support and hope you find my work useful. If you have any questions or need help, visit the user guide or contact page on my site. Good luck with your new site!</p> - --> +<center> +<a href="http://www.oxfam.org"><img src="aware468x60.gif" alt="Oxfam - United for a more equitable world." border="0" width="468" height="60"></a> +</center> <BR><BR><BR><BR><BR><BR><BR><BR><BR> <center> <a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=178342&type=3" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-12 13:29:35
|
Revision: 23 http://svn.sourceforge.net/gac/?rev=23&view=rev Author: stas_zytkiewicz Date: 2006-10-12 06:29:30 -0700 (Thu, 12 Oct 2006) Log Message: ----------- added sf logo Modified Paths: -------------- htdocs/index.html Modified: htdocs/index.html =================================================================== --- htdocs/index.html 2006-10-12 09:05:35 UTC (rev 22) +++ htdocs/index.html 2006-10-12 13:29:30 UTC (rev 23) @@ -102,8 +102,11 @@ <H3>.: thank you!</h3> <p align="justify">Thank you for choosing Steves-Templates! I appreciate your support and hope you find my work useful. If you have any questions or need help, visit the user guide or contact page on my site. Good luck with your new site!</p> --> +<BR><BR><BR><BR><BR><BR><BR><BR><BR> +<center> +<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=178342&type=3" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a> +</center> <BR><BR><BR><BR><BR><BR><BR><BR><BR> -<BR><BR><BR><BR><BR><BR><BR><BR><BR> <center>Web site contents \xA9 Copyleft Stas Zytkiewicz 2006.</center> <!-------------------------- End of content area -----------------------------------------------------> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-12 09:05:42
|
Revision: 22 http://svn.sourceforge.net/gac/?rev=22&view=rev Author: stas_zytkiewicz Date: 2006-10-12 02:05:35 -0700 (Thu, 12 Oct 2006) Log Message: ----------- Fixed startup crash release 0.7 Modified Paths: -------------- Changelog gac_constants.py htdocs/index.html version.py Modified: Changelog =================================================================== --- Changelog 2006-10-09 07:28:22 UTC (rev 21) +++ Changelog 2006-10-12 09:05:35 UTC (rev 22) @@ -1,3 +1,7 @@ +gac (0.7) + * Bugfix release + * Fixed crashing when starting without a .gac tree. + gac (0.6) * initial release. Modified: gac_constants.py =================================================================== --- gac_constants.py 2006-10-09 07:28:22 UTC (rev 21) +++ gac_constants.py 2006-10-12 09:05:35 UTC (rev 22) @@ -1,11 +1,11 @@ # This file provides paths and constants used in GAC. # Distro packagers can change the paths in here to suit their needs. -import os,shutil +import os,shutil,cPickle # Paths that are used globally LOCKPATH = '/var/lock/gacd.lock' -SOUNDSPATH = '/usr/local/gac/sounds' +SOUNDSPATH = '/usr/local/share/gac/sounds' PICSPATH = '/usr/local/share/icons' gladefile = 'gac_gui.glade' glade_dir = '/usr/local/share/gac' @@ -29,8 +29,10 @@ sound_path = os.path.join(gac_home_path,'sounds') if not os.path.exists(gac_home_path): + print "No %s directory, making new one" % gac_home_path os.makedirs(gac_home_path) if not os.path.exists(sound_path): + print "No %s directory, making new one" % sound_path try: shutil.copytree(SOUNDSPATH,sound_path) except Exception,info: @@ -38,6 +40,7 @@ print "Failled to copy the soundfiles to your home dir" if not os.path.exists(shelve_path): + print "No %s found, making new one" % shelve_path try: cPickle.dump({'keys':[],'alarm_templates':[]},open(shelve_path,'wb'),-1) except Exception,info: Modified: htdocs/index.html =================================================================== --- htdocs/index.html 2006-10-09 07:28:22 UTC (rev 21) +++ htdocs/index.html 2006-10-12 09:05:35 UTC (rev 22) @@ -67,7 +67,13 @@ <!------------------------ Content area, delete anything below this comment and add your content below ----------------------------> <table width="100%" cellpadding="2" cellspacing="2" border="0"> <tr valign="top"> -<td > +<td > +<h3>.:News</h3> +<p align="justify"> +Version 0.7 fixes a nasty crash on startup +<br><br> +</td></tr> +<tr><td> <H3>.: What is GAC?</h3> <p align="justify"> GAC stands for (G)TK (A)Larm (C)lock and is intended for the GNU/Linux system.<br> Modified: version.py =================================================================== --- version.py 2006-10-09 07:28:22 UTC (rev 21) +++ version.py 2006-10-12 09:05:35 UTC (rev 22) @@ -1,3 +1,3 @@ # Used by the maketarball script aqnd the about widget -VERSION = 0.6 +VERSION = 0.7 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-09 07:28:29
|
Revision: 21 http://svn.sourceforge.net/gac/?rev=21&view=rev Author: stas_zytkiewicz Date: 2006-10-09 00:28:22 -0700 (Mon, 09 Oct 2006) Log Message: ----------- Update Modified Paths: -------------- TODO Modified: TODO =================================================================== --- TODO 2006-10-08 14:40:08 UTC (rev 20) +++ TODO 2006-10-09 07:28:22 UTC (rev 21) @@ -1,6 +1,9 @@ Make gac like this: if trayicon module is available use it, otherwise be a regular window. +(trayicon is part of the gnome-python stuff) Add menu option: purge old alarms on startup yes/no +Make 'run commands' work + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-08 14:40:13
|
Revision: 20 http://svn.sourceforge.net/gac/?rev=20&view=rev Author: stas_zytkiewicz Date: 2006-10-08 07:40:08 -0700 (Sun, 08 Oct 2006) Log Message: ----------- Fixed path issue for glade files Modified Paths: -------------- filelist gac_alarm_gui.py setup Modified: filelist =================================================================== --- filelist 2006-10-08 09:32:43 UTC (rev 19) +++ filelist 2006-10-08 14:40:08 UTC (rev 20) @@ -12,7 +12,7 @@ gac_constants.py gac.py play_alarm.py -gac_24.png +gac_28x28.png gac_gui.glade gac_gui.gladep setup Modified: gac_alarm_gui.py =================================================================== --- gac_alarm_gui.py 2006-10-08 09:32:43 UTC (rev 19) +++ gac_alarm_gui.py 2006-10-08 14:40:08 UTC (rev 20) @@ -25,11 +25,8 @@ out.start('/tmp/gac_alarm_out','/tmp/gac_alarm_err') import os,sys,threading +from gac_constants import * -gladefile = "gac_gui.glade" -glade_dir = "" -gladepath = os.path.join(glade_dir,gladefile) - import pygtk pygtk.require('2.0') import gtk Modified: setup =================================================================== --- setup 2006-10-08 09:32:43 UTC (rev 19) +++ setup 2006-10-08 14:40:08 UTC (rev 20) @@ -26,7 +26,7 @@ system('cp -f *.glade /usr/local/share/gac/') system('cp -f *.gladep /usr/local/share/gac/') system('cp -rf sounds /usr/local/share/gac') -system('chmod 0755 /usr/local/gac/gac.py') +system('chmod 0755 /usr/local/lib/gac/gac.py') system('cp gac.sh /usr/local/bin/gac') system('cp gac_28x28.png /usr/local/share/icons/') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-08 09:33:00
|
Revision: 19 http://svn.sourceforge.net/gac/?rev=19&view=rev Author: stas_zytkiewicz Date: 2006-10-08 02:32:43 -0700 (Sun, 08 Oct 2006) Log Message: ----------- added stuff Modified Paths: -------------- htdocs/gaclogo1.jpg Added Paths: ----------- docs/ docs/gac.1.gz gac_28x28.png gac_96x96.png htdocs/blanklogo.jpg htdocs/blanklogo1.jpg sounds/warning.wav Added: docs/gac.1.gz =================================================================== (Binary files differ) Property changes on: docs/gac.1.gz ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: gac_28x28.png =================================================================== (Binary files differ) Property changes on: gac_28x28.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: gac_96x96.png =================================================================== (Binary files differ) Property changes on: gac_96x96.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: htdocs/blanklogo.jpg =================================================================== (Binary files differ) Property changes on: htdocs/blanklogo.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: htdocs/blanklogo1.jpg =================================================================== (Binary files differ) Property changes on: htdocs/blanklogo1.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: htdocs/gaclogo1.jpg =================================================================== (Binary files differ) Added: sounds/warning.wav =================================================================== (Binary files differ) Property changes on: sounds/warning.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-06 17:34:51
|
Revision: 18 http://svn.sourceforge.net/gac/?rev=18&view=rev Author: stas_zytkiewicz Date: 2006-10-06 10:34:42 -0700 (Fri, 06 Oct 2006) Log Message: ----------- updated Added Paths: ----------- gac.sh Added: gac.sh =================================================================== --- gac.sh (rev 0) +++ gac.sh 2006-10-06 17:34:42 UTC (rev 18) @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/local/lib/gac/gac.py & This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-06 17:06:37
|
Revision: 17 http://svn.sourceforge.net/gac/?rev=17&view=rev Author: stas_zytkiewicz Date: 2006-10-06 10:06:22 -0700 (Fri, 06 Oct 2006) Log Message: ----------- Added sound playing support refactor the setup script changed icons used added menu options Modified Paths: -------------- TODO filelist gac.py gac_alarm_gui.py gac_client_gui.py gac_constants.py gac_dialogs.py gac_gui.glade gac_gui.glade.bak gacd.py play_alarm.py setup utils.py Modified: TODO =================================================================== --- TODO 2006-10-06 08:45:20 UTC (rev 16) +++ TODO 2006-10-06 17:06:22 UTC (rev 17) @@ -1,5 +1,6 @@ -implement the beep part. - Make gac like this: if trayicon module is available use it, otherwise be a regular window. + +Add menu option: purge old alarms on startup yes/no + Modified: filelist =================================================================== --- filelist 2006-10-06 08:45:20 UTC (rev 16) +++ filelist 2006-10-06 17:06:22 UTC (rev 17) @@ -15,3 +15,5 @@ gac_24.png gac_gui.glade gac_gui.gladep +setup +gac.sh Modified: gac.py =================================================================== --- gac.py 2006-10-06 08:45:20 UTC (rev 16) +++ gac.py 2006-10-06 17:06:22 UTC (rev 17) @@ -29,7 +29,7 @@ import sys,os,__builtin__ from gac_constants import * -clockpic_path = os.path.join(PICSPATH,'gac_24.png') +clockpic_path = os.path.join(PICSPATH,'gac_28x28.png') import utils import gac_widgets @@ -95,8 +95,8 @@ if GDEBUG: print "gacd is not running" # daemon is started in a separate process so that it will continue # to run when the user kills us. - if GDEBUG: print "starting gacd > 'cd %s; python gacd.py &'" % os.getcwd() - out = os.popen('cd %s; python gacd.py &' % os.getcwd()) + if GDEBUG: print "starting gacd > 'cd %s; python gacd.py &'" % utils.get_rootdir() + out = os.popen('cd %s; python gacd.py &' % utils.get_rootdir()) if out.close(): print "error strarting gac daemon" sys.exit(1) Modified: gac_alarm_gui.py =================================================================== --- gac_alarm_gui.py 2006-10-06 08:45:20 UTC (rev 16) +++ gac_alarm_gui.py 2006-10-06 17:06:22 UTC (rev 17) @@ -24,7 +24,7 @@ import out out.start('/tmp/gac_alarm_out','/tmp/gac_alarm_err') -import os,sys +import os,sys,threading gladefile = "gac_gui.glade" glade_dir = "" @@ -48,7 +48,7 @@ def on_buttonclose_clicked(self,*args): gtk.main_quit() -def worker(text,font,color,time): +def worker(text,font,color,time,sound,sound_n): dlg = DialogAlarmMessage() map = dlg.mainwin.get_colormap() gdkcolor = map.alloc_color(color) @@ -73,13 +73,19 @@ buf.set_text(text) dlg.mainwin.show_all() - + # play the sound if it's set + # TODO: XXX quit the alarm? + if sound: + import play_alarm + t = threading.Thread(target=play_alarm.play,args=(sound,int(sound_n))) + t.start() + gtk.main() if __name__ == '__main__': if DEBUG: print "sys.argv",sys.argv - t, f, c, ti = sys.argv[1:] - worker(text=t,font=f,color=c,time="Time: %s" % ti) + t, f, c, ti, snd, snd_n = sys.argv[1:] + worker(text=t,font=f,color=c,time="Time: %s" % ti,sound=snd,sound_n=snd_n) Modified: gac_client_gui.py =================================================================== --- gac_client_gui.py 2006-10-06 08:45:20 UTC (rev 16) +++ gac_client_gui.py 2006-10-06 17:06:22 UTC (rev 17) @@ -159,8 +159,8 @@ def on_startalarmclock_activate(self, widget, *args): self.on_stopalarmclock_activate(widget) - print "Starting the gac daemon" - out = os.popen('cd %s; python gacd.py &' % os.getcwd()) + print "Starting the gac daemon",'cd %s; python gacd.py &' % utils.get_rootdir() + out = os.popen('cd %s; python gacd.py &' % utils.get_rootdir()) if out.close(): print "error starting gac daemon" return 1 Modified: gac_constants.py =================================================================== --- gac_constants.py 2006-10-06 08:45:20 UTC (rev 16) +++ gac_constants.py 2006-10-06 17:06:22 UTC (rev 17) @@ -1,14 +1,14 @@ # This file provides paths and constants used in GAC. # Distro packagers can change the paths in here to suit their needs. -import os +import os,shutil # Paths that are used globally LOCKPATH = '/var/lock/gacd.lock' -SOUNDSPATH = '/usr/local/share/gac/sounds' -PICSPATH = '/usr/local/icons' +SOUNDSPATH = '/usr/local/gac/sounds' +PICSPATH = '/usr/local/share/icons' gladefile = 'gac_gui.glade' -glade_dir = '' +glade_dir = '/usr/local/share/gac' gladepath = os.path.join(glade_dir,gladefile) locale_dir = "" @@ -17,7 +17,7 @@ # Modules must import them from this module alarmitem = {'text':'','command':'','bg_color':'#FFFF00000000','alarmdate':'',\ 'alarmtime':'','alarmid':'','font':'','stopdaemon':'',\ - 'setalarm':True,'key':''} + 'setalarm':True,'key':'','beep':'','beep_times':1} # path names related to the users homedir shelve_file = 'gacshelve' @@ -31,8 +31,12 @@ if not os.path.exists(gac_home_path): os.makedirs(gac_home_path) if not os.path.exists(sound_path): - os.makedirs(sound_path) - + try: + shutil.copytree(SOUNDSPATH,sound_path) + except Exception,info: + print info + print "Failled to copy the soundfiles to your home dir" + if not os.path.exists(shelve_path): try: cPickle.dump({'keys':[],'alarm_templates':[]},open(shelve_path,'wb'),-1) Modified: gac_dialogs.py =================================================================== --- gac_dialogs.py 2006-10-06 08:45:20 UTC (rev 16) +++ gac_dialogs.py 2006-10-06 17:06:22 UTC (rev 17) @@ -18,7 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -import os,sys,time +import os,sys,time,glob from gac_constants import * @@ -30,6 +30,7 @@ import gtk.glade from gacd_message import alarmitem +import utils # All the dialogs are build from glade when they are constructed. # You can do: @@ -54,14 +55,29 @@ path) self.messageframe = self.gladexml.get_widget('frame_message') self.commandframe = self.gladexml.get_widget('frame_command') + # add a comboentrybox as it's not properly added by glade + box = self.gladexml.get_widget('eventbox7') + self.cb = gtk.combo_box_entry_new_text() + box.add(self.cb) + box.show_all() # fill comboentry with soundfiles found. This way users can add their own sounds. - + self.soundpath = os.path.join(os.path.expanduser('~'),'.gac/sounds/') + files = glob.glob(os.path.join(self.soundpath,'*.wav')) + files.sort() + if files: + for path in files: + self.cb.append_text(os.path.basename(path)) + self.cb.set_active(0) + self.cb.set_sensitive(False) if template_obj: self.hexcol = template_obj['bg_color'] self.path = template_obj['command'] self.font = template_obj['font'] buffer = self.gladexml.get_widget('textview1').get_buffer() buffer.set_text(template_obj['text']) + # beep will hold the path to the sound file or none. + self.beep = template_obj['beep'] + self.gladexml.get_widget('checkbutton1').set_active(self.beep) else: # This way we always have a hexcol and path attr even when the user hits cancel. self.hexcol = "#FFFF00000000" @@ -69,6 +85,7 @@ self.font = 'Sans 12' gtkcol = gtk.gdk.color_parse(self.hexcol) self.gladexml.get_widget('colorbutton1').set_color(gtkcol) + # fill the spinbutton with the current time and date y,m,d,h,mi = time.localtime()[:5] self.gladexml.get_widget('spinbutton1').set_value(h) @@ -83,6 +100,10 @@ self.messageframe.set_sensitive(widget.get_active()) def on_command_toggled(self,widget): self.commandframe.set_sensitive(widget.get_active()) + def on_beep_toggled(self,widget): + self.gladexml.get_widget('spinbutton6').set_sensitive(widget.get_active()) + self.cb.set_sensitive(widget.get_active()) + def on_colorset_button_clicked(self,widget): """ Callback when user chooses a color. This sets the 'hexcol' attribute containing the choosen color converted in a HTML hexstyle string""" @@ -115,7 +136,7 @@ def get_data(self): """Get data entered by the user""" - text = self._get_all_text() + text = utils.get_all_text_tv(self.gladexml.get_widget('textview1').get_buffer()) # get spinbuttons data spbutdata = [] for name in ['spinbutton1','spinbutton2','spinbutton3',\ @@ -133,23 +154,16 @@ aid = self.path atime = "%02d:%02d" % (spbutdata[0],spbutdata[1]) adate = "%04d:%02d:%02d" % (spbutdata[4],spbutdata[3],spbutdata[2]) + beep = utils.get_active_text_cb(self.cb) + beep_path = os.path.join(self.soundpath,beep) return {'bg_color':self.hexcol, 'command':self.path, 'text':text, 'font':self.font, 'alarmtime':atime, 'alarmdate':adate, - 'alarmid':aid} - - def _get_all_text(self): - """Return all text from the widget""" - buffer = self.gladexml.get_widget('textview1').get_buffer() - startiter = buffer.get_start_iter() - enditer = buffer.get_end_iter() - txt = buffer.get_text(startiter,enditer) - if not txt: - return '' - return txt + 'alarmid':aid, + 'beep':beep_path} class DialogNewFromTmpl(DialogBase): def __init__(self,templates,path=gladepath): @@ -198,7 +212,15 @@ def get_ID(self): return self.gladexml.get_widget('entry2').get_text() - + +class DialogAbout(DialogBase): + def __init__(self,path=gladepath): + mainwin = 'dialog_about' + DialogBase.__init__(self, + mainwin, + self, + path) + ####### Non-glade dialogs ## The dialogs that derive from WarningDialog show and destroys themselfs Modified: gac_gui.glade =================================================================== --- gac_gui.glade 2006-10-06 08:45:20 UTC (rev 16) +++ gac_gui.glade 2006-10-06 17:06:22 UTC (rev 17) @@ -645,133 +645,212 @@ </child> <child> - <widget class="GtkHBox" id="hbox2"> - <property name="border_width">4</property> + <widget class="GtkVBox" id="vbox10"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Background color:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">4</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkColorButton" id="colorbutton1"> + <widget class="GtkHBox" id="hbox2"> <property name="border_width">4</property> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Select the background color for your text message alarm. </property> - <property name="can_focus">True</property> - <property name="use_alpha">False</property> - <property name="focus_on_click">True</property> - <signal name="color_set" handler="on_colorset_button_clicked"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">0</property> - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Fontset:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">4</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="label" translatable="yes">Background color:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> - <child> - <widget class="GtkFontButton" id="fontbutton1"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Select the fontset used for your text message.</property> - <property name="can_focus">True</property> - <property name="show_style">True</property> - <property name="show_size">True</property> - <property name="use_font">False</property> - <property name="use_size">False</property> - <property name="focus_on_click">True</property> - <signal name="font_set" handler="on_fontselbutton_clicked"/> + <child> + <widget class="GtkColorButton" id="colorbutton1"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Select the background color for your text message alarm. </property> + <property name="can_focus">True</property> + <property name="use_alpha">False</property> + <property name="focus_on_click">True</property> + <signal name="color_set" handler="on_colorset_button_clicked"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="label" translatable="yes">Fontset:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFontButton" id="fontbutton1"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Select the fontset used for your text message.</property> + <property name="can_focus">True</property> + <property name="show_style">True</property> + <property name="show_size">True</property> + <property name="use_font">False</property> + <property name="use_size">False</property> + <property name="focus_on_click">True</property> + <signal name="font_set" handler="on_fontselbutton_clicked"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> </packing> </child> <child> - <widget class="GtkCheckButton" id="checkbutton1"> - <property name="border_width">4</property> + <widget class="GtkHBox" id="hbox11"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Enable this to have a short 'beep' sound when the alarm is started.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Play sound</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">True</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_playsound_toggled" last_modification_time="Mon, 02 Oct 2006 11:21:36 GMT"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">0</property> - <child> - <widget class="GtkComboBoxEntry" id="comboboxentry1"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="add_tearoffs">False</property> - <property name="has_frame">True</property> - <property name="focus_on_click">True</property> + <child> + <widget class="GtkCheckButton" id="checkbutton1"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Enable this if you want some sound when the alarm is started. +You can also set the repetition and choose a sound from the list.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Play sound</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_beep_toggled" last_modification_time="Fri, 06 Oct 2006 11:38:17 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label23"> + <property name="visible">True</property> + <property name="label" translatable="yes">Number of repetitions:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="spinbutton6"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="tooltip" translatable="yes">Choose the number of repetitions. +0 means no repetition. +1..100 the number of repetions +-1 keep repeating until the user closes the alarm.</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">True</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 -1 100 1 10 10</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkEventBox" id="eventbox7"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="visible_window">True</property> + <property name="above_child">False</property> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> </widget> @@ -2068,4 +2147,274 @@ </child> </widget> +<widget class="GtkDialog" id="dialog_about"> + <property name="visible">True</property> + <property name="title" translatable="yes">About GAC</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</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> + <property name="urgency_hint">False</property> + <property name="has_separator">True</property> + + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox8"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area8"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + + <child> + <widget class="GtkButton" id="closebutton3"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-close</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-7</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox11"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame13"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment15"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox12"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkImage" id="image10"> + <property name="visible">True</property> + <property name="pixbuf">gac_96x96.png</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">16</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label24"> + <property name="visible">True</property> + <property name="label" translatable="yes">GAC version: %s +Python version: %s +Pygtk version: %s +GTK version: %s</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">16</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame14"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment16"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkLabel" id="label25"> + <property name="visible">True</property> + <property name="label">Copyright 2006 Stas Zytkiewicz +Contact: sta...@us... + +GAC website: http://gac.sf.net + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of +the License, or (at your option) any later version. +</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">4</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + </child> + </widget> + </child> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame15"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment17"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkLabel" id="label26"> + <property name="visible">True</property> + <property name="label" translatable="yes">GAC stands for (G)TK (A)Larm (C)lock and is intended for +the GNU/Linux system. +It's an alarm clock application which is used to splash alarm +messages on your desktop or run a command at any given time. + +See the help -> handbook menu option for additional information.</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">8</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + </child> + </widget> + </child> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + </glade-interface> Modified: gac_gui.glade.bak =================================================================== --- gac_gui.glade.bak 2006-10-06 08:45:20 UTC (rev 16) +++ gac_gui.glade.bak 2006-10-06 17:06:22 UTC (rev 17) @@ -645,117 +645,214 @@ </child> <child> - <widget class="GtkHBox" id="hbox2"> + <widget class="GtkVBox" id="vbox10"> <property name="visible">True</property> - <property name="homogeneous">True</property> + <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkLabel" id="label2"> + <widget class="GtkHBox" id="hbox2"> + <property name="border_width">4</property> <property name="visible">True</property> - <property name="label" translatable="yes">Background color:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">4</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">0</property> - <child> - <widget class="GtkColorButton" id="colorbutton1"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Select the background color for your text message alarm. </property> - <property name="can_focus">True</property> - <property name="use_alpha">False</property> - <property name="focus_on_click">True</property> - <signal name="color_set" handler="on_colorset_button_clicked"/> + <child> + <widget class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="label" translatable="yes">Background color:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkColorButton" id="colorbutton1"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Select the background color for your text message alarm. </property> + <property name="can_focus">True</property> + <property name="use_alpha">False</property> + <property name="focus_on_click">True</property> + <signal name="color_set" handler="on_colorset_button_clicked"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="label" translatable="yes">Fontset:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFontButton" id="fontbutton1"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Select the fontset used for your text message.</property> + <property name="can_focus">True</property> + <property name="show_style">True</property> + <property name="show_size">True</property> + <property name="use_font">False</property> + <property name="use_size">False</property> + <property name="focus_on_click">True</property> + <signal name="font_set" handler="on_fontselbutton_clicked"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> </packing> </child> <child> - <widget class="GtkLabel" id="label3"> + <widget class="GtkHBox" id="hbox11"> <property name="visible">True</property> - <property name="label" translatable="yes">Fontset:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">4</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">0</property> - <child> - <widget class="GtkFontButton" id="fontbutton1"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Select the fontset used for your text message.</property> - <property name="can_focus">True</property> - <property name="show_style">True</property> - <property name="show_size">True</property> - <property name="use_font">False</property> - <property name="use_size">False</property> - <property name="focus_on_click">True</property> - <signal name="font_set" handler="on_fontselbutton_clicked"/> + <child> + <widget class="GtkCheckButton" id="checkbutton1"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Enable this if you want some sound when the alarm is started. +You can also set the repetition and choose a sound from the list.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Play sound</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_beep_toggled" last_modification_time="Fri, 06 Oct 2006 11:38:17 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label23"> + <property name="visible">True</property> + <property name="label" translatable="yes">Number of repetitions:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="spinbutton6"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="tooltip" translatable="yes">Choose the number of repetitions. +0 means no repetition. +1..100 the number of repetions +-1 keep repeating until the user closes the alarm.</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">True</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 -1 100 1 10 10</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkEventBox" id="eventbox7"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="visible_window">True</property> + <property name="above_child">False</property> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> </packing> </child> - - <child> - <widget class="GtkCheckButton" id="checkbutton1"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Enable this to have a short 'beep' sound when the alarm is started.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Beep</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">True</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> </widget> <packing> <property name="padding">0</property> @@ -2050,4 +2147,266 @@ </child> </widget> +<widget class="GtkDialog" id="dialog_about"> + <property name="visible">True</property> + <property name="title" translatable="yes">About GAC</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</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> + <property name="urgency_hint">False</property> + <property name="has_separator">True</property> + + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox8"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area8"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + + <child> + <widget class="GtkButton" id="closebutton3"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-close</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-7</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox11"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame13"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment15"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox12"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkImage" id="image10"> + <property name="visible">True</property> + <property name="pixbuf">gac_96x96.png</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">16</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label24"> + <property name="visible">True</property> + <property name="label" translatable="yes">GAC version: %s +Python version: %s +Pygtk version: %s +GTK version: %s</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">16</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame14"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment16"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkLabel" id="label25"> + <property name="visible">True</property> + <property name="label">Copyright 2006 Stas Zytkiewicz +contact: sta...@us...</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">4</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + </child> + </widget> + </child> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame15"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment17"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkLabel" id="label26"> + <property name="visible">True</property> + <property name="label" translatable="yes">GAC stands for (G)TK (A)Larm (C)lock and is intended for +the GNU/Linux system. +It's an alarm clock application which is used to splash alarm +messages on your desktop or run a command at any given time. + +See the help -> handbook menu option for additional information.</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">8</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + </child> + </widget> + </child> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + </glade-interface> Modified: gacd.py =================================================================== --- gacd.py 2006-10-06 08:45:20 UTC (rev 16) +++ gacd.py 2006-10-06 17:06:22 UTC (rev 17) @@ -77,11 +77,13 @@ try: # we leave the alarm in the dbase, the user can remove it ot # it will purged the next time gac starts. - out = os.popen('cd %s; python gac_alarm_gui.py "%s" "%s" "%s" "%s" &' % \ + out = os.popen('cd %s; \ + python gac_alarm_gui.py "%s" "%s" "%s" "%s" "%s" "%s" &' % \ (os.getcwd(),obj['text'],obj['font'],obj['bg_color'],\ - gacd_message.make_key()[:5])) + gacd_message.make_key()[:5],\ + obj['beep'],obj['beep_times'])) if out.close(): - print "error strarting gac alarm" + print "error starting gac alarm" except Exception,info: print info print "error strarting gac alarm" Modified: play_alarm.py =================================================================== --- play_alarm.py 2006-10-06 08:45:20 UTC (rev 16) +++ play_alarm.py 2006-10-06 17:06:22 UTC (rev 17) @@ -1,7 +1,7 @@ import wave,ossaudiodev,os -def play(file): +def play(file,n=1): if not os.path.exists(file): print "GAC: Can't find",file return False @@ -20,7 +20,9 @@ data = wf.readframes(nf) wf.close() - dsp.write(data) + while n: + dsp.write(data) + n -= 1 dsp.close() except Exception,info: print info Modified: setup =================================================================== --- setup 2006-10-06 08:45:20 UTC (rev 16) +++ setup 2006-10-06 17:06:22 UTC (rev 17) @@ -9,22 +9,26 @@ print "Only root can install this" sys.exit(1) -if not exists('/usr/local/gac'): - makedirs('/usr/local/gac') +if not exists('/usr/local/share/gac'): + makedirs('/usr/local/share/gac') if not exists('/usr/local/share/icons'): makedirs('/usr/local/share/icons') if not exists('/usr/local/share/docs/gac'): makedirs('/usr/local/share/docs/gac') if not exists('/usr/local/share/locale'): makedirs('/usr/local/share/locale') +if not exists('/usr/local/lib/gac'): + makedirs('/usr/local/lib/gac') if not exists('/usr/local/man/man1'): makedirs('/usr/local/man/man1') -system('cp -rf *.py /usr/local/gac/') -system('cp -rf sounds /usr/local/gac') +system('cp -rf *.py /usr/local/lib/gac/') +system('cp -f *.glade /usr/local/share/gac/') +system('cp -f *.gladep /usr/local/share/gac/') +system('cp -rf sounds /usr/local/share/gac') system('chmod 0755 /usr/local/gac/gac.py') system('cp gac.sh /usr/local/bin/gac') -system('cp gac_24.png /usr/local/icons/') +... [truncated message content] |
From: <sta...@us...> - 2006-10-06 08:45:25
|
Revision: 16 http://svn.sourceforge.net/gac/?rev=16&view=rev Author: stas_zytkiewicz Date: 2006-10-06 01:45:20 -0700 (Fri, 06 Oct 2006) Log Message: ----------- added more functionality Modified Paths: -------------- TODO Modified: TODO =================================================================== --- TODO 2006-10-02 14:33:25 UTC (rev 15) +++ TODO 2006-10-06 08:45:20 UTC (rev 16) @@ -1,4 +1,3 @@ -Add in glade 'edit alarm' option implement the beep part. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 03:45:39
|
Revision: 13 http://svn.sourceforge.net/gac/?rev=13&view=rev Author: stas_zytkiewicz Date: 2006-10-02 06:06:32 -0700 (Mon, 02 Oct 2006) Log Message: ----------- update packaging Modified Paths: -------------- gac_constants.py Modified: gac_constants.py =================================================================== --- gac_constants.py 2006-10-02 12:59:11 UTC (rev 12) +++ gac_constants.py 2006-10-02 13:06:32 UTC (rev 13) @@ -6,6 +6,7 @@ # Paths that are used globally LOCKPATH = '/var/lock/gacd.lock' SOUNDSPATH = '/usr/local/share/gac/sounds' +PICSPATH = '/usr/local/share/gac' gladefile = 'gac_gui.glade' glade_dir = '' gladepath = os.path.join(glade_dir,gladefile) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 03:45:18
|
Revision: 11 http://svn.sourceforge.net/gac/?rev=11&view=rev Author: stas_zytkiewicz Date: 2006-10-02 04:47:14 -0700 (Mon, 02 Oct 2006) Log Message: ----------- added new files Added Paths: ----------- gac_constants.py play_alarm.py Added: gac_constants.py =================================================================== --- gac_constants.py (rev 0) +++ gac_constants.py 2006-10-02 11:47:14 UTC (rev 11) @@ -0,0 +1,42 @@ +# This file provides paths and constants used in GAC. +# Distro packagers can change the paths in here to suit their needs. + +import os + +# Paths that are used globally +LOCKPATH = '/var/lock/gacd.lock' +SOUNDSPATH = '/usr/local/share/gac/sounds' +gladefile = 'gac_gui.glade' +glade_dir = '' +gladepath = os.path.join(glade_dir,gladefile) +locale_dir = "" + +##### The stuff below is used internally or is related to the users homedir +## Various gac messages objects +# Modules must import them from this module +alarmitem = {'text':'','command':'','bg_color':'#FFFF00000000','alarmdate':'',\ + 'alarmtime':'','alarmid':'','font':'','stopdaemon':'',\ + 'setalarm':True,'key':''} + +# path names related to the users homedir +shelve_file = 'gacshelve' +shelve_dict = {'keys':'','alarm_templates':''} +gac_home_path = os.path.join(os.path.expanduser('~'),'.gac') +shelve_lock = os.path.join(gac_home_path,'gacshelve.lock') + +shelve_path = os.path.join(gac_home_path,shelve_file) +sound_path = os.path.join(gac_home_path,'sounds') + +if not os.path.exists(gac_home_path): + os.makedirs(gac_home_path) +if not os.path.exists(sound_path): + os.makedirs(sound_path) + +if not os.path.exists(shelve_path): + try: + cPickle.dump({'keys':[],'alarm_templates':[]},open(shelve_path,'wb'),-1) + except Exception,info: + print "Failed to create dbase" + print info + + Added: play_alarm.py =================================================================== --- play_alarm.py (rev 0) +++ play_alarm.py 2006-10-02 11:47:14 UTC (rev 11) @@ -0,0 +1,31 @@ + +import wave,ossaudiodev,os + +def play(file): + if not os.path.exists(file): + print "GAC: Can't find",file + return False + try: + wf = wave.open(file,'rb') + (nc,sw,fr,nf,comptype, compname) = wf.getparams() + dsp = ossaudiodev.open('/dev/dsp','w') + try: + from ossaudiodev import AFMT_S16_NE + except ImportError: + if byteorder == "little": + AFMT_S16_NE = ossaudiodev.AFMT_S16_LE + else: + AFMT_S16_NE = ossaudiodev.AFMT_S16_BE + dsp.setparameters(AFMT_S16_NE, nc, fr) + + data = wf.readframes(nf) + wf.close() + dsp.write(data) + dsp.close() + except Exception,info: + print info + return False + else: + return True + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 03:42:26
|
Revision: 5 http://svn.sourceforge.net/gac/?rev=5&view=rev Author: stas_zytkiewicz Date: 2006-09-30 00:35:15 -0700 (Sat, 30 Sep 2006) Log Message: ----------- minor Modified Paths: -------------- check_db.py Modified: check_db.py =================================================================== --- check_db.py 2006-09-30 06:56:15 UTC (rev 4) +++ check_db.py 2006-09-30 07:35:15 UTC (rev 5) @@ -1,7 +1,6 @@ #!/usr/bin/env python +# Not part of gac, just for development purposes -# Not part of gac, just for development - import cPickle D = cPickle.load(open('/home/stas/.gac/gacshelve','rb')) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 03:42:26
|
Revision: 10 http://svn.sourceforge.net/gac/?rev=10&view=rev Author: stas_zytkiewicz Date: 2006-10-02 04:45:46 -0700 (Mon, 02 Oct 2006) Log Message: ----------- added 'edit alarm' logic Starting to add sound support moved paths and constants into new gac_constants file Modified Paths: -------------- gac_client_gui.py gac_dialogs.py gac_gui.glade gac_gui.glade.bak gac_widgets.py gacd.py gacd_message.py utils.py Modified: gac_client_gui.py =================================================================== --- gac_client_gui.py 2006-10-02 09:04:59 UTC (rev 9) +++ gac_client_gui.py 2006-10-02 11:45:46 UTC (rev 10) @@ -23,9 +23,7 @@ import os appname = 'gac' -gladefile = "gac_gui.glade" -glade_dir = "" -gladepath = os.path.join(glade_dir,gladefile) +from gac_constants import * import pygtk pygtk.require('2.0') @@ -119,6 +117,10 @@ gac_dialogs.InfoDialog(txt=text) #self.listview.set_all_alarms() + def on_editalarm_activate(self,widget,*args): + d = self.listview.remove_selected_item() + self.on_newalarm_activate(None,template_obj=d) + def on_closewindow_activate(self, widget, *args): self.on_window_destroy(widget,args) @@ -187,7 +189,7 @@ def store_alarm(self,data): """Stores a new alarm for the daemon. @data must be a dictionary""" - aitem = gacd_message.alarmitem + aitem = alarmitem aitem.update(data) if CDEBUG: print "store_alarm :",aitem @@ -205,7 +207,7 @@ """Stores the alarm in the templates dbase entry. @data must be a dictionary""" - aitem = gacd_message.alarmitem + aitem = alarmitem aitem.update(data) if CDEBUG: print "store_alarm_as_template:",aitem Modified: gac_dialogs.py =================================================================== --- gac_dialogs.py 2006-10-02 09:04:59 UTC (rev 9) +++ gac_dialogs.py 2006-10-02 11:45:46 UTC (rev 10) @@ -20,10 +20,8 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import os,sys,time -gladefile = "gac_gui.glade" -glade_dir = "" -gladepath = os.path.join(glade_dir,gladefile) -locale_dir = "" +from gac_constants import * + gladexml = None import pygtk @@ -56,6 +54,8 @@ path) self.messageframe = self.gladexml.get_widget('frame_message') self.commandframe = self.gladexml.get_widget('frame_command') + # fill comboentry with soundfiles found. This way users can add their own sounds. + if template_obj: self.hexcol = template_obj['bg_color'] self.path = template_obj['command'] Modified: gac_gui.glade =================================================================== --- gac_gui.glade 2006-10-02 09:04:59 UTC (rev 9) +++ gac_gui.glade 2006-10-02 11:45:46 UTC (rev 10) @@ -82,6 +82,16 @@ </child> <child> + <widget class="GtkMenuItem" id="edit_alarm1"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Edit the selected alarm</property> + <property name="label" translatable="yes">Edit Alarm</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_editalarm_activate" last_modification_time="Mon, 02 Oct 2006 11:06:26 GMT"/> + </widget> + </child> + + <child> <widget class="GtkSeparatorMenuItem" id="separator1"> <property name="visible">True</property> </widget> @@ -636,8 +646,9 @@ <child> <widget class="GtkHBox" id="hbox2"> + <property name="border_width">4</property> <property name="visible">True</property> - <property name="homogeneous">True</property> + <property name="homogeneous">False</property> <property name="spacing">0</property> <child> @@ -729,16 +740,18 @@ <child> <widget class="GtkCheckButton" id="checkbutton1"> + <property name="border_width">4</property> <property name="visible">True</property> <property name="tooltip" translatable="yes">Enable this to have a short 'beep' sound when the alarm is started.</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Beep</property> + <property name="label" translatable="yes">Play sound</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="active">True</property> <property name="inconsistent">False</property> <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_playsound_toggled" last_modification_time="Mon, 02 Oct 2006 11:21:36 GMT"/> </widget> <packing> <property name="padding">0</property> @@ -746,6 +759,21 @@ <property name="fill">False</property> </packing> </child> + + <child> + <widget class="GtkComboBoxEntry" id="comboboxentry1"> + <property name="border_width">4</property> + <property name="visible">True</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> Modified: gac_gui.glade.bak =================================================================== --- gac_gui.glade.bak 2006-10-02 09:04:59 UTC (rev 9) +++ gac_gui.glade.bak 2006-10-02 11:45:46 UTC (rev 10) @@ -82,6 +82,16 @@ </child> <child> + <widget class="GtkMenuItem" id="edit_alarm1"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Edit the selected alarm</property> + <property name="label" translatable="yes">Edit Alarm</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_editalarm_activate" last_modification_time="Mon, 02 Oct 2006 11:06:26 GMT"/> + </widget> + </child> + + <child> <widget class="GtkSeparatorMenuItem" id="separator1"> <property name="visible">True</property> </widget> @@ -1731,8 +1741,6 @@ <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> - <property name="default_width">400</property> - <property name="default_height">200</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> @@ -1745,18 +1753,18 @@ <property name="has_separator">True</property> <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox6"> + <widget class="GtkVBox" id="dialog-vbox7"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area6"> + <widget class="GtkHButtonBox" id="dialog-action_area7"> <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property> <child> - <widget class="GtkButton" id="button3"> + <widget class="GtkButton" id="button8"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> @@ -1769,7 +1777,7 @@ </child> <child> - <widget class="GtkButton" id="button4"> + <widget class="GtkButton" id="button9"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> @@ -1778,73 +1786,120 @@ <property name="response_id">255</property> <child> - <widget class="GtkAlignment" id="alignment10"> + <widget class="GtkHBox" id="hbox10"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> <child> - <widget class="GtkHBox" id="hbox6"> + <widget class="GtkImage" id="image9"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> + <property name="stock">gtk-new</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> - <child> - <widget class="GtkImage" id="image5"> - <property name="visible">True</property> - <property name="stock">gtk-new</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="label22"> + <property name="visible">True</property> + <property name="label" translatable="yes">New template</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> - <child> - <widget class="GtkLabel" id="label19"> - <property name="visible">True</property> - <property name="label" translatable="yes">New template</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="button11"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">254</property> + + <child> + <widget class="GtkHBox" id="hbox9"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkImage" id="image8"> + <property name="visible">True</property> + <property name="stock">gtk-remove</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> + + <child> + <widget class="GtkLabel" id="label21"> + <property name="visible">True</property> + <property name="label" translatable="yes">Remove template</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> </child> </widget> </child> <child> - <widget class="GtkButton" id="button5"> + <widget class="GtkButton" id="button12"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> @@ -1865,13 +1920,13 @@ </child> <child> - <widget class="GtkVBox" id="vbox8"> + <widget class="GtkVBox" id="vbox9"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkFrame" id="frame9"> + <widget class="GtkFrame" id="frame11"> <property name="border_width">4</property> <property name="visible">True</property> <property name="label_xalign">0</property> @@ -1879,7 +1934,7 @@ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> - <widget class="GtkAlignment" id="alignment11"> + <widget class="GtkAlignment" id="alignment13"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -1891,13 +1946,13 @@ <property name="right_padding">0</property> <child> - <widget class="GtkHBox" id="hbox7"> + <widget class="GtkHBox" id="hbox8"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkImage" id="image6"> + <widget class="GtkImage" id="image7"> <property name="visible">True</property> <property name="stock">gtk-dialog-info</property> <property name="icon_size">3</property> @@ -1914,7 +1969,7 @@ </child> <child> - <widget class="GtkLabel" id="label18"> + <widget class="GtkLabel" id="label20"> <property name="visible">True</property> <property name="label" translatable="yes">Choose a template from the list or use the 'New template' button to create @@ -1943,10 +1998,6 @@ </child> </widget> </child> - - <child> - <placeholder/> - </child> </widget> <packing> <property name="padding">4</property> @@ -1956,7 +2007,7 @@ </child> <child> - <widget class="GtkFrame" id="frame10"> + <widget class="GtkFrame" id="frame12"> <property name="border_width">4</property> <property name="visible">True</property> <property name="label_xalign">0</property> @@ -1964,7 +2015,7 @@ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> - <widget class="GtkAlignment" id="alignment12"> + <widget class="GtkAlignment" id="alignment14"> <property name="border_width">2</property> <property name="visible">True</property> <property name="xalign">0.5</property> @@ -1981,10 +2032,6 @@ </child> </widget> </child> - - <child> - <placeholder/> - </child> </widget> <packing> <property name="padding">4</property> Modified: gac_widgets.py =================================================================== --- gac_widgets.py 2006-10-02 09:04:59 UTC (rev 9) +++ gac_widgets.py 2006-10-02 11:45:46 UTC (rev 10) @@ -161,7 +161,7 @@ return True gdm = gacd_message.GacdMessenger() gdm.remove_message(d['key']) - return True + return d def set_all_alarms(self): pass @@ -231,20 +231,3 @@ self.menuparent.mainwin.hide() return 1 -##class GuiOutput: -## def __init__(self, parent=None): -## self.text = None -## self.dialog = InfoDialog() -## def popupnow(self, parent=None): # in parent now, Toplevel later -## if self.text: return -## self.dialog = InfoDialog() -## self.text.config(font=('courier', 9, 'normal')) -## self.text.pack( ) -## def write(self, text): -## self.popupnow( ) -## self.text.insert(END, str(text)) -## self.text.see(END) -## self.text.update( ) -## def writelines(self, lines): # lines already have '\n' -## for line in lines: self.write(line) # or map(self.write, lines) -## Modified: gacd.py =================================================================== --- gacd.py 2006-10-02 09:04:59 UTC (rev 9) +++ gacd.py 2006-10-02 11:45:46 UTC (rev 10) @@ -41,11 +41,12 @@ out.start('/tmp/gacd_out','/tmp/gacd_err') import utils +from gac_constants import * # We need a atexit function so that the lockfile will be removed def cleanup(): try: - os.remove(utils.LOCKPATH) + os.remove(LOCKPATH) gdm = gacd_message.GacdMessenger() gdm.close() gdm._release_lock() @@ -93,7 +94,7 @@ # We set a lockfile containing the pid try: - f = open(utils.LOCKPATH,'w') + f = open(LOCKPATH,'w') f.write(str(os.getpid())) f.close() except IOError,info: Modified: gacd_message.py =================================================================== --- gacd_message.py 2006-10-02 09:04:59 UTC (rev 9) +++ gacd_message.py 2006-10-02 11:45:46 UTC (rev 10) @@ -23,29 +23,8 @@ _DEBUG=1 import os,sys,cPickle,time,shelve,datetime +from gac_constants import * -## Various gac messages objects -# Modules must import them from this module -alarmitem = {'text':'','command':'','bg_color':'#FFFF00000000','alarmdate':'',\ - 'alarmtime':'','alarmid':'','font':'','stopdaemon':'',\ - 'setalarm':True,'key':''} - -# path names -shelve_file = 'gacshelve' -shelve_dict = {'keys':'','alarm_templates':''} -gac_home_path = os.path.join(os.path.expanduser('~'),'.gac') -shelve_path = os.path.join(gac_home_path,shelve_file) -if not os.path.exists(gac_home_path): - os.makedirs(gac_home_path) -if not os.path.exists(shelve_path): - try: - cPickle.dump({'keys':[],'alarm_templates':[]},open(shelve_path,'wb'),-1) - except Exception,info: - print "Failed to create dbase" - print info - -shelve_lock = os.path.join(gac_home_path,'gacshelve.lock') - def force_release_lock(): try: open(shelve_lock,'w').close() Modified: utils.py =================================================================== --- utils.py 2006-10-02 09:04:59 UTC (rev 9) +++ utils.py 2006-10-02 11:45:46 UTC (rev 10) @@ -20,14 +20,12 @@ UDEBUG = 0 import os,sys,traceback,gettext,locale,__builtin__,atexit +from gac_constants import * # will hold the locale set by set_locale() LANG_TRANS = '' LANG = '' -# paths -LOCKPATH = '/var/lock/gacd.lock' - def is_gacd_running(): """This will check the lockfile and return True when a pid in the lock file is found. """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 02:56:35
|
Revision: 12 http://svn.sourceforge.net/gac/?rev=12&view=rev Author: stas_zytkiewicz Date: 2006-10-02 05:59:11 -0700 (Mon, 02 Oct 2006) Log Message: ----------- added additional files for sounds and packaging Added Paths: ----------- GPL-2 README filelist folderlist makeTarBall.py sounds/ sounds/alarmclock.wav sounds/alarmclock1.wav sounds/caralarm.wav sounds/firetruck.wav sounds/warning1.wav Added: GPL-2 =================================================================== --- GPL-2 (rev 0) +++ GPL-2 2006-10-02 12:59:11 UTC (rev 12) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: README =================================================================== --- README (rev 0) +++ README 2006-10-02 12:59:11 UTC (rev 12) @@ -0,0 +1,20 @@ +.: What is GAC? + +GAC stands for (G)TK (A)Larm (C)lock and is intended for the GNU/Linux system. +It's an alarm clock application which is used to splash alarm messages on your desktop +or run a command at any given time. +It consists of two parts, a graphical client and a 'deamon' that runs in the background. +The client is used to set, edit and remove alarms which are handled by the deamon. +GAC runs on any desktop and only needs the GTK libs. + +.: Download GAC + +You can download GAC here +Make sure you have Python and pygtk installed together with their dependencies. + +.: Contact + +You can send your comments, questions and feature requests to the GAC maillinglist +or send a email to the GAC author: stas underscore zytkiewicz at gmail dot com. + + Added: filelist =================================================================== --- filelist (rev 0) +++ filelist 2006-10-02 12:59:11 UTC (rev 12) @@ -0,0 +1,3 @@ +GPL-2 +README +copyright Added: folderlist =================================================================== --- folderlist (rev 0) +++ folderlist 2006-10-02 12:59:11 UTC (rev 12) @@ -0,0 +1,4 @@ +po +locale +docs +sounds Added: makeTarBall.py =================================================================== --- makeTarBall.py (rev 0) +++ makeTarBall.py 2006-10-02 12:59:11 UTC (rev 12) @@ -0,0 +1,50 @@ +#!/usr/bin/env python + +# make tarball! +from version import VERSION +import os + +print "Find pyc files and remove them" +os.system('find ./ -name "*.pyc" -exec rm -v {} \;') + +def cleanup(*args): + """Used by os.path.walk to traverse the tree and remove CVS dirs""" + if os.path.split(args[1])[1] == "CVS": + print "Remove ",args[1] + os.system('rm -r %s' % args[1]) + +filelist = open('filelist', 'r') +folderlist = open('folderlist', 'r') +myFiles = filelist.readlines() +myFolders = folderlist.readlines() +os.system('mkdir gvr_ng-%s' % VERSION) +for file in myFiles: + os.system('cp %s gvr_ng-%s' % (file[:-1], VERSION)) + +for folder in myFolders: + os.system('mkdir gvr_ng-%s/%s' % (VERSION, folder[:-1])) + os.system('cp -r %s gvr_ng-%s' % (folder[:-1], VERSION)) + +# removing the CVS stuff +os.path.walk('gvr_ng-%s' % VERSION,cleanup,None) + +print "\nCreate a GNU/Linux tarball..." +try: + execString = 'tar -czf gvr_ng-%s.tgz gvr_ng-%s/' % (VERSION, VERSION) + print execString + os.system(execString) +except Exception,info: + print info,"\nYou must have the tar package installed" +else: + print "Done.\n" + +print "Create a Windows compatible zipfile..." +try: + execString = 'zip -rq gvr_ng-%s.zip ./gvr_ng-%s' % (VERSION, VERSION) + print execString + os.system(execString) +except Exception,info: + print info,"\nYou must have the zip package installed." +else: + print "Done\n" +os.system('rm -rf gvr_ng-%s' % VERSION) Property changes on: makeTarBall.py ___________________________________________________________________ Name: svn:executable + * Added: sounds/alarmclock.wav =================================================================== (Binary files differ) Property changes on: sounds/alarmclock.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: sounds/alarmclock1.wav =================================================================== (Binary files differ) Property changes on: sounds/alarmclock1.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: sounds/caralarm.wav =================================================================== (Binary files differ) Property changes on: sounds/caralarm.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: sounds/firetruck.wav =================================================================== (Binary files differ) Property changes on: sounds/firetruck.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: sounds/warning1.wav =================================================================== (Binary files differ) Property changes on: sounds/warning1.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 02:56:22
|
Revision: 9 http://svn.sourceforge.net/gac/?rev=9&view=rev Author: stas_zytkiewicz Date: 2006-10-02 02:04:59 -0700 (Mon, 02 Oct 2006) Log Message: ----------- Fixed templates stuff Modified Paths: -------------- gacd_message.py Modified: gacd_message.py =================================================================== --- gacd_message.py 2006-10-02 08:56:32 UTC (rev 8) +++ gacd_message.py 2006-10-02 09:04:59 UTC (rev 9) @@ -239,10 +239,15 @@ for item in self.__D['alarm_templates']: print item print "key",key_val + new_l = [] if item['alarmid'] == key_val: if _DEBUG: print "template removed",item - del item - self._dump() + else: + new_l.append(item) + self.__D['alarm_templates'] = new_l + self._dump() + self._release_lock() + def close(self): self._dump() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 02:56:21
|
Revision: 8 http://svn.sourceforge.net/gac/?rev=8&view=rev Author: stas_zytkiewicz Date: 2006-10-02 01:56:32 -0700 (Mon, 02 Oct 2006) Log Message: ----------- Fixed template removal Modified Paths: -------------- gac_client_gui.py gac_dialogs.py gacd_message.py Modified: gac_client_gui.py =================================================================== --- gac_client_gui.py 2006-10-02 08:08:03 UTC (rev 7) +++ gac_client_gui.py 2006-10-02 08:56:32 UTC (rev 8) @@ -100,7 +100,13 @@ dialog.mainwin.destroy() self.on_newalarm_activate(None) elif respons == 254:#'remove template' respons - gdm.remove_template(dialog.get_data()) + d = dialog.get_data() + try: + key_val = d['alarmid'] + except Exception: + pass + else: + gdm.remove_template(key_val) dialog.mainwin.destroy() def on_removealarm_activate(self, widget, *args): Modified: gac_dialogs.py =================================================================== --- gac_dialogs.py 2006-10-02 08:08:03 UTC (rev 7) +++ gac_dialogs.py 2006-10-02 08:56:32 UTC (rev 8) @@ -31,6 +31,8 @@ import gtk import gtk.glade +from gacd_message import alarmitem + # All the dialogs are build from glade when they are constructed. # You can do: # dialog = DialogAlarmMessage() @@ -158,7 +160,7 @@ self, path) self.cb_data = None - self.template_dict = {} + self.template_dict = alarmitem combobox = gtk.combo_box_new_text() align = self.gladexml.get_widget('alignment14') align.add(combobox) @@ -168,7 +170,6 @@ key = item['key'] self.template_dict[item['alarmid']] = item combobox.append_text(item['alarmid']) - print "DialogNewFromTmplkey",item['alarmid'] combobox.connect('changed', self.changed_cb) combobox.set_active(0) align.show_all() @@ -181,7 +182,11 @@ return 1 def get_data(self): - return self.template_dict[self.cb_data] + try: + data = self.template_dict[self.cb_data] + except Exception: + data = None + return data class DialogAlarmId(DialogBase): def __init__(self,path=gladepath): Modified: gacd_message.py =================================================================== --- gacd_message.py 2006-10-02 08:08:03 UTC (rev 7) +++ gacd_message.py 2006-10-02 08:56:32 UTC (rev 8) @@ -135,9 +135,8 @@ self._dump() def _dump(self): - print "dump called",self.__D cPickle.dump(self.__D,open(self.filename,'wb'),-1) - #self.__D = cPickle.load(open(self.filename,'rb')) + self.__D = cPickle.load(open(self.filename,'rb')) def _get_item(self,key): try: @@ -233,14 +232,16 @@ self._dump() self._release_lock() - def remove_template(self,key): + def remove_template(self,key_val): if not self._acquire_lock(): print "Failled to aquire file lock (remove_template)" return - for item in self.__D['templates']: - if item.has_key(key): + for item in self.__D['alarm_templates']: + print item + print "key",key_val + if item['alarmid'] == key_val: + if _DEBUG: print "template removed",item del item - if _DEBUG: print "template removed",item self._dump() def close(self): self._dump() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 02:53:04
|
Revision: 6 http://svn.sourceforge.net/gac/?rev=6&view=rev Author: stas_zytkiewicz Date: 2006-10-02 00:49:19 -0700 (Mon, 02 Oct 2006) Log Message: ----------- more pickle stuff Modified Paths: -------------- gacd_message.py Modified: gacd_message.py =================================================================== --- gacd_message.py 2006-09-30 07:35:15 UTC (rev 5) +++ gacd_message.py 2006-10-02 07:49:19 UTC (rev 6) @@ -39,7 +39,7 @@ os.makedirs(gac_home_path) if not os.path.exists(shelve_path): try: - cPickle.dump({'keys':[],'alarm_templates':[]},open(shelve_path,'w')) + cPickle.dump({'keys':[],'alarm_templates':[]},open(shelve_path,'wb'),-1) except Exception,info: print "Failed to create dbase" print info @@ -138,7 +138,7 @@ self._dump() def _dump(self): - cPickle.dump(self.__D,open(self.filename,'wb')) + cPickle.dump(self.__D,open(self.filename,'wb'),-1) self.__D = cPickle.load(open(self.filename,'rb')) def _get_item(self,key): @@ -194,7 +194,6 @@ """Writes an alarmitem to disk as a template and returns None on success. @obj is a dictionairy. """ - if _DEBUG: print "write_message_template",obj if not self._acquire_lock(): return "Failled to aquire file lock (write_message_template)" key = 'alarm_templates' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 02:46:55
|
Revision: 15 http://svn.sourceforge.net/gac/?rev=15&view=rev Author: stas_zytkiewicz Date: 2006-10-02 07:33:25 -0700 (Mon, 02 Oct 2006) Log Message: ----------- updates for packaging Modified Paths: -------------- filelist gac_constants.py makeTarBall.py Added Paths: ----------- setup Modified: filelist =================================================================== --- filelist 2006-10-02 13:10:51 UTC (rev 14) +++ filelist 2006-10-02 14:33:25 UTC (rev 15) @@ -13,3 +13,5 @@ gac.py play_alarm.py gac_24.png +gac_gui.glade +gac_gui.gladep Modified: gac_constants.py =================================================================== --- gac_constants.py 2006-10-02 13:10:51 UTC (rev 14) +++ gac_constants.py 2006-10-02 14:33:25 UTC (rev 15) @@ -6,7 +6,7 @@ # Paths that are used globally LOCKPATH = '/var/lock/gacd.lock' SOUNDSPATH = '/usr/local/share/gac/sounds' -PICSPATH = '/usr/local/share/gac' +PICSPATH = '/usr/local/icons' gladefile = 'gac_gui.glade' glade_dir = '' gladepath = os.path.join(glade_dir,gladefile) Modified: makeTarBall.py =================================================================== --- makeTarBall.py 2006-10-02 13:10:51 UTC (rev 14) +++ makeTarBall.py 2006-10-02 14:33:25 UTC (rev 15) @@ -11,7 +11,7 @@ """Used by os.path.walk to traverse the tree and remove svn dirs""" if os.path.split(args[1])[1] == ".svn": print "Remove ",args[1] - os.system('rm -r %s' % args[1]) + os.system('rm -rf %s' % args[1]) filelist = open('filelist', 'r') folderlist = open('folderlist', 'r') Added: setup =================================================================== --- setup (rev 0) +++ setup 2006-10-02 14:33:25 UTC (rev 15) @@ -0,0 +1,46 @@ +#! /usr/bin/env python +print "\n-------- Installing GAC GTK Alarm Clock ---------" + +from os.path import exists +import sys,os +from os import makedirs, mkdir, system +import compileall +if os.environ['USER'] != 'root': + print "Only root can install this" + sys.exit(1) + +if not exists('/usr/local/gac'): + makedirs('/usr/local/gac') +if not exists('/usr/local/share/icons'): + makedirs('/usr/local/share/icons') +if not exists('/usr/local/share/docs/gac'): + makedirs('/usr/local/share/docs/gac') +if not exists('/usr/local/share/locale'): + makedirs('/usr/local/share/locale') +if not exists('/usr/local/man/man1'): + makedirs('/usr/local/man/man1') + +system('cp -rf *.py /usr/local/gac/') +system('cp -rf sounds /usr/local/gac') +system('chmod 0755 /usr/local/gac/gac.py') +system('cp gac.sh /usr/local/bin/gac') +system('cp gac_24.png /usr/local/icons/') + + +system('cp -rf docs /usr/local/share/docs/gac/') +system('cp -f docs/gac.1.gz /usr/local/man/man1/gac.1.gz') +system('cp -rf locale/* /usr/local/share/locale') + +system('chmod a+rx /usr/local/bin/gac') + +# python2.3.4 does not support the quiet option for +# compileall +try: + print "Trying to compiling modules to bytecode." + compileall.compile_dir('/usr/local/gac',quiet=1) +except: + compileall.compile_dir('/usr/local/gac') +print "Installation complete." +print "To start gac -> gac [Enter]" +print "Be sure to check the website http://gac.sf.net, for additional information." +print "\nEnjoy\n" Property changes on: setup ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 02:46:54
|
Revision: 14 http://svn.sourceforge.net/gac/?rev=14&view=rev Author: stas_zytkiewicz Date: 2006-10-02 06:10:51 -0700 (Mon, 02 Oct 2006) Log Message: ----------- more additional files added Modified Paths: -------------- filelist gac.py makeTarBall.py Added Paths: ----------- Changelog TODO copyright version.py Added: Changelog =================================================================== --- Changelog (rev 0) +++ Changelog 2006-10-02 13:10:51 UTC (rev 14) @@ -0,0 +1,3 @@ +gac (0.6) + * initial release. + Added: TODO =================================================================== --- TODO (rev 0) +++ TODO 2006-10-02 13:10:51 UTC (rev 14) @@ -0,0 +1,6 @@ +Add in glade 'edit alarm' option + +implement the beep part. + +Make gac like this: +if trayicon module is available use it, otherwise be a regular window. Added: copyright =================================================================== --- copyright (rev 0) +++ copyright 2006-10-02 13:10:51 UTC (rev 14) @@ -0,0 +1,19 @@ +Look at 'GPL-2' for the complete copyright license + +Copyright (C) 2006: + Stas Zytkiewicz - sta...@gm... + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + Modified: filelist =================================================================== --- filelist 2006-10-02 13:06:32 UTC (rev 13) +++ filelist 2006-10-02 13:10:51 UTC (rev 14) @@ -1,3 +1,15 @@ GPL-2 README copyright +gac_dialogs.py +gac_widgets.py +gac_alarm_gui.py +gacd_message.py +utils.py +gac_client_gui.py +gacd.py +out.py +gac_constants.py +gac.py +play_alarm.py +gac_24.png Modified: gac.py =================================================================== --- gac.py 2006-10-02 13:06:32 UTC (rev 13) +++ gac.py 2006-10-02 13:10:51 UTC (rev 14) @@ -27,9 +27,9 @@ GDEBUG=1 import sys,os,__builtin__ +from gac_constants import * -PIXMAP = '' -clockpic_path = os.path.join(PIXMAP,'gac_24.png') +clockpic_path = os.path.join(PICSPATH,'gac_24.png') import utils import gac_widgets @@ -55,7 +55,7 @@ def __init__(self): self.win = gac_client_gui.GuiWindow(parent=self) self.menu = gac_widgets.PopupMenu(parent=self.win) - self.tray = egg.trayicon.TrayIcon("Test string") + self.tray = egg.trayicon.TrayIcon("") eventbox = gtk.EventBox() eventbox.connect('button_press_event',\ Modified: makeTarBall.py =================================================================== --- makeTarBall.py 2006-10-02 13:06:32 UTC (rev 13) +++ makeTarBall.py 2006-10-02 13:10:51 UTC (rev 14) @@ -8,8 +8,8 @@ os.system('find ./ -name "*.pyc" -exec rm -v {} \;') def cleanup(*args): - """Used by os.path.walk to traverse the tree and remove CVS dirs""" - if os.path.split(args[1])[1] == "CVS": + """Used by os.path.walk to traverse the tree and remove svn dirs""" + if os.path.split(args[1])[1] == ".svn": print "Remove ",args[1] os.system('rm -r %s' % args[1]) @@ -17,20 +17,20 @@ folderlist = open('folderlist', 'r') myFiles = filelist.readlines() myFolders = folderlist.readlines() -os.system('mkdir gvr_ng-%s' % VERSION) +os.system('mkdir gac-%s' % VERSION) for file in myFiles: - os.system('cp %s gvr_ng-%s' % (file[:-1], VERSION)) + os.system('cp %s gac-%s' % (file[:-1], VERSION)) for folder in myFolders: - os.system('mkdir gvr_ng-%s/%s' % (VERSION, folder[:-1])) - os.system('cp -r %s gvr_ng-%s' % (folder[:-1], VERSION)) + os.system('mkdir gac-%s/%s' % (VERSION, folder[:-1])) + os.system('cp -r %s gac-%s' % (folder[:-1], VERSION)) # removing the CVS stuff -os.path.walk('gvr_ng-%s' % VERSION,cleanup,None) +os.path.walk('gac-%s' % VERSION,cleanup,None) print "\nCreate a GNU/Linux tarball..." try: - execString = 'tar -czf gvr_ng-%s.tgz gvr_ng-%s/' % (VERSION, VERSION) + execString = 'tar -czf gac-%s.tgz gac-%s/' % (VERSION, VERSION) print execString os.system(execString) except Exception,info: @@ -38,13 +38,4 @@ else: print "Done.\n" -print "Create a Windows compatible zipfile..." -try: - execString = 'zip -rq gvr_ng-%s.zip ./gvr_ng-%s' % (VERSION, VERSION) - print execString - os.system(execString) -except Exception,info: - print info,"\nYou must have the zip package installed." -else: - print "Done\n" -os.system('rm -rf gvr_ng-%s' % VERSION) +os.system('rm -rf gac-%s' % VERSION) Added: version.py =================================================================== --- version.py (rev 0) +++ version.py 2006-10-02 13:10:51 UTC (rev 14) @@ -0,0 +1,3 @@ +# Used by the maketarball script aqnd the about widget + +VERSION = 0.6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2006-10-04 02:46:36
|
Revision: 7 http://svn.sourceforge.net/gac/?rev=7&view=rev Author: stas_zytkiewicz Date: 2006-10-02 01:08:03 -0700 (Mon, 02 Oct 2006) Log Message: ----------- Fixed pickle problems with templates Modified Paths: -------------- gacd_message.py Modified: gacd_message.py =================================================================== --- gacd_message.py 2006-10-02 07:49:19 UTC (rev 6) +++ gacd_message.py 2006-10-02 08:08:03 UTC (rev 7) @@ -121,10 +121,7 @@ self.__D[key]=[] def __del__(self): - try: - self._dump() - except Exception,info: - if _DEBUG: print info + pass # internally used methods def _store_item(self,key,val): @@ -138,8 +135,9 @@ self._dump() def _dump(self): + print "dump called",self.__D cPickle.dump(self.__D,open(self.filename,'wb'),-1) - self.__D = cPickle.load(open(self.filename,'rb')) + #self.__D = cPickle.load(open(self.filename,'rb')) def _get_item(self,key): try: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |