1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-22 14:07:59 +01:00

experimental:

- Fix some syntax/import problems created during the merge
This commit is contained in:
imdano
2008-09-06 19:53:25 +00:00
parent 345b7ce0b9
commit 687d932065
4 changed files with 23 additions and 18 deletions

View File

@@ -38,8 +38,8 @@ from wicd import misc
from wicd import wpath
from wicd.misc import noneToString
from wicd.netentry import WiredNetworkEntry, WirelessNetworkEntry
from wicd.prefs import PreferencesDialog
from wicd.dbusmanager import DBusManager
from wicd.prefs import PreferencesDialog
if __name__ == '__main__':
wpath.chdir(__file__)
@@ -84,7 +84,6 @@ def setup_dbus(dbus_man=None):
wired = dbus_ifaces['wired']
return True
def error(parent, message):
""" Shows an error dialog """
dialog = gtk.MessageDialog(parent, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR,
@@ -92,14 +91,6 @@ def error(parent, message):
dialog.set_markup(message)
dialog.run()
dialog.destroy()
def alert(parent, message):
""" Shows an error dialog """
dialog = gtk.MessageDialog(parent, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING,
gtk.BUTTONS_OK)
dialog.set_markup(message)
dialog.run()
dialog.destroy()
########################################
##### GTK EXTENSION CLASSES

View File

@@ -28,7 +28,6 @@ import gobject
import pango
from wicd import misc
from wicd import gui
from wicd.misc import checkboxTextboxToggle, noneToBlankString
daemon = None
@@ -37,6 +36,14 @@ wired = None
language = misc.get_language_list_gui()
def alert(parent, message):
""" Shows an alert dialog """
dialog = gtk.MessageDialog(parent, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING,
gtk.BUTTONS_OK)
dialog.set_markup(message)
dialog.run()
dialog.destroy()
class PreferencesDialog(object):
def __init__(self, wTree, dbus):
global daemon, wireless, wired
@@ -229,7 +236,7 @@ class PreferencesDialog(object):
wired.SetWiredAutoConnectMethod(1)
if self.backends[self.backendcombo.get_active()] != daemon.GetSavedBackend():
gui.alert(self.dialog, language["backend_alert"])
alert(self.dialog, language["backend_alert"])
daemon.SetBackend(self.backends[self.backendcombo.get_active()])
# External Programs Tab

View File

@@ -63,6 +63,8 @@ if __name__ == '__main__':
misc.RenameProcess("wicd")
wireless_conf = wpath.etc + "wireless-settings.conf"
wired_conf = wpath.etc + "wired-settings.conf"
class WicdDaemon(dbus.service.Object):
def __init__(self, bus_name, object_path="/org/wicd/daemon",
@@ -1414,7 +1416,7 @@ def main(argv):
# Open the DBUS session
bus = dbus.SystemBus()
wicd_bus = dbus.service.BusName('org.wicd.daemon', bus=bus)
daemon = WicdDaemon(wicd_bus, auto_connect=auto_scan)
daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
gobject.threads_init()
if not no_poll:

View File

@@ -15,8 +15,9 @@ current = os.path.dirname(os.path.realpath(__file__)) + '/'
# These paths are replaced when setup.py configure is run
# All of these paths *MUST* end in a /
# except the python one, of course as it is an executable
# All directory paths *MUST* end in a /
# DIRECTORIES
lib = '/usr/lib/wicd/'
share = '/usr/share/wicd/'
@@ -26,14 +27,12 @@ encryption = '/etc/wicd/encryption/templates/'
bin = '/usr/bin/'
networks = '/var/lib/wicd/configurations/'
log = '/var/log/wicd/'
backends = '/usr/lib/wicd/backends/'
# other, less useful entries
resume = '/etc/acpi/resume.d/'
suspend = '/etc/acpi/suspend.d/'
sbin = '/usr/sbin/'
dbus = '/etc/dbus-1/system.d/'
desktop = '/usr/share/applications/'
backends= '/usr/lib/wicd/backends/'
translations = '/usr/share/locale/'
icons = '/usr/share/icons/hicolor/'
autostart = '/etc/xdg/autostart/'
@@ -42,6 +41,9 @@ docdir = '/usr/share/doc/wicd/'
mandir = '/usr/share/man/'
kdedir = '/usr/share/autostart/'
# FILES
# python begins the file section
python = '/usr/bin/python'
pidfile = '/var/run/wicd/wicd.pid'
# stores something like other/wicd
@@ -49,6 +51,9 @@ pidfile = '/var/run/wicd/wicd.pid'
initfile = 'init/debian/wicd'
# stores only the file name, i.e. wicd
initfilename = 'wicd'
# BOOLEANS
no_install_init = False
no_install_man = False
no_install_kde = False