Sat, 10 Nov 2007 04:52:20 +0000
propagate from branch 'im.pidgin.pidgin.next.minor' (head 2f91b326b3f073672c2475a8c30a06826da9b82f)
to branch 'im.pidgin.pidgin' (head 326d5b91950b3d78c445722f6d726cfa6b1c525d)
| 6371 | 1 | /** |
| 2 | * @file gtkprivacy.c GTK+ Privacy UI | |
|
16254
eeb2bba4dc94
Rename the Doxygen group from gtkui to pidgin.
Richard Laager <rlaager@pidgin.im>
parents:
15931
diff
changeset
|
3 | * @ingroup pidgin |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | /* pidgin |
| 6371 | 7 | * |
|
15931
716b5fac1895
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
8 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
13775
diff
changeset
|
11 | * |
| 6371 | 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * 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:
18327
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 6371 | 25 | */ |
| 9791 | 26 | #include "internal.h" |
| 15577 | 27 | #include "pidgin.h" |
| 6371 | 28 | |
| 29 | #include "connection.h" | |
| 30 | #include "debug.h" | |
| 31 | #include "privacy.h" | |
| 32 | #include "request.h" | |
| 33 | #include "util.h" | |
| 34 | ||
|
11111
4621d9b973a4
[gaim-migrate @ 13163]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11047
diff
changeset
|
35 | #include "gtkblist.h" |
| 6371 | 36 | #include "gtkprivacy.h" |
| 37 | #include "gtkutils.h" | |
| 38 | ||
| 39 | typedef struct | |
| 40 | { | |
| 41 | GtkWidget *win; | |
| 42 | ||
| 43 | GtkWidget *type_menu; | |
| 44 | ||
| 45 | GtkWidget *add_button; | |
| 46 | GtkWidget *remove_button; | |
| 47 | GtkWidget *clear_button; | |
| 48 | ||
| 49 | GtkWidget *button_box; | |
| 50 | GtkWidget *allow_widget; | |
| 51 | GtkWidget *block_widget; | |
| 52 | ||
| 53 | GtkListStore *allow_store; | |
| 54 | GtkListStore *block_store; | |
| 55 | ||
| 56 | GtkWidget *allow_list; | |
| 57 | GtkWidget *block_list; | |
| 58 | ||
| 59 | gboolean in_allow_list; | |
| 60 | ||
| 15884 | 61 | PurpleAccount *account; |
| 6371 | 62 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
63 | } PidginPrivacyDialog; |
| 6371 | 64 | |
| 65 | typedef struct | |
| 66 | { | |
| 15884 | 67 | PurpleAccount *account; |
| 6371 | 68 | char *name; |
| 69 | gboolean block; | |
| 70 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
71 | } PidginPrivacyRequestData; |
| 6371 | 72 | |
| 73 | static struct | |
| 74 | { | |
| 75 | const char *text; | |
| 76 | int num; | |
| 77 | ||
|
21091
07fe1a99c47b
Patch from Andrew Gaul to constify a bunch of static variables to reduce
Ka-Hing Cheung <khc@pidgin.im>
parents:
20147
diff
changeset
|
78 | } const menu_entries[] = |
| 6371 | 79 | { |
| 15884 | 80 | { N_("Allow all users to contact me"), PURPLE_PRIVACY_ALLOW_ALL }, |
| 81 | { N_("Allow only the users on my buddy list"), PURPLE_PRIVACY_ALLOW_BUDDYLIST }, | |
| 82 | { N_("Allow only the users below"), PURPLE_PRIVACY_ALLOW_USERS }, | |
| 83 | { N_("Block all users"), PURPLE_PRIVACY_DENY_ALL }, | |
| 84 | { N_("Block only the users below"), PURPLE_PRIVACY_DENY_USERS } | |
| 6371 | 85 | }; |
| 86 | ||
|
21091
07fe1a99c47b
Patch from Andrew Gaul to constify a bunch of static variables to reduce
Ka-Hing Cheung <khc@pidgin.im>
parents:
20147
diff
changeset
|
87 | static const size_t menu_entry_count = sizeof(menu_entries) / sizeof(*menu_entries); |
| 6371 | 88 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
89 | static PidginPrivacyDialog *privacy_dialog = NULL; |
| 6371 | 90 | |
|
21227
8887817a113a
#define-ing PIDGIN_REQUEST_HINT_PRIVACY "privacy" inside gtkprivacy.c, because it is used 4 times, and once for gtk_window_set_role()
Gabriel Schulhof <nix@go-nix.ca>
parents:
21174
diff
changeset
|
91 | #define PIDGIN_REQUEST_HINT_PRIVACY "privacy" |
|
8887817a113a
#define-ing PIDGIN_REQUEST_HINT_PRIVACY "privacy" inside gtkprivacy.c, because it is used 4 times, and once for gtk_window_set_role()
Gabriel Schulhof <nix@go-nix.ca>
parents:
21174
diff
changeset
|
92 | |
| 6371 | 93 | static void |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
94 | rebuild_allow_list(PidginPrivacyDialog *dialog) |
| 6371 | 95 | { |
| 96 | GSList *l; | |
| 97 | GtkTreeIter iter; | |
| 98 | ||
| 99 | gtk_list_store_clear(dialog->allow_store); | |
| 100 | ||
| 101 | for (l = dialog->account->permit; l != NULL; l = l->next) { | |
| 102 | gtk_list_store_append(dialog->allow_store, &iter); | |
| 103 | gtk_list_store_set(dialog->allow_store, &iter, 0, l->data, -1); | |
| 104 | } | |
| 105 | } | |
| 106 | ||
| 107 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
108 | rebuild_block_list(PidginPrivacyDialog *dialog) |
| 6371 | 109 | { |
| 110 | GSList *l; | |
| 111 | GtkTreeIter iter; | |
| 112 | ||
| 113 | gtk_list_store_clear(dialog->block_store); | |
| 114 | ||
| 115 | for (l = dialog->account->deny; l != NULL; l = l->next) { | |
| 116 | gtk_list_store_append(dialog->block_store, &iter); | |
| 117 | gtk_list_store_set(dialog->block_store, &iter, 0, l->data, -1); | |
| 118 | } | |
| 119 | } | |
| 120 | ||
| 121 | static const char * | |
| 122 | find_permit_block_by_name(GSList *list, const char *name) | |
| 123 | { | |
| 124 | const char *temp_name; | |
| 125 | GSList *l; | |
| 126 | ||
| 127 | for (l = list; l != NULL; l = l->next) { | |
| 128 | temp_name = (const char *)l->data; | |
| 129 | ||
| 15884 | 130 | /* Should this use purple_normalize()? */ |
| 131 | if (!purple_utf8_strcasecmp(name, temp_name)) | |
| 6371 | 132 | return temp_name; |
| 133 | } | |
| 134 | ||
| 135 | return NULL; | |
| 136 | } | |
| 137 | ||
| 138 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
139 | user_selected_cb(GtkTreeSelection *sel, PidginPrivacyDialog *dialog) |
| 6371 | 140 | { |
| 141 | gtk_widget_set_sensitive(dialog->remove_button, TRUE); | |
| 142 | } | |
| 143 | ||
| 144 | static GtkWidget * | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
145 | build_list(PidginPrivacyDialog *dialog, GtkListStore *model, |
| 6371 | 146 | GtkWidget **ret_treeview) |
| 147 | { | |
| 148 | GtkWidget *sw; | |
| 149 | GtkWidget *treeview; | |
| 150 | GtkCellRenderer *rend; | |
| 151 | GtkTreeViewColumn *column; | |
| 152 | GtkTreeSelection *sel; | |
| 153 | ||
| 154 | sw = gtk_scrolled_window_new(NULL, NULL); | |
| 155 | gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | |
| 13775 | 156 | GTK_POLICY_AUTOMATIC, |
| 157 | GTK_POLICY_AUTOMATIC); | |
|
7931
315fd3921a40
[gaim-migrate @ 8602]
Mark Doliner <markdoliner@pidgin.im>
parents:
7165
diff
changeset
|
158 | gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
| 6371 | 159 | |
| 160 | treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model)); | |
| 161 | *ret_treeview = treeview; | |
| 162 | ||
| 163 | rend = gtk_cell_renderer_text_new(); | |
| 164 | ||
| 165 | column = gtk_tree_view_column_new_with_attributes(NULL, rend, | |
| 166 | "text", 0, | |
| 167 | NULL); | |
| 168 | gtk_tree_view_column_set_clickable(GTK_TREE_VIEW_COLUMN(column), TRUE); | |
| 169 | gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); | |
| 170 | gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE); | |
|
7931
315fd3921a40
[gaim-migrate @ 8602]
Mark Doliner <markdoliner@pidgin.im>
parents:
7165
diff
changeset
|
171 | gtk_container_add(GTK_CONTAINER(sw), treeview); |
|
6374
0bbc59035c89
[gaim-migrate @ 6879]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
172 | |
| 6371 | 173 | gtk_widget_show(treeview); |
| 174 | ||
| 175 | sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); | |
| 176 | ||
| 177 | g_signal_connect(G_OBJECT(sel), "changed", | |
| 178 | G_CALLBACK(user_selected_cb), dialog); | |
| 179 | ||
|
6374
0bbc59035c89
[gaim-migrate @ 6879]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
180 | gtk_widget_set_size_request(sw, -1, 200); |
|
0bbc59035c89
[gaim-migrate @ 6879]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
181 | |
| 6371 | 182 | return sw; |
| 183 | } | |
| 184 | ||
| 185 | static GtkWidget * | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
186 | build_allow_list(PidginPrivacyDialog *dialog) |
| 6371 | 187 | { |
| 188 | GtkWidget *widget; | |
| 189 | GtkWidget *list; | |
| 190 | ||
| 191 | dialog->allow_store = gtk_list_store_new(1, G_TYPE_STRING); | |
| 192 | ||
|
11047
1b0452e2f2a9
[gaim-migrate @ 12972]
Richard Laager <rlaager@pidgin.im>
parents:
10704
diff
changeset
|
193 | gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(dialog->allow_store), 0, GTK_SORT_ASCENDING); |
|
1b0452e2f2a9
[gaim-migrate @ 12972]
Richard Laager <rlaager@pidgin.im>
parents:
10704
diff
changeset
|
194 | |
| 6371 | 195 | widget = build_list(dialog, dialog->allow_store, &list); |
| 196 | ||
| 197 | dialog->allow_list = list; | |
| 198 | ||
| 199 | rebuild_allow_list(dialog); | |
| 200 | ||
| 201 | return widget; | |
| 202 | } | |
| 203 | ||
| 204 | static GtkWidget * | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
205 | build_block_list(PidginPrivacyDialog *dialog) |
| 6371 | 206 | { |
| 207 | GtkWidget *widget; | |
| 208 | GtkWidget *list; | |
| 209 | ||
| 210 | dialog->block_store = gtk_list_store_new(1, G_TYPE_STRING); | |
| 211 | ||
|
11047
1b0452e2f2a9
[gaim-migrate @ 12972]
Richard Laager <rlaager@pidgin.im>
parents:
10704
diff
changeset
|
212 | gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(dialog->block_store), 0, GTK_SORT_ASCENDING); |
|
1b0452e2f2a9
[gaim-migrate @ 12972]
Richard Laager <rlaager@pidgin.im>
parents:
10704
diff
changeset
|
213 | |
| 6371 | 214 | widget = build_list(dialog, dialog->block_store, &list); |
| 215 | ||
| 216 | dialog->block_list = list; | |
| 217 | ||
| 218 | rebuild_block_list(dialog); | |
| 219 | ||
| 220 | return widget; | |
| 221 | } | |
| 222 | ||
| 223 | static gint | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
224 | destroy_cb(GtkWidget *w, GdkEvent *event, PidginPrivacyDialog *dialog) |
| 6371 | 225 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
226 | pidgin_privacy_dialog_hide(); |
| 6371 | 227 | |
| 228 | return 0; | |
| 229 | } | |
| 230 | ||
| 231 | static void | |
| 15884 | 232 | select_account_cb(GtkWidget *dropdown, PurpleAccount *account, |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
233 | PidginPrivacyDialog *dialog) |
| 6371 | 234 | { |
| 235 | int i; | |
| 236 | ||
| 237 | dialog->account = account; | |
| 238 | ||
| 239 | for (i = 0; i < menu_entry_count; i++) { | |
| 240 | if (menu_entries[i].num == account->perm_deny) { | |
| 241 | gtk_option_menu_set_history(GTK_OPTION_MENU(dialog->type_menu), i); | |
| 242 | break; | |
| 243 | } | |
| 244 | } | |
| 245 | ||
| 246 | rebuild_allow_list(dialog); | |
| 247 | rebuild_block_list(dialog); | |
| 248 | } | |
| 249 | ||
|
10704
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10535
diff
changeset
|
250 | /* |
|
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10535
diff
changeset
|
251 | * TODO: Setting the permit/deny setting needs to go through privacy.c |
|
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10535
diff
changeset
|
252 | * Even better: the privacy API needs to not suck. |
|
99a466f384d2
[gaim-migrate @ 12288]
Mark Doliner <markdoliner@pidgin.im>
parents:
10535
diff
changeset
|
253 | */ |
| 6371 | 254 | static void |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
255 | type_changed_cb(GtkOptionMenu *optmenu, PidginPrivacyDialog *dialog) |
| 6371 | 256 | { |
|
8275
e4c1bfcbced6
[gaim-migrate @ 8999]
Mark Doliner <markdoliner@pidgin.im>
parents:
8175
diff
changeset
|
257 | int new_type = menu_entries[gtk_option_menu_get_history(optmenu)].num; |
| 6371 | 258 | |
|
8520
0a0fe6abc212
[gaim-migrate @ 9259]
Mark Doliner <markdoliner@pidgin.im>
parents:
8275
diff
changeset
|
259 | dialog->account->perm_deny = new_type; |
| 15884 | 260 | serv_set_permit_deny(purple_account_get_connection(dialog->account)); |
| 6371 | 261 | |
| 262 | gtk_widget_hide(dialog->allow_widget); | |
| 263 | gtk_widget_hide(dialog->block_widget); | |
| 264 | gtk_widget_hide(dialog->button_box); | |
| 265 | ||
| 15884 | 266 | if (new_type == PURPLE_PRIVACY_ALLOW_USERS) { |
| 6371 | 267 | gtk_widget_show(dialog->allow_widget); |
| 268 | gtk_widget_show(dialog->button_box); | |
| 269 | dialog->in_allow_list = TRUE; | |
| 270 | } | |
| 15884 | 271 | else if (new_type == PURPLE_PRIVACY_DENY_USERS) { |
| 6371 | 272 | gtk_widget_show(dialog->block_widget); |
| 273 | gtk_widget_show(dialog->button_box); | |
| 274 | dialog->in_allow_list = FALSE; | |
| 275 | } | |
|
10147
a4897a5bcf8d
[gaim-migrate @ 11224]
Peter Lawler <pidgin@bleeter.id.au>
parents:
9791
diff
changeset
|
276 | |
| 15884 | 277 | purple_blist_schedule_save(); |
| 278 | pidgin_blist_refresh(purple_get_blist()); | |
| 6371 | 279 | } |
| 280 | ||
| 281 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
282 | add_cb(GtkWidget *button, PidginPrivacyDialog *dialog) |
| 6371 | 283 | { |
| 284 | if (dialog->in_allow_list) | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
285 | pidgin_request_add_permit(dialog->account, NULL); |
| 6371 | 286 | else |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
287 | pidgin_request_add_block(dialog->account, NULL); |
| 6371 | 288 | } |
| 289 | ||
| 290 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
291 | remove_cb(GtkWidget *button, PidginPrivacyDialog *dialog) |
| 6371 | 292 | { |
| 293 | GtkTreeIter iter; | |
| 294 | GtkTreeModel *model; | |
| 295 | GtkTreeSelection *sel; | |
| 296 | char *name; | |
| 297 | ||
| 298 | if (dialog->in_allow_list && dialog->allow_store == NULL) | |
| 299 | return; | |
| 300 | ||
| 301 | if (!dialog->in_allow_list && dialog->block_store == NULL) | |
| 302 | return; | |
| 303 | ||
| 304 | if (dialog->in_allow_list) { | |
| 305 | model = GTK_TREE_MODEL(dialog->allow_store); | |
| 306 | sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(dialog->allow_list)); | |
| 307 | } | |
| 308 | else { | |
| 309 | model = GTK_TREE_MODEL(dialog->block_store); | |
| 310 | sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(dialog->block_list)); | |
| 311 | } | |
| 312 | ||
| 313 | if (gtk_tree_selection_get_selected(sel, NULL, &iter)) | |
| 314 | gtk_tree_model_get(model, &iter, 0, &name, -1); | |
| 315 | else | |
| 316 | return; | |
| 317 | ||
| 318 | if (dialog->in_allow_list) { | |
|
6375
2378950122af
[gaim-migrate @ 6880]
Christian Hammond <chipx86@chipx86.com>
parents:
6374
diff
changeset
|
319 | if (find_permit_block_by_name(dialog->account->permit, name)) |
| 15884 | 320 | purple_privacy_permit_remove(dialog->account, name, FALSE); |
| 6371 | 321 | } |
| 322 | else { | |
|
6375
2378950122af
[gaim-migrate @ 6880]
Christian Hammond <chipx86@chipx86.com>
parents:
6374
diff
changeset
|
323 | if (find_permit_block_by_name(dialog->account->deny, name)) |
| 15884 | 324 | purple_privacy_deny_remove(dialog->account, name, FALSE); |
| 6371 | 325 | } |
|
13149
895f0495b7db
[gaim-migrate @ 15511]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12852
diff
changeset
|
326 | g_free(name); |
| 6371 | 327 | } |
| 328 | ||
| 329 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
330 | clear_cb(GtkWidget *button, PidginPrivacyDialog *dialog) |
| 6371 | 331 | { |
| 8556 | 332 | GSList *l; |
| 333 | if (dialog->in_allow_list) | |
| 334 | l = dialog->account->permit; | |
| 335 | else | |
| 336 | l = dialog->account->deny; | |
| 337 | while (l) { | |
| 338 | char *user; | |
| 339 | user = l->data; | |
| 340 | l = l->next; | |
| 341 | if (dialog->in_allow_list) | |
| 15884 | 342 | purple_privacy_permit_remove(dialog->account, user, FALSE); |
| 8556 | 343 | else |
| 15884 | 344 | purple_privacy_deny_remove(dialog->account, user, FALSE); |
| 8556 | 345 | } |
| 6371 | 346 | } |
| 347 | ||
| 348 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
349 | close_cb(GtkWidget *button, PidginPrivacyDialog *dialog) |
| 6371 | 350 | { |
|
7165
6547d94b0725
[gaim-migrate @ 7732]
Mark Doliner <markdoliner@pidgin.im>
parents:
6646
diff
changeset
|
351 | gtk_widget_destroy(dialog->win); |
|
6547d94b0725
[gaim-migrate @ 7732]
Mark Doliner <markdoliner@pidgin.im>
parents:
6646
diff
changeset
|
352 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
353 | pidgin_privacy_dialog_hide(); |
| 6371 | 354 | } |
| 355 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
356 | static PidginPrivacyDialog * |
| 6371 | 357 | privacy_dialog_new(void) |
| 358 | { | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
359 | PidginPrivacyDialog *dialog; |
| 6371 | 360 | GtkWidget *bbox; |
| 361 | GtkWidget *hbox; | |
| 362 | GtkWidget *vbox; | |
| 363 | GtkWidget *button; | |
| 364 | GtkWidget *dropdown; | |
| 365 | GtkWidget *label; | |
| 366 | GtkWidget *menu; | |
| 367 | int selected = 0; | |
| 368 | int i; | |
| 369 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
370 | dialog = g_new0(PidginPrivacyDialog, 1); |
| 6371 | 371 | |
|
21227
8887817a113a
#define-ing PIDGIN_REQUEST_HINT_PRIVACY "privacy" inside gtkprivacy.c, because it is used 4 times, and once for gtk_window_set_role()
Gabriel Schulhof <nix@go-nix.ca>
parents:
21174
diff
changeset
|
372 | dialog->win = pidgin_create_window(_("Privacy"), PIDGIN_HIG_BORDER, PIDGIN_REQUEST_HINT_PRIVACY, TRUE); |
| 6371 | 373 | |
| 374 | g_signal_connect(G_OBJECT(dialog->win), "delete_event", | |
| 375 | G_CALLBACK(destroy_cb), dialog); | |
| 376 | ||
| 377 | /* Main vbox */ | |
| 15882 | 378 | vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER); |
| 6371 | 379 | gtk_container_add(GTK_CONTAINER(dialog->win), vbox); |
| 380 | gtk_widget_show(vbox); | |
| 381 | ||
| 382 | /* Description label */ | |
| 383 | label = gtk_label_new( | |
| 384 | _("Changes to privacy settings take effect immediately.")); | |
| 385 | ||
| 386 | gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | |
| 387 | gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | |
| 388 | gtk_widget_show(label); | |
| 389 | ||
| 390 | /* Hbox for the accounts drop-down and label. */ | |
| 15882 | 391 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BORDER); |
| 6371 | 392 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
| 393 | gtk_widget_show(hbox); | |
| 394 | ||
| 395 | /* "Set privacy for:" label */ | |
| 396 | label = gtk_label_new(_("Set privacy for:")); | |
| 397 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
| 398 | gtk_widget_show(label); | |
| 399 | ||
| 400 | /* Accounts drop-down */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
401 | dropdown = pidgin_account_option_menu_new(NULL, FALSE, |
|
12852
dc6be215f15e
[gaim-migrate @ 15202]
Richard Laager <rlaager@pidgin.im>
parents:
12849
diff
changeset
|
402 | G_CALLBACK(select_account_cb), NULL, dialog); |
| 6371 | 403 | gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); |
| 404 | gtk_widget_show(dropdown); | |
| 15568 | 405 | pidgin_set_accessible_label (dropdown, label); |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
406 | dialog->account = pidgin_account_option_menu_get_selected(dropdown); |
| 6371 | 407 | |
| 408 | /* Add the drop-down list with the allow/block types. */ | |
| 409 | dialog->type_menu = gtk_option_menu_new(); | |
| 410 | gtk_box_pack_start(GTK_BOX(vbox), dialog->type_menu, FALSE, FALSE, 0); | |
| 411 | gtk_widget_show(dialog->type_menu); | |
| 412 | ||
| 413 | /* Build the menu for that. */ | |
| 414 | menu = gtk_menu_new(); | |
| 415 | ||
| 416 | for (i = 0; i < menu_entry_count; i++) { | |
| 15568 | 417 | pidgin_new_item(menu, _(menu_entries[i].text)); |
| 6371 | 418 | |
| 419 | if (menu_entries[i].num == dialog->account->perm_deny) | |
| 420 | selected = i; | |
| 421 | } | |
| 422 | ||
| 423 | gtk_option_menu_set_menu(GTK_OPTION_MENU(dialog->type_menu), menu); | |
| 424 | gtk_option_menu_set_history(GTK_OPTION_MENU(dialog->type_menu), selected); | |
| 425 | ||
| 426 | g_signal_connect(G_OBJECT(dialog->type_menu), "changed", | |
| 427 | G_CALLBACK(type_changed_cb), dialog); | |
| 428 | ||
| 429 | /* Build the treeview for the allow list. */ | |
| 430 | dialog->allow_widget = build_allow_list(dialog); | |
| 431 | gtk_box_pack_start(GTK_BOX(vbox), dialog->allow_widget, TRUE, TRUE, 0); | |
| 432 | ||
| 433 | /* Build the treeview for the block list. */ | |
| 434 | dialog->block_widget = build_block_list(dialog); | |
| 435 | gtk_box_pack_start(GTK_BOX(vbox), dialog->block_widget, TRUE, TRUE, 0); | |
| 436 | ||
| 437 | /* Add the button box for Add, Remove, Clear */ | |
| 438 | dialog->button_box = bbox = gtk_hbutton_box_new(); | |
| 439 | gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_SPREAD); | |
| 440 | gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); | |
| 441 | ||
| 442 | /* Add button */ | |
| 443 | button = gtk_button_new_from_stock(GTK_STOCK_ADD); | |
| 444 | dialog->add_button = button; | |
| 445 | gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
| 446 | gtk_widget_show(button); | |
| 447 | ||
| 448 | g_signal_connect(G_OBJECT(button), "clicked", | |
| 449 | G_CALLBACK(add_cb), dialog); | |
| 450 | ||
| 451 | /* Remove button */ | |
| 452 | button = gtk_button_new_from_stock(GTK_STOCK_REMOVE); | |
| 453 | dialog->remove_button = button; | |
| 454 | gtk_widget_set_sensitive(button, FALSE); | |
| 455 | gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
| 456 | gtk_widget_show(button); | |
| 457 | ||
| 458 | g_signal_connect(G_OBJECT(button), "clicked", | |
| 459 | G_CALLBACK(remove_cb), dialog); | |
| 460 | ||
| 461 | /* Clear button */ | |
| 462 | button = gtk_button_new_from_stock(GTK_STOCK_CLEAR); | |
| 463 | dialog->clear_button = button; | |
| 464 | gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
| 465 | gtk_widget_show(button); | |
| 466 | ||
| 467 | g_signal_connect(G_OBJECT(button), "clicked", | |
| 468 | G_CALLBACK(clear_cb), dialog); | |
| 469 | ||
| 470 | /* Another button box. */ | |
| 471 | bbox = gtk_hbutton_box_new(); | |
| 472 | gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
| 473 | gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); | |
| 474 | gtk_widget_show(bbox); | |
| 475 | ||
| 476 | /* Close button */ | |
| 477 | button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
| 478 | gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
| 479 | gtk_widget_show(button); | |
| 480 | ||
| 481 | g_signal_connect(G_OBJECT(button), "clicked", | |
| 482 | G_CALLBACK(close_cb), dialog); | |
| 483 | ||
| 15884 | 484 | if (dialog->account->perm_deny == PURPLE_PRIVACY_ALLOW_USERS) { |
| 6371 | 485 | gtk_widget_show(dialog->allow_widget); |
| 486 | gtk_widget_show(dialog->button_box); | |
| 487 | dialog->in_allow_list = TRUE; | |
| 488 | } | |
| 15884 | 489 | else if (dialog->account->perm_deny == PURPLE_PRIVACY_DENY_USERS) { |
| 6371 | 490 | gtk_widget_show(dialog->block_widget); |
| 491 | gtk_widget_show(dialog->button_box); | |
| 492 | dialog->in_allow_list = FALSE; | |
| 493 | } | |
| 494 | ||
| 495 | return dialog; | |
| 496 | } | |
| 497 | ||
| 498 | void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
499 | pidgin_privacy_dialog_show(void) |
| 6371 | 500 | { |
| 15884 | 501 | g_return_if_fail(purple_connections_get_all() != NULL); |
|
10352
802e7ab5b838
[gaim-migrate @ 11569]
Mark Doliner <markdoliner@pidgin.im>
parents:
10148
diff
changeset
|
502 | |
| 6371 | 503 | if (privacy_dialog == NULL) |
| 504 | privacy_dialog = privacy_dialog_new(); | |
| 505 | ||
| 506 | gtk_widget_show(privacy_dialog->win); | |
| 507 | gdk_window_raise(privacy_dialog->win->window); | |
| 508 | } | |
| 509 | ||
| 510 | void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
511 | pidgin_privacy_dialog_hide(void) |
| 6371 | 512 | { |
| 513 | if (privacy_dialog == NULL) | |
| 514 | return; | |
| 515 | ||
|
7165
6547d94b0725
[gaim-migrate @ 7732]
Mark Doliner <markdoliner@pidgin.im>
parents:
6646
diff
changeset
|
516 | g_free(privacy_dialog); |
| 6371 | 517 | privacy_dialog = NULL; |
| 518 | } | |
| 519 | ||
| 520 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
521 | destroy_request_data(PidginPrivacyRequestData *data) |
| 6371 | 522 | { |
|
14097
0c340861ab79
[gaim-migrate @ 16638]
Mark Doliner <markdoliner@pidgin.im>
parents:
13775
diff
changeset
|
523 | g_free(data->name); |
| 6371 | 524 | g_free(data); |
| 525 | } | |
| 526 | ||
| 527 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
528 | confirm_permit_block_cb(PidginPrivacyRequestData *data, int option) |
| 6371 | 529 | { |
| 530 | if (data->block) | |
| 15884 | 531 | purple_privacy_deny(data->account, data->name, FALSE, FALSE); |
| 6371 | 532 | else |
| 15884 | 533 | purple_privacy_allow(data->account, data->name, FALSE, FALSE); |
| 6371 | 534 | |
| 535 | destroy_request_data(data); | |
| 536 | } | |
| 537 | ||
| 538 | static void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
539 | add_permit_block_cb(PidginPrivacyRequestData *data, const char *name) |
| 6371 | 540 | { |
| 541 | data->name = g_strdup(name); | |
| 542 | ||
| 543 | confirm_permit_block_cb(data, 0); | |
| 544 | } | |
| 545 | ||
| 546 | void | |
| 15884 | 547 | pidgin_request_add_permit(PurpleAccount *account, const char *name) |
| 6371 | 548 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
549 | PidginPrivacyRequestData *data; |
| 6371 | 550 | |
| 551 | g_return_if_fail(account != NULL); | |
| 552 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
553 | data = g_new0(PidginPrivacyRequestData, 1); |
| 6371 | 554 | data->account = account; |
| 555 | data->name = g_strdup(name); | |
| 556 | data->block = FALSE; | |
| 557 | ||
| 558 | if (name == NULL) { | |
|
21174
8ba833993a11
disapproval of revision 'c6934783d152f5c2a6904849fbe602ad04a32f14'
Richard Laager <rlaager@pidgin.im>
parents:
21171
diff
changeset
|
559 | purple_request_input_with_hint(account, _("Permit User"), |
| 6371 | 560 | _("Type a user you permit to contact you."), |
| 561 | _("Please enter the name of the user you wish to be " | |
| 562 | "able to contact you."), | |
| 8697 | 563 | NULL, FALSE, FALSE, NULL, |
| 12603 | 564 | _("_Permit"), G_CALLBACK(add_permit_block_cb), |
| 6371 | 565 | _("Cancel"), G_CALLBACK(destroy_request_data), |
|
16490
68c22924d66b
Added account, who, and conversation parameters to the request API calls, and updated all code to match. I can't compile the Perl module, so I'd appreciate it if someone who knows it would verify that this doesn't break Perl.
Evan Schoenberg <evands@pidgin.im>
parents:
16254
diff
changeset
|
566 | account, name, NULL, |
|
21227
8887817a113a
#define-ing PIDGIN_REQUEST_HINT_PRIVACY "privacy" inside gtkprivacy.c, because it is used 4 times, and once for gtk_window_set_role()
Gabriel Schulhof <nix@go-nix.ca>
parents:
21174
diff
changeset
|
567 | PIDGIN_REQUEST_HINT_PRIVACY, data); |
| 6371 | 568 | } |
| 569 | else { | |
| 570 | char *primary = g_strdup_printf(_("Allow %s to contact you?"), name); | |
| 571 | char *secondary = | |
| 572 | g_strdup_printf(_("Are you sure you wish to allow " | |
| 573 | "%s to contact you?"), name); | |
| 574 | ||
| 575 | ||
|
21174
8ba833993a11
disapproval of revision 'c6934783d152f5c2a6904849fbe602ad04a32f14'
Richard Laager <rlaager@pidgin.im>
parents:
21171
diff
changeset
|
576 | purple_request_action_with_hint(account, _("Permit User"), primary, secondary, |
|
16490
68c22924d66b
Added account, who, and conversation parameters to the request API calls, and updated all code to match. I can't compile the Perl module, so I'd appreciate it if someone who knows it would verify that this doesn't break Perl.
Evan Schoenberg <evands@pidgin.im>
parents:
16254
diff
changeset
|
577 | 0, |
|
68c22924d66b
Added account, who, and conversation parameters to the request API calls, and updated all code to match. I can't compile the Perl module, so I'd appreciate it if someone who knows it would verify that this doesn't break Perl.
Evan Schoenberg <evands@pidgin.im>
parents:
16254
diff
changeset
|
578 | account, name, NULL, |
|
21227
8887817a113a
#define-ing PIDGIN_REQUEST_HINT_PRIVACY "privacy" inside gtkprivacy.c, because it is used 4 times, and once for gtk_window_set_role()
Gabriel Schulhof <nix@go-nix.ca>
parents:
21174
diff
changeset
|
579 | PIDGIN_REQUEST_HINT_PRIVACY, data, 2, |
| 12603 | 580 | _("_Permit"), G_CALLBACK(confirm_permit_block_cb), |
| 6371 | 581 | _("Cancel"), G_CALLBACK(destroy_request_data)); |
| 582 | ||
| 583 | g_free(primary); | |
| 584 | g_free(secondary); | |
| 585 | } | |
| 586 | } | |
| 587 | ||
| 588 | void | |
| 15884 | 589 | pidgin_request_add_block(PurpleAccount *account, const char *name) |
| 6371 | 590 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
591 | PidginPrivacyRequestData *data; |
| 6371 | 592 | |
| 593 | g_return_if_fail(account != NULL); | |
| 594 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
595 | data = g_new0(PidginPrivacyRequestData, 1); |
| 6371 | 596 | data->account = account; |
| 597 | data->name = g_strdup(name); | |
| 598 | data->block = TRUE; | |
| 599 | ||
| 600 | if (name == NULL) { | |
|
21174
8ba833993a11
disapproval of revision 'c6934783d152f5c2a6904849fbe602ad04a32f14'
Richard Laager <rlaager@pidgin.im>
parents:
21171
diff
changeset
|
601 | purple_request_input_with_hint(account, _("Block User"), |
| 6371 | 602 | _("Type a user to block."), |
| 603 | _("Please enter the name of the user you wish to block."), | |
| 8697 | 604 | NULL, FALSE, FALSE, NULL, |
| 12603 | 605 | _("_Block"), G_CALLBACK(add_permit_block_cb), |
| 6371 | 606 | _("Cancel"), G_CALLBACK(destroy_request_data), |
|
16490
68c22924d66b
Added account, who, and conversation parameters to the request API calls, and updated all code to match. I can't compile the Perl module, so I'd appreciate it if someone who knows it would verify that this doesn't break Perl.
Evan Schoenberg <evands@pidgin.im>
parents:
16254
diff
changeset
|
607 | account, name, NULL, |
|
21227
8887817a113a
#define-ing PIDGIN_REQUEST_HINT_PRIVACY "privacy" inside gtkprivacy.c, because it is used 4 times, and once for gtk_window_set_role()
Gabriel Schulhof <nix@go-nix.ca>
parents:
21174
diff
changeset
|
608 | PIDGIN_REQUEST_HINT_PRIVACY, data); |
| 6371 | 609 | } |
| 610 | else { | |
| 611 | char *primary = g_strdup_printf(_("Block %s?"), name); | |
| 612 | char *secondary = | |
| 613 | g_strdup_printf(_("Are you sure you want to block %s?"), name); | |
| 614 | ||
|
21174
8ba833993a11
disapproval of revision 'c6934783d152f5c2a6904849fbe602ad04a32f14'
Richard Laager <rlaager@pidgin.im>
parents:
21171
diff
changeset
|
615 | purple_request_action_with_hint(account, _("Block User"), primary, secondary, |
|
16490
68c22924d66b
Added account, who, and conversation parameters to the request API calls, and updated all code to match. I can't compile the Perl module, so I'd appreciate it if someone who knows it would verify that this doesn't break Perl.
Evan Schoenberg <evands@pidgin.im>
parents:
16254
diff
changeset
|
616 | 0, |
|
68c22924d66b
Added account, who, and conversation parameters to the request API calls, and updated all code to match. I can't compile the Perl module, so I'd appreciate it if someone who knows it would verify that this doesn't break Perl.
Evan Schoenberg <evands@pidgin.im>
parents:
16254
diff
changeset
|
617 | account, name, NULL, |
|
21227
8887817a113a
#define-ing PIDGIN_REQUEST_HINT_PRIVACY "privacy" inside gtkprivacy.c, because it is used 4 times, and once for gtk_window_set_role()
Gabriel Schulhof <nix@go-nix.ca>
parents:
21174
diff
changeset
|
618 | PIDGIN_REQUEST_HINT_PRIVACY, data, 2, |
| 12603 | 619 | _("_Block"), G_CALLBACK(confirm_permit_block_cb), |
| 6371 | 620 | _("Cancel"), G_CALLBACK(destroy_request_data)); |
| 621 | ||
| 622 | g_free(primary); | |
| 623 | g_free(secondary); | |
| 624 | } | |
| 625 | } | |
| 626 | ||
| 627 | static void | |
| 15884 | 628 | pidgin_permit_added_removed(PurpleAccount *account, const char *name) |
| 6371 | 629 | { |
| 630 | if (privacy_dialog != NULL) | |
| 631 | rebuild_allow_list(privacy_dialog); | |
| 632 | } | |
| 633 | ||
| 634 | static void | |
| 15884 | 635 | pidgin_deny_added_removed(PurpleAccount *account, const char *name) |
| 6371 | 636 | { |
| 637 | if (privacy_dialog != NULL) | |
| 638 | rebuild_block_list(privacy_dialog); | |
| 639 | } | |
| 640 | ||
| 15884 | 641 | static PurplePrivacyUiOps privacy_ops = |
| 6371 | 642 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
643 | pidgin_permit_added_removed, |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
644 | pidgin_permit_added_removed, |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
645 | pidgin_deny_added_removed, |
|
16752
e6bcb1628c57
Patch from John 'rekkanoryo' Bailey to add the padding struct members in pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
16490
diff
changeset
|
646 | pidgin_deny_added_removed, |
|
e6bcb1628c57
Patch from John 'rekkanoryo' Bailey to add the padding struct members in pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
16490
diff
changeset
|
647 | NULL, |
|
e6bcb1628c57
Patch from John 'rekkanoryo' Bailey to add the padding struct members in pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
16490
diff
changeset
|
648 | NULL, |
|
e6bcb1628c57
Patch from John 'rekkanoryo' Bailey to add the padding struct members in pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
16490
diff
changeset
|
649 | NULL, |
|
e6bcb1628c57
Patch from John 'rekkanoryo' Bailey to add the padding struct members in pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
16490
diff
changeset
|
650 | NULL |
| 6371 | 651 | }; |
| 652 | ||
| 15884 | 653 | PurplePrivacyUiOps * |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
654 | pidgin_privacy_get_ui_ops(void) |
| 6371 | 655 | { |
| 656 | return &privacy_ops; | |
| 657 | } | |
| 658 | ||
| 659 | void | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15486
diff
changeset
|
660 | pidgin_privacy_init(void) |
| 6371 | 661 | { |
| 662 | } |