Wed, 14 Aug 2024 19:19:24 -0500
Stop trying to handle protocols uris
This setup isn't ideal as it makes the ui dependent on what libpurple installed
for protocols which can and will change. Also, the current setup doesn't
support 3rd party protocols, but they can ship their own desktop files, but
they would also have to ship one for each UI. Either way this current solution
sucks.
Testing Done:
Called in the turtles and ran in a devenv.
Reviewed at https://reviews.imfreedom.org/r/3386/
| pidgin/data/im.pidgin.Pidgin3.desktop.in.in | file | annotate | diff | comparison | revisions | |
| pidgin/pidginapplication.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/data/im.pidgin.Pidgin3.desktop.in.in Tue Aug 13 03:20:44 2024 -0500 +++ b/pidgin/data/im.pidgin.Pidgin3.desktop.in.in Wed Aug 14 19:19:24 2024 -0500 @@ -11,5 +11,4 @@ Terminal=false Type=Application Categories=GTK;Network;InstantMessaging; -MimeType=x-scheme-handler/gg;x-scheme-handler/irc;x-scheme-handler/sip;x-scheme-handler/xmpp; @USES_MM_CHAT_SECTION@
--- a/pidgin/pidginapplication.c Tue Aug 13 03:20:44 2024 -0500 +++ b/pidgin/pidginapplication.c Wed Aug 14 19:19:24 2024 -0500 @@ -800,30 +800,6 @@ } static gint -pidgin_application_command_line(GApplication *application, - GApplicationCommandLine *cmdline) -{ - gchar **argv = NULL; - gint argc = 0, i = 0; - - argv = g_application_command_line_get_arguments(cmdline, &argc); - - if(argc == 1) { - /* No arguments, just activate */ - g_application_activate(application); - } - - /* Start at 1 to skip the executable name */ - for (i = 1; i < argc; i++) { - purple_got_protocol_handler_uri(argv[i]); - } - - g_strfreev(argv); - - return 0; -} - -static gint pidgin_application_handle_local_options(G_GNUC_UNUSED GApplication *application, GVariantDict *options) { @@ -893,7 +869,6 @@ app_class->startup = pidgin_application_startup; app_class->activate = pidgin_application_activate; - app_class->command_line = pidgin_application_command_line; app_class->handle_local_options = pidgin_application_handle_local_options; gtk_app_class->window_added = pidgin_application_window_added; @@ -907,8 +882,7 @@ return g_object_new( PIDGIN_TYPE_APPLICATION, "application-id", "im.pidgin.Pidgin3", - "flags", G_APPLICATION_CAN_OVERRIDE_APP_ID | - G_APPLICATION_HANDLES_COMMAND_LINE, + "flags", G_APPLICATION_CAN_OVERRIDE_APP_ID, "register-session", TRUE, NULL); }