diff --git a/data/gajim-remote.desktop.in.in b/data/gajim-remote.desktop.in.in new file mode 100644 index 000000000..a2c56a27b --- /dev/null +++ b/data/gajim-remote.desktop.in.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Categories=Network;InstantMessaging;RemoteAccess;ConsoleOnly; +_Name=Gajim Remote +_Keywords=chat;messaging;im;jabber;xmpp;bonjour;voip +Version=1.0 +Exec=gajim-remote handle_uri %u +TryExec=gajim-remote +StartupNotify=false +Terminal=false +Type=Application +MimeType=x-scheme-handler/xmpp diff --git a/data/gui/preferences_window.ui b/data/gui/preferences_window.ui index a238b52b8..0c39f7413 100644 --- a/data/gui/preferences_window.ui +++ b/data/gui/preferences_window.ui @@ -3049,23 +3049,6 @@ to discover one from server. 0 - - - Check on startup if Gajim is the _default Jabber client - True - True - False - True - 0 - True - - - - False - True - 1 - - diff --git a/po/el.po b/po/el.po index caeb7d096..1b8439234 100644 --- a/po/el.po +++ b/po/el.po @@ -8859,7 +8859,7 @@ msgstr "" #: ../src/gajim-remote-plugin.py:252 ../src/gajim-remote.py:277 #, fuzzy -msgid "Handle a xmpp:/ uri" +msgid "Handle a xmpp: uri" msgstr "Το URI \"%s\" δεν είναι έγκυρο." #: ../src/gajim-remote-plugin.py:254 ../src/gajim-remote.py:279 diff --git a/po/he.po b/po/he.po index ec9daa729..32a5c1cd3 100644 --- a/po/he.po +++ b/po/he.po @@ -9628,7 +9628,7 @@ msgstr "cli" #: ../src/gajim-remote.py:277 #, fuzzy -msgid "Handle a xmpp:/ uri" +msgid "Handle a xmpp: uri" msgstr "cli" #: ../src/gajim-remote.py:279 diff --git a/po/pl.po b/po/pl.po index 1a865de36..8a49551ae 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8979,7 +8979,7 @@ msgid "Account in which the avatar will be set; if not specified, the avatar wil msgstr "Konto, dla którego ma być ustawiony awatar; jeżeli nie jest określone, awatar zostanie ustawiony dla wszystkich kont" #: ../src/gajim-remote.py:278 -msgid "Handle a xmpp:/ uri" +msgid "Handle a xmpp: uri" msgstr "Obsługuj URI xmpp:/" #: ../src/gajim-remote.py:280 diff --git a/po/tr.po b/po/tr.po index 833639ce4..d7fe84c49 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7786,7 +7786,7 @@ msgstr "" #: ../src/gajim-remote.py:277 #, fuzzy -msgid "Handle a xmpp:/ uri" +msgid "Handle a xmpp: uri" msgstr "Adres verilmedi" #: ../src/gajim-remote.py:279 diff --git a/src/common/config.py b/src/common/config.py index fd64a80d0..afdad2092 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -245,7 +245,6 @@ class Config: 'notification_avatar_height': [opt_int, 48], 'muc_highlight_words': [opt_str, '', _('A semicolon-separated list of words that will be highlighted in group chats.')], 'quit_on_roster_x_button': [opt_bool, False, _('If True, quits Gajim when X button of Window Manager is clicked. This setting is taken into account only if notification icon is used.')], - 'check_if_gajim_is_default': [opt_bool, True, _('If True, Gajim will check if it\'s the default jabber client on each startup.')], 'show_unread_tab_icon': [opt_bool, False, _('If True, Gajim will display an icon on each tab containing unread messages. Depending on the theme, this icon may be animated.')], 'show_status_msgs_in_roster': [opt_bool, True, _('If True, Gajim will display the status message, if not empty, for every contact under the contact name in roster window.'), True], 'show_avatars_in_roster': [opt_bool, True, '', True], diff --git a/src/common/gnupg.py b/src/common/gnupg.py index d730ece01..4fb40e0a1 100644 --- a/src/common/gnupg.py +++ b/src/common/gnupg.py @@ -608,6 +608,7 @@ class Sign(TextHandler): __bool__ = __nonzero__ def handle_status(self, key, value): + self.status = '' if key in ("USERID_HINT", "NEED_PASSPHRASE", "BAD_PASSPHRASE", "GOOD_PASSPHRASE", "BEGIN_SIGNING", "CARDCTRL", "INV_SGNR", "NO_SGNR", "MISSING_PASSPHRASE", "NEED_PASSPHRASE_PIN", diff --git a/src/config.py b/src/config.py index c75777677..c02a94f84 100644 --- a/src/config.py +++ b/src/config.py @@ -557,10 +557,6 @@ class PreferencesWindow: self.update_proxy_list() - # check if gajm is default - st = gajim.config.get('check_if_gajim_is_default') - self.xml.get_object('check_default_client_checkbutton').set_active(st) - # Ignore messages from unknown contacts w = self.xml.get_object('ignore_events_from_unknown_contacts_checkbutton') st = self.get_per_account_option('ignore_unknown_contacts') @@ -1179,9 +1175,6 @@ class PreferencesWindow: widget.set_inconsistent(False) self.on_per_account_checkbutton_toggled(widget, 'send_idle_time') - def on_check_default_client_checkbutton_toggled(self, widget): - self.on_checkbutton_toggled(widget, 'check_if_gajim_is_default') - def on_notify_gmail_checkbutton_toggled(self, widget): self.on_checkbutton_toggled(widget, 'notify_on_new_gmail_email') diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index a2de8e7df..7c7a504b5 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -677,94 +677,6 @@ def decode_filechooser_file_paths(file_paths): return file_paths_list -def possibly_set_gajim_as_xmpp_handler(): - """ - Register (by default only the first time) 'xmmp:' to Gajim - """ - path_to_dot_kde = os.path.expanduser('~/.kde') - if os.path.exists(path_to_dot_kde): - path_to_kde_file = os.path.join(path_to_dot_kde, - 'share/services/xmpp.protocol') - else: - path_to_kde_file = None - - def set_gajim_as_xmpp_handler(is_checked=None): - if is_checked is not None: - # come from confirmation dialog - gajim.config.set('check_if_gajim_is_default', is_checked) - path_to_gajim_script, typ = get_abspath_for_script('gajim-remote', True) - if path_to_gajim_script: - if typ == 'svn': - command = path_to_gajim_script + ' handle_uri %s' - else: # 'installed' - command = 'gajim-remote handle_uri %s' - - # setting for GNOME/Gconf - client.set_bool('/desktop/gnome/url-handlers/xmpp/enabled', True) - client.set_string('/desktop/gnome/url-handlers/xmpp/command', - command) - client.set_bool('/desktop/gnome/url-handlers/xmpp/needs_terminal', - False) - - # setting for KDE - if path_to_kde_file is not None: # user has run kde at least once - try: - f = open(path_to_kde_file, 'a') - f.write('''\ -[Protocol] -exec=%s "%%u" -protocol=xmpp -input=none -output=none -helper=true -listing=false -reading=false -writing=false -makedir=false -deleting=false -icon=gajim -Description=xmpp -''' % command) - f.close() - except IOError: - log.debug("I/O Error writing settings to %s", - repr(path_to_kde_file), exc_info=True) - else: # no gajim remote, stop ask user everytime - gajim.config.set('check_if_gajim_is_default', False) - - try: - gi.require_version('GConf', '2.0') - GConf = importlib.import_module('gi.repository.GConf') - # in try because daemon may not be there - client = GConf.Client.get_default() - except Exception: - return - - old_command = client.get_string('/desktop/gnome/url-handlers/xmpp/command') - if not old_command or old_command.endswith(' open_chat %s'): - # first time (GNOME/GCONF) or old Gajim version - we_set = True - elif path_to_kde_file is not None and not os.path.exists(path_to_kde_file): - # only the first time (KDE) - we_set = True - else: - we_set = False - - if we_set: - set_gajim_as_xmpp_handler() - elif old_command and not old_command.endswith(' handle_uri %s'): - # xmpp: is currently handled by another program, so ask the user - pritext = _('Gajim is not the default Jabber client') - sectext = _('Would you like to make Gajim the default Jabber client?') - checktext = _('Always check to see if Gajim is the default Jabber ' - 'client on startup') - def on_cancel(checked): - gajim.config.set('check_if_gajim_is_default', checked) - dlg = dialogs.ConfirmationDialogCheck(pritext, sectext, checktext, - set_gajim_as_xmpp_handler, on_cancel) - if gajim.config.get('check_if_gajim_is_default'): - dlg.checkbutton.set_active(True) - def escape_underscore(s): """ Escape underlines to prevent them from being interpreted as keyboard diff --git a/src/gui_interface.py b/src/gui_interface.py index e47655f05..4da0968f1 100644 --- a/src/gui_interface.py +++ b/src/gui_interface.py @@ -1213,6 +1213,8 @@ class Interface: file_props = None # get the file_props of our session file_props = FilesProp.getFileProp(obj.conn.name, obj.sid) + if not file_props: + return ft.set_status(file_props, 'stop') file_props.error = -4 # is it the right error code? ft.show_stopped(obj.jid, file_props, 'Peer cancelled ' + @@ -2772,10 +2774,6 @@ class Interface: if gajim.config.get('verbose'): logging_helpers.set_verbose() - # Is Gajim default app? - if os.name != 'nt' and gajim.config.get('check_if_gajim_is_default'): - gtkgui_helpers.possibly_set_gajim_as_xmpp_handler() - for account in gajim.config.get_per('accounts'): if gajim.config.get_per('accounts', account, 'is_zeroconf'): gajim.ZEROCONF_ACC_NAME = account