when in windows open links/mailtos with default application. arnaud njoy
This commit is contained in:
parent
7aaffae0dc
commit
36bf675fd3
|
@ -87,7 +87,11 @@ class Preferences_window:
|
||||||
st = gajim.config.get('trayicon')
|
st = gajim.config.get('trayicon')
|
||||||
self.trayicon_checkbutton.set_active(st)
|
self.trayicon_checkbutton.set_active(st)
|
||||||
else:
|
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
|
#Save position
|
||||||
st = gajim.config.get('saveposition')
|
st = gajim.config.get('saveposition')
|
||||||
|
@ -231,6 +235,8 @@ class Preferences_window:
|
||||||
set_active(gajim.config.get('ignore_unknown_contacts'))
|
set_active(gajim.config.get('ignore_unknown_contacts'))
|
||||||
|
|
||||||
#sounds
|
#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'):
|
if gajim.config.get('sounds_on'):
|
||||||
self.xml.get_widget('play_sounds_checkbutton').set_active(True)
|
self.xml.get_widget('play_sounds_checkbutton').set_active(True)
|
||||||
else:
|
else:
|
||||||
|
@ -312,18 +318,25 @@ class Preferences_window:
|
||||||
buf.connect('changed', self.on_msg_textview_changed)
|
buf.connect('changed', self.on_msg_textview_changed)
|
||||||
|
|
||||||
#open links with
|
#open links with
|
||||||
self.links_open_with_combobox = self.xml.get_widget('links_open_with_combobox')
|
if os.name == 'nt':
|
||||||
if gajim.config.get('openwith') == 'gnome-open':
|
self.links_frame = self.xml.get_widget('links_frame')
|
||||||
self.links_open_with_combobox.set_active(0)
|
self.links_frame.hide()
|
||||||
elif gajim.config.get('openwith') == 'kfmclient exec':
|
self.links_frame.set_no_show_all(True)
|
||||||
self.links_open_with_combobox.set_active(True)
|
else:
|
||||||
elif gajim.config.get('openwith') == 'custom':
|
self.links_open_with_combobox = self.xml.get_widget('links_open_with_combobox')
|
||||||
self.links_open_with_combobox.set_active(2)
|
self.links_open_with_combobox.hide()
|
||||||
self.xml.get_widget('custom_apps_frame').set_sensitive(True)
|
self.links_open_with_combobox.set_no_show_all(True)
|
||||||
self.xml.get_widget('custom_browser_entry').set_text(\
|
if gajim.config.get('openwith') == 'gnome-open':
|
||||||
gajim.config.get('custombrowser'))
|
self.links_open_with_combobox.set_active(0)
|
||||||
self.xml.get_widget('custom_mail_client_entry').set_text(\
|
elif gajim.config.get('openwith') == 'kfmclient exec':
|
||||||
gajim.config.get('custommailapp'))
|
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
|
#log presences in user file
|
||||||
st = gajim.config.get('log_notif_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):
|
def on_preferences_window_show(self, widget):
|
||||||
self.notebook.set_current_page(0)
|
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')
|
theme_combobox = self.xml.get_widget('theme_combobox')
|
||||||
model = theme_combobox.get_model()
|
model = theme_combobox.get_model()
|
||||||
|
|
|
@ -109,6 +109,12 @@ GTKGUI_GLADE = 'gtkgui.glade'
|
||||||
class Interface:
|
class Interface:
|
||||||
def launch_browser_mailer(self, kind, url):
|
def launch_browser_mailer(self, kind, url):
|
||||||
#kind = 'url' or 'mail'
|
#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':
|
if gajim.config.get('openwith') == 'gnome-open':
|
||||||
app = 'gnome-open'
|
app = 'gnome-open'
|
||||||
args = ['gnome-open']
|
args = ['gnome-open']
|
||||||
|
|
|
@ -5290,7 +5290,7 @@
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkFrame" id="frame21">
|
<widget class="GtkFrame" id="links_frame">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label_xalign">0</property>
|
<property name="label_xalign">0</property>
|
||||||
<property name="label_yalign">0.5</property>
|
<property name="label_yalign">0.5</property>
|
||||||
|
|
Loading…
Reference in New Issue