mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
Change "Advanced Settings" to "Properties"
Remove some unneeded debugging output. Replace gobject.timeout_add_seconds / gobject.timeout_add if/else logic with calls to a misc.timeout_add method that does it internally. Only display the dbus lost error message if dbus has been gone for 5 seconds without coming back.
This commit is contained in:
11
wicd/misc.py
11
wicd/misc.py
@@ -22,6 +22,7 @@ import locale
|
||||
import gettext
|
||||
import sys
|
||||
import re
|
||||
import gobject
|
||||
from threading import Thread
|
||||
from subprocess import Popen, STDOUT, PIPE, call
|
||||
from commands import getoutput
|
||||
@@ -421,7 +422,6 @@ def choose_sudo_prog(prog_num=0):
|
||||
|
||||
for path in paths:
|
||||
if os.path.exists(path):
|
||||
print "returning %s" % path
|
||||
return path
|
||||
|
||||
return None
|
||||
@@ -461,6 +461,7 @@ def get_language_list_gui():
|
||||
language['use_static_dns'] = _('Use Static DNS')
|
||||
language['use_encryption'] = _('Use Encryption')
|
||||
language['advanced_settings'] = _('Advanced Settings')
|
||||
language['properties'] = _('Properties')
|
||||
language['wired_network'] = _('Wired Network')
|
||||
language['wired_network_instructions'] = _('To connect to a wired network,'
|
||||
' you must create a network profile. To create a network profile, type a'
|
||||
@@ -656,3 +657,11 @@ def threaded(f):
|
||||
wrapper.__module__ = f.__module__
|
||||
|
||||
return wrapper
|
||||
|
||||
def timeout_add(time, func, milli=False):
|
||||
""" Convience function for running a function on a timer. """
|
||||
if hasattr(gobject, "timeout_add_seconds") and not milli:
|
||||
return gobject.timeout_add_seconds(time, func)
|
||||
else:
|
||||
return gobject.timeout_add(time * 1000, func)
|
||||
|
||||
Reference in New Issue
Block a user