Commit c95bd600 authored by György Balló's avatar György Balló Committed by Gaute Hope

Remove gnome-python dependency

parent da65b06a
......@@ -20,7 +20,6 @@
#pygtk modules
import gtk
import gobject
import gnome
#python modules
import os
......
......@@ -20,7 +20,6 @@
#pygtk modules
import gtk
import gobject
import gnome
#python modules
import re
......
......@@ -58,9 +58,6 @@ except:
try:
import gtk
import gtk.glade
# TODO: Gnome specific
import gnome
import gnome.ui
except:
print _("You need to install pyGTK or GTKv2,\n"
......@@ -68,8 +65,5 @@ except:
"try: export PYTHONPATH= ")
sys.exit(1)
props = { gnome.PARAM_APP_DATADIR : config.getPrefix() + "/share" }
pr = gnome.program_init ("gnome-schedule", config.getVersion(), properties=props)
mainWindow = mainWindow.main(debug_flag, False, pr, manual_poscorrect)
mainWindow = mainWindow.main(debug_flag, False, manual_poscorrect)
......@@ -22,15 +22,13 @@ import gtk
import gtk.glade
import gobject
# gnome specific
import gnome
from gnome import url_show
#python modules
import os
import pwd
import tempfile
import stat
import subprocess
#custom modules
import config
......@@ -52,10 +50,9 @@ gtk.glade.bindtextdomain(config.GETTEXT_PACKAGE(), config.GNOMELOCALEDIR())
## The MainWindow class
##
class main:
def __init__(self, debug_flag=None, inapplet=False, gprogram = None, manual_poscorrect=False):
def __init__(self, debug_flag=None, inapplet=False, manual_poscorrect=False):
self.debug_flag = debug_flag
self.inapplet = inapplet
self.gprogram = gprogram
self.manual_poscorrect = manual_poscorrect
self.__loadIcon__()
......@@ -646,7 +643,7 @@ class main:
#about box
def open_url (self, *args):
url_show("http://gnome-schedule.sourceforge.net")
gtk.show_uri(None, "http://gnome-schedule.sourceforge.net", 0)
......@@ -717,7 +714,7 @@ class main:
# unset POSIXLY_CORRECT if manually set, bug 612459
if self.manual_poscorrect: os.unsetenv ('POSIXLY_CORRECT')
gnome.execute_terminal_shell (self.user_home_dir, execute)
subprocess.Popen('gnome-terminal --working-directory="' + self.user_home_dir + '" -e "' + execute + '"', shell=True)
if self.manual_poscorrect: os.putenv ('POSIXLY_CORRECT', 'enabled')
......@@ -761,9 +758,7 @@ class main:
#open help
def on_manual_menu_activate (self, *args):
try:
gnome.help_display (
'gnome-schedule',
None)
gtk.show_uri(None, 'ghelp:gnome-schedule', 0)
except gobject.GError, error:
dialog = gtk.MessageDialog (
self.widget,
......
......@@ -58,8 +58,6 @@ try:
import gtk
import gtk.glade
# TODO: Gnome specific
import gnome
import gnome.ui
import gnomeapplet
import gobject
......@@ -69,13 +67,10 @@ except:
"try: export PYTHONPATH= ")
sys.exit(1)
props = { gnome.PARAM_APP_DATADIR : config.getPrefix() + "/share"}
pr = gnome.program_init ("gnome-schedule", config.getVersion(), properties=props)
class ScheduleApplet(gnomeapplet.Applet):
def __init__(self, applet, iid, gprogram, debug_flag, manual_poscorrect):
def __init__(self, applet, iid, debug_flag, manual_poscorrect):
self.__gobject_init__()
self.debug_flag = debug_flag
self.manual_poscorrect = manual_poscorrect
......@@ -88,7 +83,6 @@ class ScheduleApplet(gnomeapplet.Applet):
self.applet = applet
self.gprogram = gprogram
self.__loadIcon__()
......@@ -150,7 +144,7 @@ class ScheduleApplet(gnomeapplet.Applet):
def show_main_window(self, *args):
if self.main_loaded == False:
self.main_loaded = True
self.main_window = mainWindow.main(None, True, self.gprogram, self.manual_poscorrect)
self.main_window = mainWindow.main(None, True, self.manual_poscorrect)
else:
self.main_window.widget.show ()
self.main_window.schedule_reload()
......@@ -179,7 +173,7 @@ gobject.type_register(ScheduleApplet)
#factory
def schedule_applet_factory(applet, iid):
ScheduleApplet(applet, iid, pr, debug_flag, manual_poscorrect)
ScheduleApplet(applet, iid, debug_flag, manual_poscorrect)
return True
gnomeapplet.bonobo_factory("OAFIID:GNOME_GnomeSchedule_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