Commit fda95bf2 authored by Gaute Hope's avatar Gaute Hope

Working applet

parent da2e8d1e
2005-12-14 Gaute Hope <eg@gaute.vetsj.com>
* The applet is working
* Removed scheduleapplet.in, executing the python file directly from the .server file.
* Name change on server file
2005-09-07 Rodrigo Marcos <rmarcos_geo@yahoo.es>
* Added support for localized manuals (Bug #156821):
......
pvanhoof:'Philip Van Hoof <pvanhoof@gnome.org>'
gauteh:'Gaute Hope <eg@gaute.vetsj.com>'
pvanhoof:'Philip Van Hoof <pvanhoof@gnome.org>'
kvansant:'Kristof Vansant <de_lupus@pandora.be>'
SUBDIRS = desktop src pixmaps doc po servers help
SUBDIRS = desktop src pixmaps po servers help
intltool_extra = intltool-extract.in intltool-merge.in intltool-update.in
......
......@@ -80,13 +80,11 @@ Makefile
src/config.py
src/Makefile
src/gnome-schedule
src/scheduleapplet
doc/Makefile
pixmaps/Makefile
po/Makefile.in
desktop/Makefile
desktop/gnome-schedule.desktop
servers/Makefile
servers/GNOME_schedule.server
servers/GNOME_GnomeSchedule.server
help/Makefile
])
This diff is collapsed.
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
scriptversion=2005-02-02.21
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage" 1>&2
exit 0
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
......@@ -23,6 +35,10 @@ while test $# -gt 0 ; do
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
......@@ -50,17 +66,37 @@ case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
......@@ -84,17 +120,17 @@ do
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
......@@ -107,5 +143,8 @@ exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
# mkinstalldirs ends here
<oaf_info>
<oaf_server iid="OAFIID:GNOME_GnomeSchedule_Factory"
type="exe" location="@PYTHON_CONFIG@ @prefix@/share/gnome-schedule/scheduleapplet.py">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/GenericFactory:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Gnome schedule"/>
<oaf_attribute name="description" type="string" value="Configures your scheduled tasks"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_GnomeSchedule"
type="factory" location="OAFIID:GNOME_GnomeSchedule_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
<item value="IDL:Bonobo/Control:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Gnome schedule"/>
<oaf_attribute name="description" type="string" value="Configures your scheduled tasks"/>
<oaf_attribute name="panel:category" type="string" value="System tools"/>
<oaf_attribute name="panel:icon" type="string" value="@prefix@/share/pixmaps/gnome-schedule.png"/>
</oaf_server>
</oaf_info>
<oaf_info>
<oaf_server iid="OAFIID:GNOME_schedule_Factory" type="exe" location="@prefix@/libexec/scheduleapplet">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/GenericFactory:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Gnome schedule applet"/>
<oaf_attribute name="description" type="string" value="Configuration tool for your scheduled jobs"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_schedule"
type="factory" location="OAFIID:GNOME_schedule_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
<item value="IDL:Bonobo/Control:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Gnome schedule"/>
<oaf_attribute name="description" type="string" value="Configuration tool for your scheduled jobs"/>
<oaf_attribute name="panel:category" type="string" value="System tools"/>
<oaf_attribute name="panel:icon" type="string" value="@prefix@/share/pixmaps/gnome-schedule.png"/>
</oaf_server>
</oaf_info>
serverdir = $(libdir)/bonobo/servers
server_DATA = GNOME_schedule.server
server_DATA = GNOME_GnomeSchedule.server
@INTLTOOL_SERVER_RULE@
......
bin_SCRIPTS = gnome-schedule
libexec_SCRIPTS = scheduleapplet
gnomescheduledir = $(prefix)/share/gnome-schedule
gnomeschedule_PYTHON = \
......@@ -33,6 +32,5 @@ DISTCLEANFILES = \
EXTRA_DIST = \
$(bin_SCRIPTS) \
$(libexec_SCRIPTS) \
$(gnomeschedule_PYTHON) \
$(ui_DATA)
## IS NOT USED YET
# schedule.py - abstract schedule interfae
# Copyright (C) 2004, 2005 Philip Van Hoof <me at pvanhoof dot be>
# Copyright (C) 2004, 2005 Gaute Hope <eg at gaute dot eu dot org>
# 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 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 02110-1301, USA.
#! /bin/sh
PYTHONPATH=@PYTHONPATH@/gtk-2.0/:$PYTHONPATH @PYTHON_CONFIG@ @prefix@/share/gnome-schedule/scheduleapplet.py
#!/usr/bin/python2
#!/usr/bin/python
# scheduleapplet.py: contains code for the gnome-schedule applet
# Copyright (C) 2004, 2005 Gaute Hope <eg at gaute dot eu dot org>
......@@ -36,9 +36,6 @@ import mainWindow
class ScheduleApplet(gnomeapplet.Applet):
def __init__(self, applet, iid):
self.__gobject_init__()
import gettext
......@@ -129,20 +126,9 @@ gobject.type_register(ScheduleApplet)
#factory
def schedule_applet_factory(applet, iid):
ScheduleApplet(applet,iid)
ScheduleApplet(applet, iid)
return True
if len(sys.argv) > 1 and sys.argv[1] == "run-in-window":
main_window = gtk.Window(gtk.WINDOW_TOPLEVEL)
main_window.set_title("Gnome schedule applet")
main_window.connect("destroy", gtk.main_quit)
app = gnomeapplet.Applet()
schedule_applet_factory(app, None)
app.reparent(main_window)
main_window.show_all()
gtk.main()
else:
gnomeapplet.bonobo_factory("OAFIID:GNOME_schedule_Factory",
gnomeapplet.bonobo_factory("OAFIID:GNOME_GnomeSchedule_Factory",
ScheduleApplet.__gtype__,
"hello", "0", schedule_applet_factory)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment