From 6ff5643ce285429c8c4816893d64cb50f7b601e1 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 4 Aug 2005 23:11:55 +0000 Subject: [PATCH] autodetect for links now should work --- src/common/config.py | 3 ++- src/config.py | 2 +- src/gajim.py | 2 +- src/gtkgui.glade | 3 ++- src/gtkgui_helpers.py | 9 +++++++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/common/config.py b/src/common/config.py index d5870739c..0f77224c7 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -118,7 +118,8 @@ class Config: 'always_english_wikipedia': [opt_bool, False], 'use_dbus': [opt_bool, True], # allow control via dbus service 'send_receive_chat_state_notifications': [opt_bool, True], - 'print_ichat_every_foo_minutes': [opt_int, 5], # default is every 5 minutes + 'autodetect_browser_mailer': [opt_bool, True], + 'print_ichat_every_foo_minutes': [opt_int, 5], 'confirm_close_muc': [opt_bool, True], # confirm closing MUC window 'notify_on_file_complete': [opt_bool, True], # notif. on file complete 'file_transfers_port': [opt_int, 28011], # port, used for file transfers diff --git a/src/config.py b/src/config.py index 8989a8f18..07774a028 100644 --- a/src/config.py +++ b/src/config.py @@ -365,7 +365,7 @@ class PreferencesWindow: self.links_open_with_combobox = self.xml.get_widget('links_open_with_combobox') if gajim.config.get('autodetect_browser_mailer'): self.links_open_with_combobox.set_active(0) - gtkgui_helpers.plugin.autodetect_browser_mailer() + gtkgui_helpers.autodetect_browser_mailer() # autodetect_browser_mailer is now False. # so user has 'Always Use GNOME/KDE' or Custom elif gajim.config.get('openwith') == 'gnome-open': diff --git a/src/gajim.py b/src/gajim.py index 18747abfb..4f1629b51 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -1016,7 +1016,7 @@ class Interface: if gajim.config.get('autodetect_browser_mailer'): - gtkgui_helpers.plugin.autodetect_browser_mailer() + gtkgui_helpers.autodetect_browser_mailer() if gajim.verbose: gajim.log.setLevel(gajim.logging.DEBUG) diff --git a/src/gtkgui.glade b/src/gtkgui.glade index a5f456e03..9cd01441e 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -10138,7 +10138,8 @@ Status message True - False + GPG Encryption + True False diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index 8ac7c07ba..8aa12a893 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -22,9 +22,14 @@ import xml.sax.saxutils import gtk +import os from common import i18n - +i18n.init() _ = i18n._ +from common import gajim + + + def convert_bytes(string): suffix = '' @@ -60,7 +65,7 @@ def escape_for_pango_markup(string): return escaped_str -def autodetect_browser_mailer(self): +def autodetect_browser_mailer(): #recognize the environment for appropriate browser/mailer if os.path.isdir('/proc'): # under Linux: checking if 'gnome-session' or