Sun, 03 Nov 2024 00:05:44 -0500
remove purple3-url-handler.desktop.in.in
The application that did the launching was removed long ago. Also this should
be implemented by the user interfaces and they might provide separate files to
groups schemas as well.
Testing Done:
Called in the turtles.
Reviewed at https://reviews.imfreedom.org/r/3640/
| 10302 | 1 | /* |
|
42283
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
| 10302 | 4 | * |
|
15931
716b5fac1895
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 10302 | 6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 7 | * source distribution. | |
| 8 | * | |
| 9 | * This program is free software; you can redistribute it and/or modify | |
| 10 | * it under the terms of the GNU General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This program is distributed in the hope that it will be useful, | |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | * GNU General Public License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU General Public License | |
|
42283
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
| 10302 | 21 | */ |
| 22 | ||
|
42410
563e7a17c220
Fix possible clash of config headers
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42283
diff
changeset
|
23 | #include <purpleconfig.h> |
|
40439
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40360
diff
changeset
|
24 | |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40360
diff
changeset
|
25 | #include <glib/gi18n-lib.h> |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40360
diff
changeset
|
26 | |
|
39372
43e3da39daf6
Include 'locale.h' directly in files which use setlocale()
Mike Ruprecht <cmaiku@gmail.com>
parents:
39365
diff
changeset
|
27 | #include <locale.h> |
| 10302 | 28 | |
|
40360
e21f3bbcc2a5
Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
40337
diff
changeset
|
29 | #include <purple.h> |
| 10302 | 30 | |
|
40553
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40531
diff
changeset
|
31 | #include "pidginapplication.h" |
|
40496
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40462
diff
changeset
|
32 | #include "pidgincore.h" |
| 10302 | 33 | |
|
42283
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
34 | int |
|
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
35 | pidgin_start(int argc, char *argv[]) { |
|
39256
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
36 | GApplication *app; |
|
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
37 | int ret; |
|
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
38 | |
|
42473
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
39 | bindtextdomain(GETTEXT_PACKAGE, purple_get_locale_dir()); |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
40 | bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
41 | textdomain(GETTEXT_PACKAGE); |
|
39256
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
42 | |
|
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
43 | /* Locale initialization is not complete here. See gtk_init_check() */ |
|
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
44 | setlocale(LC_ALL, ""); |
|
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
45 | |
|
40553
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40531
diff
changeset
|
46 | app = pidgin_application_new(); |
|
40600
46d10c72c137
Create a new ContactList that will eventually fully replace PidginBuddyList
Gary Kramlich <grim@reaperworld.com>
parents:
40553
diff
changeset
|
47 | g_application_set_default(app); |
|
39256
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
48 | |
|
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
49 | ret = g_application_run(app, argc, argv); |
|
38383
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
50 | |
|
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
51 | /* Make sure purple has quit in case something in GApplication |
|
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
52 | * has caused g_application_run() to finish on its own. This can |
|
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
53 | * happen, for example, if the desktop session is ending. |
|
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
54 | */ |
|
42283
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
55 | if(purple_get_core() != NULL) { |
|
38383
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
56 | purple_core_quit(); |
|
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
57 | } |
|
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
58 | |
|
42283
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
59 | if(g_application_get_is_registered(app) && |
|
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
60 | g_application_get_is_remote(app)) |
|
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
61 | { |
|
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
62 | g_printerr("%s\n", |
|
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
63 | _("Exiting because another libpurple client is already " |
|
885e1f4f98b3
Some additional cleanups for libpidgin.c
Gary Kramlich <grim@reaperworld.com>
parents:
42276
diff
changeset
|
64 | "running.")); |
|
39256
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
65 | } |
|
0245b49e1231
libpidgin: Use GApplication command line argument parsing and uniqueness
Mike Ruprecht <cmaiku@gmail.com>
parents:
39255
diff
changeset
|
66 | |
|
38383
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
67 | /* Now that we're sure purple_core_quit() has been called, |
|
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
68 | * this can be freed. |
|
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
69 | */ |
|
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
70 | g_object_unref(app); |
|
10320
f5b0f5cf8562
[gaim-migrate @ 11527]
Mark Doliner <markdoliner@pidgin.im>
parents:
10317
diff
changeset
|
71 | |
| 10302 | 72 | #ifdef _WIN32 |
|
15574
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15567
diff
changeset
|
73 | winpidgin_cleanup(); |
| 10302 | 74 | #endif |
| 75 | ||
|
38383
0ceb576f5617
libpidgin: Port to use GtkApplication
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
76 | return ret; |
| 10302 | 77 | } |