# HG changeset patch # User Gary Kramlich # Date 1723681164 18000 # Node ID 429a2aeb803f6acb1b01ac865af23b68dabdb792 # Parent 93d8e1772e4e708b5d566349e94d5f2af21366cc 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/ diff -r 93d8e1772e4e -r 429a2aeb803f pidgin/data/im.pidgin.Pidgin3.desktop.in.in --- 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@ diff -r 93d8e1772e4e -r 429a2aeb803f pidgin/pidginapplication.c --- 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); }