Fri, 01 May 2020 05:15:51 -0500
Update all of the pidgin code to include purple.h
| 7421 | 1 | /* |
| 2 | * Contact priority settings plugin. | |
| 3 | * | |
| 4 | * Copyright (C) 2003 Etan Reisner, <deryni9@users.sourceforge.net>. | |
| 5 | * | |
| 6 | * This program is free software; you can redistribute it and/or | |
| 7 | * modify it under the terms of the GNU General Public License as | |
| 8 | * published by the Free Software Foundation; either version 2 of the | |
| 9 | * License, or (at your option) any later version. | |
| 10 | * | |
| 11 | * This program is distributed in the hope that it will be useful, | |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 14 | * GNU General Public License for more details. | |
| 15 | * | |
| 16 | * You should have received a copy of the GNU General Public License | |
| 17 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16788
diff
changeset
|
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA. |
| 7421 | 19 | */ |
| 20 | ||
|
9821
d02520c59822
[gaim-migrate @ 10692]
Mark Doliner <markdoliner@pidgin.im>
parents:
8749
diff
changeset
|
21 | #include "internal.h" |
| 15577 | 22 | #include "pidgin.h" |
| 7421 | 23 | #include "gtkutils.h" |
|
40222
40f2888f85c1
delete gtkplugin.[ch] and deal with the repercussions
Gary Kramlich <grim@reaperworld.com>
parents:
40197
diff
changeset
|
24 | #include "pidginplugininfo.h" |
|
40360
e21f3bbcc2a5
Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
40222
diff
changeset
|
25 | #include "pidginaccountchooser.h" |
| 7421 | 26 | |
|
40360
e21f3bbcc2a5
Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
40222
diff
changeset
|
27 | #include <purple.h> |
|
e21f3bbcc2a5
Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
40222
diff
changeset
|
28 | |
|
39785
aa7e3b71802d
Split pidgin_account_option_menu into its own files.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38007
diff
changeset
|
29 | |
| 7421 | 30 | #define CONTACT_PRIORITY_PLUGIN_ID "gtk-contact-priority" |
| 31 | ||
| 32 | static void | |
|
39787
af7ae86ee287
Remove callback from account chooser constructor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39786
diff
changeset
|
33 | select_account(GtkWidget *chooser, gpointer data) |
| 7421 | 34 | { |
|
39787
af7ae86ee287
Remove callback from account chooser constructor.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39786
diff
changeset
|
35 | PurpleAccount *account = pidgin_account_chooser_get_selected(chooser); |
| 7421 | 36 | gtk_spin_button_set_value(GTK_SPIN_BUTTON(data), |
|
26822
968d0220acc6
The alignment in this file is quite odd.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20289
diff
changeset
|
37 | (gdouble)purple_account_get_int(account, "score", 0)); |
| 7421 | 38 | } |
| 39 | ||
| 40 | static void | |
|
39796
b42070e4ea6e
Rename optmenu -> chooser in other files.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39793
diff
changeset
|
41 | account_update(GtkWidget *widget, GtkWidget *chooser) |
| 7421 | 42 | { |
| 15884 | 43 | PurpleAccount *account = NULL; |
| 7421 | 44 | |
|
39796
b42070e4ea6e
Rename optmenu -> chooser in other files.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39793
diff
changeset
|
45 | account = pidgin_account_chooser_get_selected(chooser); |
| 15884 | 46 | purple_account_set_int(account, "score", gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget))); |
| 7421 | 47 | } |
| 48 | ||
| 49 | static void | |
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
50 | pref_update(GtkWidget *widget, char *pref) |
| 7421 | 51 | { |
|
35378
5d9e2581005b
gtk-doc prep: *_get_type() functions are hidden as standard GType-returning funcs, so rename them.
Ankit Vani <a@nevitus.org>
parents:
34477
diff
changeset
|
52 | if (purple_prefs_get_pref_type(pref) == PURPLE_PREF_INT) |
| 15884 | 53 | purple_prefs_set_int(pref, gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget))); |
|
35378
5d9e2581005b
gtk-doc prep: *_get_type() functions are hidden as standard GType-returning funcs, so rename them.
Ankit Vani <a@nevitus.org>
parents:
34477
diff
changeset
|
54 | if (purple_prefs_get_pref_type(pref) == PURPLE_PREF_BOOLEAN) |
| 15884 | 55 | purple_prefs_set_bool(pref, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); |
| 7421 | 56 | } |
| 57 | ||
| 15884 | 58 | static struct PurpleContactPriorityStatuses |
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
59 | { |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
60 | const char *id; |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
61 | const char *description; |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
62 | } const statuses[] = |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
63 | { |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
64 | { "idle", N_("Buddy is idle") }, |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
65 | { "away", N_("Buddy is away") }, |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
66 | { "extended_away", N_("Buddy is \"extended\" away") }, |
|
12595
8108c22aa723
[gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents:
12164
diff
changeset
|
67 | #if 0 |
|
8108c22aa723
[gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents:
12164
diff
changeset
|
68 | /* Not used yet. */ |
|
8108c22aa723
[gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents:
12164
diff
changeset
|
69 | { "mobile", N_("Buddy is mobile") }, |
|
8108c22aa723
[gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents:
12164
diff
changeset
|
70 | #endif |
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
71 | { "offline", N_("Buddy is offline") }, |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
72 | { NULL, NULL } |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
73 | }; |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
74 | |
| 7421 | 75 | static GtkWidget * |
| 15884 | 76 | get_config_frame(PurplePlugin *plugin) |
| 7421 | 77 | { |
| 78 | GtkWidget *ret = NULL, *hbox = NULL, *frame = NULL, *vbox = NULL; | |
| 79 | GtkWidget *label = NULL, *spin = NULL, *check = NULL; | |
|
39796
b42070e4ea6e
Rename optmenu -> chooser in other files.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39793
diff
changeset
|
80 | GtkWidget *chooser = NULL; |
|
33133
9a31f084f259
Fix some merge errors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32438
diff
changeset
|
81 | GtkAdjustment *adj = NULL; |
| 7421 | 82 | GtkSizeGroup *sg = NULL; |
| 15884 | 83 | PurpleAccount *account = NULL; |
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
84 | int i; |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
85 | |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
15884
diff
changeset
|
86 | gboolean last_match = purple_prefs_get_bool("/purple/contact/last_match"); |
| 7421 | 87 | |
| 88 | sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | |
| 89 | ||
|
35526
ed1be305c985
Fix gtk_[hv]box_new gtk3 deprecation warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35378
diff
changeset
|
90 | ret = gtk_box_new(GTK_ORIENTATION_VERTICAL, 18); |
| 7421 | 91 | gtk_container_set_border_width(GTK_CONTAINER(ret), 12); |
| 92 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
93 | frame = pidgin_make_frame(ret, _("Point values to use when...")); |
| 7421 | 94 | |
|
35526
ed1be305c985
Fix gtk_[hv]box_new gtk3 deprecation warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35378
diff
changeset
|
95 | vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5); |
| 7421 | 96 | gtk_container_add(GTK_CONTAINER(frame), vbox); |
| 97 | ||
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
98 | /* Status Spinboxes */ |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
99 | for (i = 0 ; statuses[i].id != NULL && statuses[i].description != NULL ; i++) |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
100 | { |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
15884
diff
changeset
|
101 | char *pref = g_strconcat("/purple/status/scores/", statuses[i].id, NULL); |
| 7421 | 102 | |
|
35526
ed1be305c985
Fix gtk_[hv]box_new gtk3 deprecation warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35378
diff
changeset
|
103 | hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5); |
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
104 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
12727
diff
changeset
|
105 | |
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
106 | label = gtk_label_new_with_mnemonic(_(statuses[i].description)); |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
107 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
108 | gtk_size_group_add_widget(sg, label); |
|
38007
3b971d2ecae1
Simplify gtk_label_set_[xy]align calls.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37990
diff
changeset
|
109 | gtk_label_set_xalign(GTK_LABEL(label), 0); |
|
3b971d2ecae1
Simplify gtk_label_set_[xy]align calls.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37990
diff
changeset
|
110 | gtk_label_set_yalign(GTK_LABEL(label), 0); |
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
12727
diff
changeset
|
111 | |
|
33172
9fb9057fc55c
Fix warnings about GtkAdjustments on GTK+2.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33133
diff
changeset
|
112 | adj = GTK_ADJUSTMENT(gtk_adjustment_new(purple_prefs_get_int(pref), |
|
9fb9057fc55c
Fix warnings about GtkAdjustments on GTK+2.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33133
diff
changeset
|
113 | -500, 500, 1, 1, 1)); |
|
9fb9057fc55c
Fix warnings about GtkAdjustments on GTK+2.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33133
diff
changeset
|
114 | spin = gtk_spin_button_new(adj, 1, 0); |
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
115 | g_signal_connect(G_OBJECT(spin), "value-changed", G_CALLBACK(pref_update), pref); |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
116 | gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); |
| 7421 | 117 | |
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
118 | g_free(pref); |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
119 | } |
| 7421 | 120 | |
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
121 | /* Explanation */ |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
122 | label = gtk_label_new(NULL); |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
123 | gtk_label_set_markup(GTK_LABEL(label), _("The buddy with the <i>largest score</i> is the buddy who will have priority in the contact.\n")); |
|
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
124 | gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); |
| 7421 | 125 | |
| 126 | /* Last match */ | |
|
35526
ed1be305c985
Fix gtk_[hv]box_new gtk3 deprecation warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35378
diff
changeset
|
127 | hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5); |
| 7421 | 128 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
| 129 | ||
|
12164
b39dc890f640
[gaim-migrate @ 14465]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
10729
diff
changeset
|
130 | check = gtk_check_button_new_with_label(_("Use last buddy when scores are equal")); |
| 7421 | 131 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), last_match); |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
15884
diff
changeset
|
132 | g_signal_connect(G_OBJECT(check), "toggled", G_CALLBACK(pref_update), "/purple/contact/last_match"); |
| 7421 | 133 | gtk_box_pack_start(GTK_BOX(hbox), check, FALSE, FALSE, 0); |
| 134 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
135 | frame = pidgin_make_frame(ret, _("Point values to use for account...")); |
| 7421 | 136 | |
|
35526
ed1be305c985
Fix gtk_[hv]box_new gtk3 deprecation warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35378
diff
changeset
|
137 | vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5); |
| 7421 | 138 | gtk_container_add(GTK_CONTAINER(frame), vbox); |
| 139 | ||
| 140 | /* Account */ | |
|
35526
ed1be305c985
Fix gtk_[hv]box_new gtk3 deprecation warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35378
diff
changeset
|
141 | hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5); |
| 7421 | 142 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
| 143 | ||
| 144 | /* make this here so I can use it in the option menu callback, we'll | |
| 145 | * actually set it up later */ | |
|
33172
9fb9057fc55c
Fix warnings about GtkAdjustments on GTK+2.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33133
diff
changeset
|
146 | adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -500, 500, 1, 1, 1)); |
|
9fb9057fc55c
Fix warnings about GtkAdjustments on GTK+2.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33133
diff
changeset
|
147 | spin = gtk_spin_button_new(adj, 1, 0); |
| 7421 | 148 | |
|
39796
b42070e4ea6e
Rename optmenu -> chooser in other files.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39793
diff
changeset
|
149 | chooser = pidgin_account_chooser_new(NULL, TRUE); |
|
b42070e4ea6e
Rename optmenu -> chooser in other files.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39793
diff
changeset
|
150 | gtk_box_pack_start(GTK_BOX(hbox), chooser, FALSE, FALSE, 0); |
|
b42070e4ea6e
Rename optmenu -> chooser in other files.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39793
diff
changeset
|
151 | g_signal_connect(chooser, "changed", G_CALLBACK(select_account), spin); |
| 7421 | 152 | |
| 153 | /* this is where we set up the spin button we made above */ | |
|
39796
b42070e4ea6e
Rename optmenu -> chooser in other files.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39793
diff
changeset
|
154 | account = pidgin_account_chooser_get_selected(chooser); |
| 7421 | 155 | gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), |
|
26822
968d0220acc6
The alignment in this file is quite odd.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20289
diff
changeset
|
156 | (gdouble)purple_account_get_int(account, "score", 0)); |
| 7421 | 157 | gtk_spin_button_set_adjustment(GTK_SPIN_BUTTON(spin), GTK_ADJUSTMENT(adj)); |
| 158 | g_signal_connect(G_OBJECT(spin), "value-changed", | |
|
39796
b42070e4ea6e
Rename optmenu -> chooser in other files.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39793
diff
changeset
|
159 | G_CALLBACK(account_update), chooser); |
| 7421 | 160 | gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); |
| 161 | ||
| 162 | gtk_widget_show_all(ret); | |
|
20289
5c844288fbec
applied changes from 32f31e981f0618a4167aa98bcc22c2dab13d1550
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
20288
diff
changeset
|
163 | g_object_unref(sg); |
| 7421 | 164 | |
| 165 | return ret; | |
| 166 | } | |
| 167 | ||
|
36755
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
168 | static PidginPluginInfo * |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
169 | plugin_query(GError **error) |
| 7421 | 170 | { |
|
36755
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
171 | const gchar * const authors[] = { |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
172 | "Etan Reisner <deryni@eden.rutgers.edu>", |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
173 | NULL |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
174 | }; |
| 7421 | 175 | |
|
36755
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
176 | return pidgin_plugin_info_new( |
|
36935
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
177 | "id", CONTACT_PRIORITY_PLUGIN_ID, |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
178 | "name", N_("Contact Priority"), |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
179 | "version", DISPLAY_VERSION, |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
180 | "category", N_("Utility"), |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
181 | "summary", N_("Allows for controlling the values associated with different buddy states."), |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
182 | "description", N_("Allows for changing the point values of idle/away/offline states for buddies in contact priority computations."), |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
183 | "authors", authors, |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
184 | "website", PURPLE_WEBSITE, |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
185 | "abi-version", PURPLE_ABI_VERSION, |
|
5384600e613c
Made finch and pidgin pref property names shorter: "gnt-pref-frame-cb" and "gtk-config-frame-cb"
Ankit Vani <a@nevitus.org>
parents:
36934
diff
changeset
|
186 | "gtk-config-frame-cb", get_config_frame, |
|
36755
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
187 | NULL |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
188 | ); |
| 7421 | 189 | } |
| 190 | ||
|
36755
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
191 | static gboolean |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
192 | plugin_load(PurplePlugin *plugin, GError **error) |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
193 | { |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
194 | return TRUE; |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
195 | } |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
196 | |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
197 | static gboolean |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
198 | plugin_unload(PurplePlugin *plugin, GError **error) |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
199 | { |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
200 | return TRUE; |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
201 | } |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
202 | |
|
4826ec4c6ac5
More pidgin plugins to new API
Ankit Vani <a@nevitus.org>
parents:
33172
diff
changeset
|
203 | PURPLE_PLUGIN_INIT(contactpriority, plugin_query, plugin_load, plugin_unload); |