diff --git a/src/config.py b/src/config.py index 423c08e81a1263a05b49b12274e5b3fc783fc7a3..dc66821c2dde69a3ad36479a15cd540f3623a423 100644 --- a/src/config.py +++ b/src/config.py @@ -87,7 +87,11 @@ class Preferences_window: st = gajim.config.get('trayicon') self.trayicon_checkbutton.set_active(st) else: - self.trayicon_checkbutton.set_sensitive(False) + if os.name == 'nt': + self.trayicon_checkbutton.hide() + self.trayicon_checkbutton.set_no_show_all(True) + else: + self.trayicon_checkbutton.set_sensitive(False) #Save position st = gajim.config.get('saveposition') @@ -231,6 +235,8 @@ class Preferences_window: set_active(gajim.config.get('ignore_unknown_contacts')) #sounds + if os.name == 'nt': # if windows, player must not become visible on show_all + self.xml.get_widget('soundplayer_hbox').set_no_show_all(True) if gajim.config.get('sounds_on'): self.xml.get_widget('play_sounds_checkbutton').set_active(True) else: @@ -312,18 +318,25 @@ class Preferences_window: buf.connect('changed', self.on_msg_textview_changed) #open links with - self.links_open_with_combobox = self.xml.get_widget('links_open_with_combobox') - if gajim.config.get('openwith') == 'gnome-open': - self.links_open_with_combobox.set_active(0) - elif gajim.config.get('openwith') == 'kfmclient exec': - self.links_open_with_combobox.set_active(True) - elif gajim.config.get('openwith') == 'custom': - self.links_open_with_combobox.set_active(2) - self.xml.get_widget('custom_apps_frame').set_sensitive(True) - self.xml.get_widget('custom_browser_entry').set_text(\ - gajim.config.get('custombrowser')) - self.xml.get_widget('custom_mail_client_entry').set_text(\ - gajim.config.get('custommailapp')) + if os.name == 'nt': + self.links_frame = self.xml.get_widget('links_frame') + self.links_frame.hide() + self.links_frame.set_no_show_all(True) + else: + self.links_open_with_combobox = self.xml.get_widget('links_open_with_combobox') + self.links_open_with_combobox.hide() + self.links_open_with_combobox.set_no_show_all(True) + if gajim.config.get('openwith') == 'gnome-open': + self.links_open_with_combobox.set_active(0) + elif gajim.config.get('openwith') == 'kfmclient exec': + self.links_open_with_combobox.set_active(True) + elif gajim.config.get('openwith') == 'custom': + self.links_open_with_combobox.set_active(2) + self.xml.get_widget('custom_apps_frame').set_sensitive(True) + self.xml.get_widget('custom_browser_entry').set_text(\ + gajim.config.get('custombrowser')) + self.xml.get_widget('custom_mail_client_entry').set_text(\ + gajim.config.get('custommailapp')) #log presences in user file st = gajim.config.get('log_notif_in_user_file') @@ -353,9 +366,6 @@ class Preferences_window: def on_preferences_window_show(self, widget): self.notebook.set_current_page(0) - if os.name == 'nt': # if windows, player must not be visible - self.xml.get_widget('soundplayer_hbox').hide() - self.trayicon_checkbutton.hide() theme_combobox = self.xml.get_widget('theme_combobox') model = theme_combobox.get_model() diff --git a/src/gajim.py b/src/gajim.py index 916acc3cc7c86d93dd0e910ecc4218293e85b73a..2a556bacdca51e27ab651525b64c0ad7453eea47 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -109,6 +109,12 @@ GTKGUI_GLADE = 'gtkgui.glade' class Interface: def launch_browser_mailer(self, kind, url): #kind = 'url' or 'mail' + if os.name == 'nt': + try: + os.startfile(url) # if pywin32 is installed we open + except: + pass + return if gajim.config.get('openwith') == 'gnome-open': app = 'gnome-open' args = ['gnome-open'] diff --git a/src/gtkgui.glade b/src/gtkgui.glade index 890a44ef645c605e218999ae71725b5f5b5e3c90..8f2bdaebb0bafc9586be095cc12900bb393d4039 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -5290,7 +5290,7 @@ <property name="spacing">5</property> <child> - <widget class="GtkFrame" id="frame21"> + <widget class="GtkFrame" id="links_frame"> <property name="visible">True</property> <property name="label_xalign">0</property> <property name="label_yalign">0.5</property>