Tue, 23 Aug 2022 01:58:39 -0500
Port add contact notification to GTK4
Testing Done:
Compiled only; I don't have a menu to trigger the demo action.
Reviewed at https://reviews.imfreedom.org/r/1627/
|
40216
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * pidgin |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * source distribution. |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * This program is free software; you can redistribute it and/or modify |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * it under the terms of the GNU General Public License as published by |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * (at your option) any later version. |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * This program is distributed in the hope that it will be useful, |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * GNU General Public License for more details. |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * along with this program; if not, write to the Free Software |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | * |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | */ |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | #include "pidginpluginsdialog.h" |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | #include <glib/gi18n.h> |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | |
|
40218
8f2da2bb2e1b
Get the new plugin dialog working. Needs a bit of cleanup yet
Gary Kramlich <grim@reaperworld.com>
parents:
40216
diff
changeset
|
28 | #include <gplugin.h> |
|
8f2da2bb2e1b
Get the new plugin dialog working. Needs a bit of cleanup yet
Gary Kramlich <grim@reaperworld.com>
parents:
40216
diff
changeset
|
29 | #include <gplugin-gtk.h> |
|
8f2da2bb2e1b
Get the new plugin dialog working. Needs a bit of cleanup yet
Gary Kramlich <grim@reaperworld.com>
parents:
40216
diff
changeset
|
30 | |
|
40222
40f2888f85c1
delete gtkplugin.[ch] and deal with the repercussions
Gary Kramlich <grim@reaperworld.com>
parents:
40220
diff
changeset
|
31 | #include <purple.h> |
|
40f2888f85c1
delete gtkplugin.[ch] and deal with the repercussions
Gary Kramlich <grim@reaperworld.com>
parents:
40220
diff
changeset
|
32 | |
|
40f2888f85c1
delete gtkplugin.[ch] and deal with the repercussions
Gary Kramlich <grim@reaperworld.com>
parents:
40220
diff
changeset
|
33 | #include "gtkpluginpref.h" |
|
40496
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40225
diff
changeset
|
34 | #include "pidgincore.h" |
|
40222
40f2888f85c1
delete gtkplugin.[ch] and deal with the repercussions
Gary Kramlich <grim@reaperworld.com>
parents:
40220
diff
changeset
|
35 | |
|
40216
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | struct _PidginPluginsDialog { |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | GtkDialog parent; |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | }; |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | /****************************************************************************** |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | * GObject Implementation |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | *****************************************************************************/ |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | G_DEFINE_TYPE(PidginPluginsDialog, pidgin_plugins_dialog, GTK_TYPE_DIALOG); |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | static void |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | pidgin_plugins_dialog_class_init(PidginPluginsDialogClass *klass) { |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | gtk_widget_class_set_template_from_resource( |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | widget_class, |
|
41030
ec8b76f3bf0a
Fix the resource path so we can use the automatic stuff that GtkApplication supports
Gary Kramlich <grim@reaperworld.com>
parents:
40736
diff
changeset
|
51 | "/im/pidgin/Pidgin3/Plugins/dialog.ui" |
|
40216
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | ); |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | } |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | static void |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | pidgin_plugins_dialog_init(PidginPluginsDialog *dialog) { |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | gtk_widget_init_template(GTK_WIDGET(dialog)); |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | } |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | |
|
40736
c2b876aa4c03
Fix a number of issues with the Plugins dialog
Gary Kramlich <grim@reaperworld.com>
parents:
40544
diff
changeset
|
60 | /****************************************************************************** |
|
c2b876aa4c03
Fix a number of issues with the Plugins dialog
Gary Kramlich <grim@reaperworld.com>
parents:
40544
diff
changeset
|
61 | * Public API |
|
c2b876aa4c03
Fix a number of issues with the Plugins dialog
Gary Kramlich <grim@reaperworld.com>
parents:
40544
diff
changeset
|
62 | *****************************************************************************/ |
|
40216
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | GtkWidget * |
|
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | pidgin_plugins_dialog_new(void) { |
|
40736
c2b876aa4c03
Fix a number of issues with the Plugins dialog
Gary Kramlich <grim@reaperworld.com>
parents:
40544
diff
changeset
|
65 | return GTK_WIDGET(g_object_new(PIDGIN_TYPE_PLUGINS_DIALOG, NULL)); |
|
40216
bf78d5476c6a
initial start of moving the plugins dialog to glade
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | } |