Mercurial > pidgin.yaz
annotate src/dialogs.c @ 8419:5c6124e9a3a7
[gaim-migrate @ 9149]
german po
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 09 Mar 2004 19:52:17 +0000 |
parents | a2c5537a814b |
children | 6d0869404696 |
rev | line source |
---|---|
1 | 1 /* |
2 * gaim | |
3 * | |
8046 | 4 * Gaim is the legal property of its developers, whose names are too numerous |
5 * to list here. Please refer to the COPYRIGHT file distributed with this | |
6 * source distribution. | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
7 * |
1 | 8 * This program is free software; you can redistribute it and/or modify |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6352
diff
changeset
|
22 #include "gtkinternal.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
23 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
24 #include "debug.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
25 #include "log.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
26 #include "multi.h" |
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5411
diff
changeset
|
27 #include "notify.h" |
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
28 #include "prefs.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
29 #include "prpl.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
30 #include "request.h" |
6065 | 31 #include "status.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
32 #include "util.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
33 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
34 #include "gtkblist.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
35 #include "gtkconv.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
36 #include "gtkimhtml.h" |
8317 | 37 #include "gtkimhtmltoolbar.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
38 #include "gtkprefs.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
39 #include "gtkutils.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
40 #include "stock.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
41 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
42 #include "ui.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
43 |
6646
b89d98f0bf79
[gaim-migrate @ 7171]
Christian Hammond <chipx86@chipx86.com>
parents:
6640
diff
changeset
|
44 /* XXX */ |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
45 #include "gaim.h" |
1035
80a47e3b1bca
[gaim-migrate @ 1045]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1032
diff
changeset
|
46 |
1 | 47 static GList *dialogwindows = NULL; |
5560
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5551
diff
changeset
|
48 static GtkWidget *fontseld = NULL; |
230
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
229
diff
changeset
|
49 |
2743 | 50 struct confirm_del { |
51 GtkWidget *window; | |
52 GtkWidget *label; | |
53 GtkWidget *ok; | |
54 GtkWidget *cancel; | |
55 char name[1024]; | |
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5560
diff
changeset
|
56 GaimConnection *gc; |
2743 | 57 }; |
58 | |
1 | 59 struct create_away { |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
60 GtkWidget *window; |
8317 | 61 GtkWidget *toolbar; |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
62 GtkWidget *entry; |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
63 GtkWidget *text; |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
825
diff
changeset
|
64 struct away_message *mess; |
1 | 65 }; |
66 | |
67 struct warning { | |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
68 GtkWidget *window; |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
69 GtkWidget *anon; |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
70 char *who; |
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5560
diff
changeset
|
71 GaimConnection *gc; |
1 | 72 }; |
73 | |
3197 | 74 struct getuserinfo { |
75 GtkWidget *window; | |
76 GtkWidget *entry; | |
77 GtkWidget *account; | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
78 GaimConnection *gc; |
3197 | 79 }; |
80 | |
2621
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
81 struct view_log { |
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
82 long offset; |
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
83 int options; |
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
84 char *name; |
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
85 GtkWidget *bbox; |
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
86 GtkWidget *window; |
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
87 GtkWidget *layout; |
7330 | 88 void *clear_handle; |
2621
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
89 }; |
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
90 |
4119 | 91 /* Wrapper to get all the text from a GtkTextView */ |
92 gchar* gtk_text_view_get_text(GtkTextView *text, gboolean include_hidden_chars) | |
93 { | |
94 GtkTextBuffer *buffer; | |
95 GtkTextIter start, end; | |
96 | |
97 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)); | |
98 gtk_text_buffer_get_start_iter(buffer, &start); | |
99 gtk_text_buffer_get_end_iter(buffer, &end); | |
100 | |
101 return gtk_text_buffer_get_text(buffer, &start, &end, include_hidden_chars); | |
102 } | |
103 | |
1 | 104 /*------------------------------------------------------------------------*/ |
105 /* Destroys */ | |
106 /*------------------------------------------------------------------------*/ | |
107 | |
108 static void destroy_dialog(GtkWidget *w, GtkWidget *w2) | |
109 { | |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
110 GtkWidget *dest; |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
111 |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
112 if (!GTK_IS_WIDGET(w2)) |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
113 dest = w; |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
114 else |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
115 dest = w2; |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
116 |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
117 dialogwindows = g_list_remove(dialogwindows, dest); |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
118 gtk_widget_destroy(dest); |
1 | 119 } |
120 | |
121 | |
122 void destroy_all_dialogs() | |
123 { | |
2621
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
124 while (dialogwindows) |
f8b02cf4af94
[gaim-migrate @ 2634]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2613
diff
changeset
|
125 destroy_dialog(NULL, dialogwindows->data); |
1 | 126 |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
350
diff
changeset
|
127 if (awaymessage) |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
350
diff
changeset
|
128 do_im_back(NULL, NULL); |
1 | 129 } |
130 | |
3757 | 131 static void do_warn(GtkWidget *widget, gint resp, struct warning *w) |
1 | 132 { |
3757 | 133 if (resp == GTK_RESPONSE_OK) |
134 serv_warn(w->gc, w->who, (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w->anon))) ? 1 : 0); | |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
135 |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
136 destroy_dialog(NULL, w->window); |
7879 | 137 g_free(w->who); |
1288
d8eaf65ca9c3
[gaim-migrate @ 1298]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1272
diff
changeset
|
138 g_free(w); |
d8eaf65ca9c3
[gaim-migrate @ 1298]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1272
diff
changeset
|
139 } |
1 | 140 |
7879 | 141 void show_warn_dialog(GaimConnection *gc, const char *who) |
1 | 142 { |
3757 | 143 char *labeltext; |
144 GtkWidget *hbox, *vbox; | |
1 | 145 GtkWidget *label; |
5024 | 146 GtkWidget *img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); |
6640
314111e7b601
[gaim-migrate @ 7165]
Christian Hammond <chipx86@chipx86.com>
parents:
6623
diff
changeset
|
147 GaimConversation *c = gaim_find_conversation_with_account(who, gc->account); |
441 | 148 |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
149 struct warning *w = g_new0(struct warning, 1); |
7879 | 150 w->who = g_strdup(who); |
1288
d8eaf65ca9c3
[gaim-migrate @ 1298]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1272
diff
changeset
|
151 w->gc = gc; |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
152 |
3757 | 153 gtk_misc_set_alignment(GTK_MISC(img), 0, 0); |
154 | |
6112 | 155 w->window = gtk_dialog_new_with_buttons(_("Warn User"), |
156 GTK_WINDOW(GAIM_GTK_WINDOW(c->window)->window), 0, | |
157 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, | |
8300
0f5cb0d93b11
[gaim-migrate @ 9024]
Christian Hammond <chipx86@chipx86.com>
parents:
8293
diff
changeset
|
158 GAIM_STOCK_WARN, GTK_RESPONSE_OK, NULL); |
4118 | 159 gtk_dialog_set_default_response (GTK_DIALOG(w->window), GTK_RESPONSE_OK); |
3757 | 160 g_signal_connect(G_OBJECT(w->window), "response", G_CALLBACK(do_warn), w); |
161 | |
162 gtk_container_set_border_width (GTK_CONTAINER(w->window), 6); | |
163 gtk_window_set_resizable(GTK_WINDOW(w->window), FALSE); | |
164 gtk_dialog_set_has_separator(GTK_DIALOG(w->window), FALSE); | |
165 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(w->window)->vbox), 12); | |
166 gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(w->window)->vbox), 6); | |
167 | |
168 hbox = gtk_hbox_new(FALSE, 12); | |
169 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(w->window)->vbox), hbox); | |
170 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
171 |
3757 | 172 vbox = gtk_vbox_new(FALSE, 0); |
173 gtk_container_add(GTK_CONTAINER(hbox), vbox); | |
174 labeltext = g_strdup_printf(_("<span weight=\"bold\" size=\"larger\">Warn %s?</span>\n\n" | |
175 "This will increase %s's warning level and he or she will be subject to harsher rate limiting.\n"), who, who); | |
176 label = gtk_label_new(NULL); | |
177 gtk_label_set_markup(GTK_LABEL(label), labeltext); | |
178 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | |
179 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
180 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | |
181 g_free(labeltext); | |
182 | |
183 w->anon = gtk_check_button_new_with_mnemonic(_("Warn _anonymously?")); | |
184 gtk_box_pack_start(GTK_BOX(vbox), w->anon, FALSE, FALSE, 0); | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
185 |
3757 | 186 hbox = gtk_hbox_new(FALSE, 6); |
187 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
188 img = gtk_image_new_from_stock(GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_MENU); | |
189 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); | |
190 labeltext = _("<b>Anonymous warnings are less severe.</b>"); | |
191 label = gtk_label_new(NULL); | |
192 gtk_label_set_markup(GTK_LABEL(label), labeltext); | |
193 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | |
194 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
195 | |
1288
d8eaf65ca9c3
[gaim-migrate @ 1298]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1272
diff
changeset
|
196 dialogwindows = g_list_prepend(dialogwindows, w->window); |
3757 | 197 gtk_widget_show_all(w->window); |
1 | 198 } |
199 | |
6334
930708df05dd
[gaim-migrate @ 6833]
Christian Hammond <chipx86@chipx86.com>
parents:
6331
diff
changeset
|
200 static void |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
201 do_remove_chat(GaimChat *chat) |
5234 | 202 { |
203 gaim_blist_remove_chat(chat); | |
204 gaim_blist_save(); | |
205 } | |
206 | |
6334
930708df05dd
[gaim-migrate @ 6833]
Christian Hammond <chipx86@chipx86.com>
parents:
6331
diff
changeset
|
207 static void |
6695 | 208 do_remove_buddy(GaimBuddy *b) |
2743 | 209 { |
6695 | 210 GaimGroup *g; |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5593
diff
changeset
|
211 GaimConversation *c; |
4918
553d96cb9b26
[gaim-migrate @ 5252]
Christian Hammond <chipx86@chipx86.com>
parents:
4916
diff
changeset
|
212 gchar *name; |
6640
314111e7b601
[gaim-migrate @ 7165]
Christian Hammond <chipx86@chipx86.com>
parents:
6623
diff
changeset
|
213 GaimAccount *account; |
2743 | 214 |
215 if (!b) | |
216 return; | |
217 | |
4687 | 218 g = gaim_find_buddys_group(b); |
6640
314111e7b601
[gaim-migrate @ 7165]
Christian Hammond <chipx86@chipx86.com>
parents:
6623
diff
changeset
|
219 name = g_strdup(b->name); /* b->name is a crasher after remove_buddy */ |
314111e7b601
[gaim-migrate @ 7165]
Christian Hammond <chipx86@chipx86.com>
parents:
6623
diff
changeset
|
220 account = b->account; |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
221 |
5213
1cf4eb75e3ee
[gaim-migrate @ 5583]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
222 gaim_debug(GAIM_DEBUG_INFO, "blist", |
1cf4eb75e3ee
[gaim-migrate @ 5583]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
223 "Removing '%s' from buddy list.\n", b->name); |
4491 | 224 serv_remove_buddy(b->account->gc, name, g->name); |
4687 | 225 gaim_blist_remove_buddy(b); |
4349 | 226 gaim_blist_save(); |
2743 | 227 |
6640
314111e7b601
[gaim-migrate @ 7165]
Christian Hammond <chipx86@chipx86.com>
parents:
6623
diff
changeset
|
228 c = gaim_find_conversation_with_account(name, account); |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
229 |
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
230 if (c != NULL) |
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
231 gaim_conversation_update(c, GAIM_CONV_UPDATE_REMOVE); |
4397
ce3a0eba91ef
[gaim-migrate @ 4666]
Christian Hammond <chipx86@chipx86.com>
parents:
4372
diff
changeset
|
232 |
ce3a0eba91ef
[gaim-migrate @ 4666]
Christian Hammond <chipx86@chipx86.com>
parents:
4372
diff
changeset
|
233 g_free(name); |
2743 | 234 } |
235 | |
6742 | 236 static void do_remove_contact(GaimContact *c) |
237 { | |
238 GaimBlistNode *bnode, *cnode; | |
239 GaimGroup *g; | |
240 | |
241 if(!c) | |
242 return; | |
243 | |
244 cnode = (GaimBlistNode *)c; | |
245 g = (GaimGroup*)cnode->parent; | |
246 for(bnode = cnode->child; bnode; bnode = bnode->next) { | |
247 GaimBuddy *b = (GaimBuddy*)bnode; | |
248 if(b->account->gc) | |
249 serv_remove_buddy(b->account->gc, b->name, g->name); | |
250 } | |
251 gaim_blist_remove_contact(c); | |
252 } | |
253 | |
6695 | 254 void do_remove_group(GaimGroup *g) |
4916 | 255 { |
6695 | 256 GaimBlistNode *cnode, *bnode; |
6885
66dd420d3d23
[gaim-migrate @ 7431]
Christian Hammond <chipx86@chipx86.com>
parents:
6878
diff
changeset
|
257 |
6695 | 258 cnode = ((GaimBlistNode*)g)->child; |
6885
66dd420d3d23
[gaim-migrate @ 7431]
Christian Hammond <chipx86@chipx86.com>
parents:
6878
diff
changeset
|
259 |
6695 | 260 while(cnode) { |
261 if(GAIM_BLIST_NODE_IS_CONTACT(cnode)) { | |
262 bnode = cnode->child; | |
263 cnode = cnode->next; | |
264 while(bnode) { | |
265 GaimBuddy *b; | |
266 if(GAIM_BLIST_NODE_IS_BUDDY(bnode)) { | |
6745
57a24492434b
[gaim-migrate @ 7277]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6742
diff
changeset
|
267 GaimConversation *c; |
57a24492434b
[gaim-migrate @ 7277]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6742
diff
changeset
|
268 b = (GaimBuddy*)bnode; |
6695 | 269 bnode = bnode->next; |
6745
57a24492434b
[gaim-migrate @ 7277]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6742
diff
changeset
|
270 c = gaim_find_conversation_with_account(b->name, b->account); |
6695 | 271 if(gaim_account_is_connected(b->account)) { |
272 serv_remove_buddy(b->account->gc, b->name, g->name); | |
273 gaim_blist_remove_buddy(b); | |
274 if(c) | |
275 gaim_conversation_update(c, | |
276 GAIM_CONV_UPDATE_REMOVE); | |
277 } | |
278 } else { | |
279 bnode = bnode->next; | |
280 } | |
5234 | 281 } |
6695 | 282 } else if(GAIM_BLIST_NODE_IS_CHAT(cnode)) { |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
283 GaimChat *chat = (GaimChat *)cnode; |
6695 | 284 cnode = cnode->next; |
285 if(gaim_account_is_connected(chat->account)) | |
6088 | 286 gaim_blist_remove_chat(chat); |
6695 | 287 } else { |
288 cnode = cnode->next; | |
4938 | 289 } |
4916 | 290 } |
6885
66dd420d3d23
[gaim-migrate @ 7431]
Christian Hammond <chipx86@chipx86.com>
parents:
6878
diff
changeset
|
291 |
4916 | 292 gaim_blist_remove_group(g); |
293 gaim_blist_save(); | |
294 } | |
295 | |
6695 | 296 void show_confirm_del(GaimBuddy *b) |
2743 | 297 { |
3753 | 298 char *text; |
5975 | 299 if (!b) |
3753 | 300 return; |
301 | |
5975 | 302 text = g_strdup_printf(_("You are about to remove %s from your buddy list. Do you want to continue?"), b->name); |
303 | |
304 gaim_request_action(NULL, NULL, _("Remove Buddy"), text, -1, b, 2, | |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
305 _("Remove Buddy"), G_CALLBACK(do_remove_buddy), |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
306 _("Cancel"), NULL); |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
307 |
3753 | 308 g_free(text); |
2743 | 309 } |
310 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
311 void show_confirm_del_blist_chat(GaimChat *chat) |
5234 | 312 { |
7125 | 313 char *name = gaim_chat_get_display_name(chat); |
6034 | 314 char *text = g_strdup_printf(_("You are about to remove the chat %s from your buddy list. Do you want to continue?"), name); |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
315 |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
316 gaim_request_action(NULL, NULL, _("Remove Chat"), text, -1, chat, 2, |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
317 _("Remove Chat"), G_CALLBACK(do_remove_chat), |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
318 _("Cancel"), NULL); |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
319 |
6034 | 320 g_free(name); |
5234 | 321 g_free(text); |
322 } | |
323 | |
6695 | 324 void show_confirm_del_group(GaimGroup *g) |
4916 | 325 { |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
326 char *text = g_strdup_printf(_("You are about to remove the group %s and all its members from your buddy list. Do you want to continue?"), |
4916 | 327 g->name); |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
328 |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
329 gaim_request_action(NULL, NULL, _("Remove Group"), text, -1, g, 2, |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
330 _("Remove Group"), G_CALLBACK(do_remove_group), |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
331 _("Cancel"), NULL); |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5436
diff
changeset
|
332 |
4916 | 333 g_free(text); |
334 } | |
1 | 335 |
6742 | 336 void show_confirm_del_contact(GaimContact *c) |
337 { | |
338 GaimBuddy *b = gaim_contact_get_priority_buddy(c); | |
339 | |
340 if(!b) | |
341 return; | |
342 | |
343 if(((GaimBlistNode*)c)->child == (GaimBlistNode*)b && | |
344 !((GaimBlistNode*)b)->next) { | |
345 show_confirm_del(b); | |
346 } else { | |
347 char *text = g_strdup_printf(_("You are about to remove the contact containing %s and %d other buddies from your buddy list. Do you want to continue?"), | |
348 b->name, c->totalsize - 1); | |
349 | |
350 gaim_request_action(NULL, NULL, _("Remove Contact"), text, -1, c, 2, | |
351 _("Remove Contact"), G_CALLBACK(do_remove_contact), | |
352 _("Cancel"), NULL); | |
353 | |
354 g_free(text); | |
355 } | |
356 } | |
357 | |
7757 | 358 static gboolean show_ee_dialog(const char *ee) |
1 | 359 { |
3767 | 360 GtkWidget *window; |
361 GtkWidget *hbox; | |
1 | 362 GtkWidget *label; |
7098
770233dad86c
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7085
diff
changeset
|
363 GaimGtkBuddyList *gtkblist; |
5024 | 364 GtkWidget *img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_COOL, GTK_ICON_SIZE_DIALOG); |
7757 | 365 gchar *norm = gaim_strreplace(ee, "rocksmyworld", ""); |
4695
4bdd9a5fd026
[gaim-migrate @ 5006]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
366 |
4bdd9a5fd026
[gaim-migrate @ 5006]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
367 gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); |
4bdd9a5fd026
[gaim-migrate @ 5006]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
368 |
3767 | 369 label = gtk_label_new(NULL); |
7757 | 370 if (!strcmp(norm, "zilding")) |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
371 gtk_label_set_markup(GTK_LABEL(label), |
3767 | 372 "<span weight=\"bold\" size=\"large\" foreground=\"purple\">Amazing! Simply Amazing!</span>"); |
7757 | 373 else if (!strcmp(norm, "robflynn")) |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
374 gtk_label_set_markup(GTK_LABEL(label), |
3767 | 375 "<span weight=\"bold\" size=\"large\" foreground=\"#1f6bad\">Pimpin\' Penguin Style! *Waddle Waddle*</span>"); |
7757 | 376 else if (!strcmp(norm, "flynorange")) |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
377 gtk_label_set_markup(GTK_LABEL(label), |
3767 | 378 "<span weight=\"bold\" size=\"large\" foreground=\"blue\">You should be me. I'm so cute!</span>"); |
7757 | 379 else if (!strcmp(norm, "ewarmenhoven")) |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
380 gtk_label_set_markup(GTK_LABEL(label), |
3767 | 381 "<span weight=\"bold\" size=\"large\" foreground=\"orange\">Now that's what I like!</span>"); |
7757 | 382 else if (!strcmp(norm, "markster97")) |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
383 gtk_label_set_markup(GTK_LABEL(label), |
3767 | 384 "<span weight=\"bold\" size=\"large\" foreground=\"brown\">Ahh, and excellent choice!</span>"); |
7757 | 385 else if (!strcmp(norm, "seanegn")) |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
386 gtk_label_set_markup(GTK_LABEL(label), |
3767 | 387 "<span weight=\"bold\" size=\"large\" foreground=\"#009900\">Everytime you click my name, an angel gets its wings.</span>"); |
7757 | 388 else if (!strcmp(norm, "chipx86")) |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
389 gtk_label_set_markup(GTK_LABEL(label), |
3767 | 390 "<span weight=\"bold\" size=\"large\" foreground=\"red\">This sunflower seed taste like pizza.</span>"); |
7757 | 391 else if (!strcmp(norm, "markdoliner")) |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
392 gtk_label_set_markup(GTK_LABEL(label), |
3767 | 393 "<span weight=\"bold\" size=\"large\" foreground=\"#6364B1\">Hey! I was in that tumbleweed!</span>"); |
7757 | 394 else if (!strcmp(norm, "lschiere")) |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
395 gtk_label_set_markup(GTK_LABEL(label), |
3767 | 396 "<span weight=\"bold\" size=\"large\" foreground=\"gray\">I'm not anything.</span>"); |
7757 | 397 g_free(norm); |
398 | |
399 if (strlen(gtk_label_get_label(GTK_LABEL(label))) <= 0) | |
400 return FALSE; | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
401 |
7678 | 402 window = gtk_dialog_new_with_buttons(GAIM_ALERT_TITLE, GTK_WINDOW(gtkblist->window), 0, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); |
3767 | 403 gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_OK); |
404 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(gtk_widget_destroy), NULL); | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
405 |
3767 | 406 gtk_container_set_border_width (GTK_CONTAINER(window), 6); |
407 gtk_window_set_resizable(GTK_WINDOW(window), FALSE); | |
408 gtk_dialog_set_has_separator(GTK_DIALOG(window), FALSE); | |
409 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(window)->vbox), 12); | |
410 gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(window)->vbox), 6); | |
411 | |
412 hbox = gtk_hbox_new(FALSE, 12); | |
413 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(window)->vbox), hbox); | |
414 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
415 |
3767 | 416 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
417 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
418 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
4635 | 419 |
3767 | 420 gtk_widget_show_all(window); |
7757 | 421 return TRUE; |
422 } | |
423 | |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
424 static void |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
425 new_im_cb(gpointer data, GaimRequestFields *fields) |
1 | 426 { |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
427 const char *username; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
428 GaimAccount *account; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
429 GaimConversation *conv; |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
430 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
431 username = gaim_request_fields_get_string(fields, "screenname"); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
432 account = gaim_request_fields_get_account(fields, "account"); |
4695
4bdd9a5fd026
[gaim-migrate @ 5006]
Christian Hammond <chipx86@chipx86.com>
parents:
4687
diff
changeset
|
433 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
434 conv = gaim_find_conversation_with_account(username, account); |
4613 | 435 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
436 if (conv == NULL) |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
437 conv = gaim_conversation_new(GAIM_CONV_IM, account, username); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
438 else |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
439 gaim_conv_window_raise(gaim_conversation_get_window(conv)); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
440 } |
7755 | 441 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
442 void |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
443 show_im_dialog(void) |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
444 { |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
445 GaimRequestFields *fields; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
446 GaimRequestFieldGroup *group; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
447 GaimRequestField *field; |
4613 | 448 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
449 fields = gaim_request_fields_new(); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
450 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
451 group = gaim_request_field_group_new(NULL); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
452 gaim_request_fields_add_group(fields, group); |
4613 | 453 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
454 field = gaim_request_field_string_new("screenname", _("_Screen name"), |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
455 NULL, FALSE); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
456 gaim_request_field_set_required(field, TRUE); |
8293
a1b7c7f3d9a7
[gaim-migrate @ 9017]
Christian Hammond <chipx86@chipx86.com>
parents:
8290
diff
changeset
|
457 gaim_request_field_set_type_hint(field, "screenname"); |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
458 gaim_request_field_group_add_field(group, field); |
7755 | 459 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
460 field = gaim_request_field_account_new("account", _("_Account"), NULL); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
461 gaim_request_field_set_visible(field, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
462 (gaim_connections_get_all() != NULL && |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
463 gaim_connections_get_all()->next != NULL)); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
464 gaim_request_field_set_required(field, TRUE); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
465 gaim_request_field_group_add_field(group, field); |
4613 | 466 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
467 gaim_request_fields(gaim_get_blist(), _("New Instant Message"), |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
468 NULL, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
469 _("Please enter the screen name of the person you " |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
470 "would like to IM."), |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
471 fields, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
472 _("OK"), G_CALLBACK(new_im_cb), |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
473 _("Cancel"), NULL, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8152
diff
changeset
|
474 NULL); |
3197 | 475 } |
476 | |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
477 static void |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
478 get_info_cb(gpointer data, GaimRequestFields *fields) |
935
5e6ca3dd4d02
[gaim-migrate @ 945]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
934
diff
changeset
|
479 { |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
480 char *username; |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
481 gboolean found = FALSE; |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
482 GaimAccount *account; |
3197 | 483 |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
484 account = gaim_request_fields_get_account(fields, "account"); |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
485 |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
486 username = g_strdup(gaim_normalize(account, |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
487 gaim_request_fields_get_string(fields, "screenname"))); |
5880
1b85ff65be57
[gaim-migrate @ 6312]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
488 |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
489 if (username != NULL && gaim_str_has_suffix(username, "rocksmyworld")) |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
490 found = show_ee_dialog(username); |
1 | 491 |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
492 if (!found && username != NULL && *username != '\0' && account != NULL) |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
493 serv_get_info(gaim_account_get_connection(account), username); |
1 | 494 |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
495 g_free(username); |
1 | 496 } |
497 | |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
498 void |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
499 show_info_dialog(void) |
1 | 500 { |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
501 GaimRequestFields *fields; |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
502 GaimRequestFieldGroup *group; |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
503 GaimRequestField *field; |
7927 | 504 |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
505 fields = gaim_request_fields_new(); |
1 | 506 |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
507 group = gaim_request_field_group_new(NULL); |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
508 gaim_request_fields_add_group(fields, group); |
4262 | 509 |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
510 field = gaim_request_field_string_new("screenname", _("_Screen name"), |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
511 NULL, FALSE); |
8293
a1b7c7f3d9a7
[gaim-migrate @ 9017]
Christian Hammond <chipx86@chipx86.com>
parents:
8290
diff
changeset
|
512 gaim_request_field_set_type_hint(field, "screenname"); |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
513 gaim_request_field_set_required(field, TRUE); |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
514 gaim_request_field_group_add_field(group, field); |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
515 |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
516 field = gaim_request_field_account_new("account", _("_Account"), NULL); |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
517 gaim_request_field_set_visible(field, |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
518 (gaim_connections_get_all() != NULL && |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
519 gaim_connections_get_all()->next != NULL)); |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
520 gaim_request_field_set_required(field, TRUE); |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
521 gaim_request_field_group_add_field(group, field); |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6431
diff
changeset
|
522 |
8290
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
523 gaim_request_fields(gaim_get_blist(), _("Get User Info"), |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
524 NULL, |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
525 _("Please enter the screen name of the person whose " |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
526 "info you would like to view."), |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
527 fields, |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
528 _("OK"), G_CALLBACK(get_info_cb), |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
529 _("Cancel"), NULL, |
84ec38c3efcc
[gaim-migrate @ 9014]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
530 NULL); |
1 | 531 } |
532 | |
533 /*------------------------------------------------------*/ | |
534 /* Color Selection Dialog */ | |
535 /*------------------------------------------------------*/ | |
536 | |
3367 | 537 GtkWidget *fgcseld = NULL; |
538 GtkWidget *bgcseld = NULL; | |
657
4bbc103a3294
[gaim-migrate @ 667]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
654
diff
changeset
|
539 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5593
diff
changeset
|
540 void show_fgcolor_dialog(GaimConversation *c, GtkWidget *color) |
1 | 541 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5593
diff
changeset
|
542 GaimGtkConversation *gtkconv; |
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
543 GdkColor fgcolor; |
1 | 544 |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
545 gtkconv = GAIM_GTK_CONVERSATION(c); |
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
546 |
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
547 gdk_color_parse(gaim_prefs_get_string("/gaim/gtk/conversations/fgcolor"), |
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
548 &fgcolor); |
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
549 |
8317 | 550 if (fgcseld) |
657
4bbc103a3294
[gaim-migrate @ 667]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
654
diff
changeset
|
551 return; |
8317 | 552 |
553 fgcseld = gtk_color_selection_dialog_new(_("Select Text Color")); | |
554 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION | |
555 (GTK_COLOR_SELECTION_DIALOG(fgcseld)->colorsel), &fgcolor); | |
556 g_signal_connect(G_OBJECT(fgcseld), "delete_event", | |
557 G_CALLBACK(destroy_colorsel), (void *)1); | |
558 g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(fgcseld)->cancel_button), | |
559 "clicked", G_CALLBACK(destroy_colorsel), (void *)1); | |
560 g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(fgcseld)->ok_button), "clicked", | |
561 G_CALLBACK(apply_color_dlg), (void *)1); | |
562 gtk_widget_realize(fgcseld); | |
563 gtk_widget_show(fgcseld); | |
564 gdk_window_raise(fgcseld->window); | |
565 return; | |
858
3de6e98e8898
[gaim-migrate @ 868]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
854
diff
changeset
|
566 } |
3de6e98e8898
[gaim-migrate @ 868]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
854
diff
changeset
|
567 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5593
diff
changeset
|
568 void show_bgcolor_dialog(GaimConversation *c, GtkWidget *color) |
858
3de6e98e8898
[gaim-migrate @ 868]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
854
diff
changeset
|
569 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5593
diff
changeset
|
570 GaimGtkConversation *gtkconv; |
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
571 GdkColor bgcolor; |
858
3de6e98e8898
[gaim-migrate @ 868]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
854
diff
changeset
|
572 |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
573 gtkconv = GAIM_GTK_CONVERSATION(c); |
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
574 |
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
575 gdk_color_parse(gaim_prefs_get_string("/gaim/gtk/conversations/bgcolor"), |
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
576 &bgcolor); |
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
577 |
8317 | 578 if (bgcseld) |
657
4bbc103a3294
[gaim-migrate @ 667]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
654
diff
changeset
|
579 return; |
8317 | 580 |
581 bgcseld = gtk_color_selection_dialog_new(_("Select Background Color")); | |
582 gtk_color_selection_set_current_color(GTK_COLOR_SELECTION | |
583 (GTK_COLOR_SELECTION_DIALOG(bgcseld)->colorsel), &bgcolor); | |
584 g_signal_connect(G_OBJECT(bgcseld), "delete_event", | |
585 G_CALLBACK(destroy_colorsel), NULL); | |
586 g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(bgcseld)->cancel_button), | |
587 "clicked", G_CALLBACK(destroy_colorsel), NULL); | |
588 g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(bgcseld)->ok_button), "clicked", | |
589 G_CALLBACK(apply_color_dlg), (void *)2); | |
590 gtk_widget_realize(bgcseld); | |
591 gtk_widget_show(bgcseld); | |
592 gdk_window_raise(bgcseld->window); | |
593 return; | |
1 | 594 } |
595 | |
8317 | 596 |
597 /*------------------------ ----------------------------------------------*/ | |
230
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
229
diff
changeset
|
598 /* Font Selection Dialog */ |
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
229
diff
changeset
|
599 /*------------------------------------------------------------------------*/ |
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
229
diff
changeset
|
600 |
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
229
diff
changeset
|
601 |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
602 void destroy_fontsel(GtkWidget *w, gpointer d) |
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
603 { |
334
0fa651368776
[gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
311
diff
changeset
|
604 gtk_widget_destroy(fontseld); |
0fa651368776
[gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
311
diff
changeset
|
605 fontseld = NULL; |
0fa651368776
[gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
311
diff
changeset
|
606 } |
0fa651368776
[gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
311
diff
changeset
|
607 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5593
diff
changeset
|
608 void show_font_dialog(GaimConversation *c, GtkWidget *font) |
230
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
229
diff
changeset
|
609 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5593
diff
changeset
|
610 GaimGtkConversation *gtkconv; |
3473 | 611 char fonttif[128]; |
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
612 const char *fontface; |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
613 |
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
614 gtkconv = GAIM_GTK_CONVERSATION(c); |
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
615 |
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
616 |
8317 | 617 if (fontseld) |
334
0fa651368776
[gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
311
diff
changeset
|
618 return; |
8317 | 619 |
620 fontseld = gtk_font_selection_dialog_new(_("Select Font")); | |
621 | |
622 fontface = gaim_prefs_get_string("/gaim/gtk/conversations/font_face"); | |
623 | |
624 if (fontface != NULL && *fontface != '\0') { | |
625 g_snprintf(fonttif, sizeof(fonttif), "%s 12", fontface); | |
626 gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), | |
627 fonttif); | |
628 } else { | |
629 gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), | |
630 DEFAULT_FONT_FACE " 12"); | |
334
0fa651368776
[gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
311
diff
changeset
|
631 } |
8317 | 632 |
633 g_signal_connect(G_OBJECT(fontseld), "delete_event", | |
634 G_CALLBACK(destroy_fontsel), NULL); | |
635 g_signal_connect(G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->cancel_button), | |
636 "clicked", G_CALLBACK(destroy_fontsel), NULL); | |
637 g_signal_connect(G_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->ok_button), "clicked", | |
638 G_CALLBACK(apply_font_dlg), fontseld); | |
639 gtk_widget_realize(fontseld); | |
640 gtk_widget_show(fontseld); | |
641 gdk_window_raise(fontseld->window); | |
642 return; | |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4350
diff
changeset
|
643 |
230
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
229
diff
changeset
|
644 } |
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
229
diff
changeset
|
645 |
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
229
diff
changeset
|
646 /*------------------------------------------------------------------------*/ |
1 | 647 /* The dialog for new away messages */ |
648 /*------------------------------------------------------------------------*/ | |
649 | |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
650 static struct away_message *save_away_message(struct create_away *ca) |
717 | 651 { |
652 struct away_message *am; | |
653 gchar *away_message; | |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
654 |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
825
diff
changeset
|
655 if (!ca->mess) |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
825
diff
changeset
|
656 am = g_new0(struct away_message, 1); |
2851
6eb5bf5089f0
[gaim-migrate @ 2864]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2827
diff
changeset
|
657 else { |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
825
diff
changeset
|
658 am = ca->mess; |
2851
6eb5bf5089f0
[gaim-migrate @ 2864]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2827
diff
changeset
|
659 } |
1387 | 660 |
717 | 661 g_snprintf(am->name, sizeof(am->name), "%s", gtk_entry_get_text(GTK_ENTRY(ca->entry))); |
8317 | 662 away_message = gtk_imhtml_get_markup(GTK_IMHTML(ca->text)); |
717 | 663 |
664 g_snprintf(am->message, sizeof(am->message), "%s", away_message); | |
665 g_free(away_message); | |
666 | |
7942 | 667 if (!ca->mess) |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
668 away_messages = g_slist_insert_sorted(away_messages, am, sort_awaymsg_list); |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
825
diff
changeset
|
669 |
5560
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5551
diff
changeset
|
670 do_away_menu(NULL); |
6065 | 671 gaim_status_sync(); |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
672 |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
673 return am; |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
674 } |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
675 |
1387 | 676 int check_away_mess(struct create_away *ca, int type) |
677 { | |
4630 | 678 char *msg; |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
679 if ((strlen(gtk_entry_get_text(GTK_ENTRY(ca->entry))) == 0) && (type == 1)) { |
1387 | 680 /* We shouldn't allow a blank title */ |
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5411
diff
changeset
|
681 gaim_notify_error(NULL, NULL, |
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5411
diff
changeset
|
682 _("You cannot save an away message with a " |
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5411
diff
changeset
|
683 "blank title"), |
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5411
diff
changeset
|
684 _("Please give the message a title, or choose " |
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5411
diff
changeset
|
685 "\"Use\" to use without saving.")); |
1387 | 686 return 0; |
687 } | |
688 | |
8317 | 689 msg = gtk_imhtml_get_markup(GTK_IMHTML(ca->text)); |
4630 | 690 |
691 if (!msg && (type <= 1)) { | |
1387 | 692 /* We shouldn't allow a blank message */ |
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5411
diff
changeset
|
693 gaim_notify_error(NULL, NULL, |
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5411
diff
changeset
|
694 _("You cannot create an empty away message"), NULL); |
1387 | 695 return 0; |
696 } | |
697 | |
4630 | 698 g_free(msg); |
699 | |
1387 | 700 return 1; |
701 } | |
702 | |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
703 void save_away_mess(GtkWidget *widget, struct create_away *ca) |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
704 { |
1387 | 705 if (!check_away_mess(ca, 1)) |
706 return; | |
707 | |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
708 save_away_message(ca); |
717 | 709 destroy_dialog(NULL, ca->window); |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
710 g_free(ca); |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
711 } |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
712 |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
713 void use_away_mess(GtkWidget *widget, struct create_away *ca) |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
714 { |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
715 static struct away_message am; |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
716 gchar *away_message; |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
717 |
1387 | 718 if (!check_away_mess(ca, 0)) |
719 return; | |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
720 |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
721 g_snprintf(am.name, sizeof(am.name), "%s", gtk_entry_get_text(GTK_ENTRY(ca->entry))); |
8317 | 722 away_message = gtk_imhtml_get_markup(GTK_IMHTML(ca->text)); |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
723 |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
724 g_snprintf(am.message, sizeof(am.message), "%s", away_message); |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
725 g_free(away_message); |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
726 |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
727 do_away_message(NULL, &am); |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
728 |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
729 destroy_dialog(NULL, ca->window); |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
730 g_free(ca); |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
731 } |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
732 |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
733 void su_away_mess(GtkWidget *widget, struct create_away *ca) |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
734 { |
1387 | 735 if (!check_away_mess(ca, 1)) |
736 return; | |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
737 do_away_message(NULL, save_away_message(ca)); |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
738 destroy_dialog(NULL, ca->window); |
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
739 g_free(ca); |
717 | 740 } |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
741 |
1 | 742 void create_away_mess(GtkWidget *widget, void *dummy) |
743 { | |
7949 | 744 GtkWidget *vbox, *hbox; |
1 | 745 GtkWidget *label; |
7949 | 746 GtkWidget *sw; |
441 | 747 GtkWidget *button; |
1 | 748 |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
749 struct create_away *ca = g_new0(struct create_away, 1); |
1185 | 750 |
1 | 751 /* Set up window */ |
2725
f3c094e78609
[gaim-migrate @ 2738]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2681
diff
changeset
|
752 GAIM_DIALOG(ca->window); |
4635 | 753 gtk_widget_set_size_request(ca->window, -1, 250); |
7949 | 754 gtk_container_set_border_width(GTK_CONTAINER(ca->window), 6); |
4074 | 755 gtk_window_set_role(GTK_WINDOW(ca->window), "away_mess"); |
4703 | 756 gtk_window_set_title(GTK_WINDOW(ca->window), _("New away message")); |
5314
1f901484599d
[gaim-migrate @ 5686]
Christian Hammond <chipx86@chipx86.com>
parents:
5294
diff
changeset
|
757 g_signal_connect(G_OBJECT(ca->window), "delete_event", |
4162
d3c8d2b40494
[gaim-migrate @ 4391]
Christian Hammond <chipx86@chipx86.com>
parents:
4142
diff
changeset
|
758 G_CALLBACK(destroy_dialog), ca->window); |
1185 | 759 |
7949 | 760 /* |
761 * This would be higgy... but I think it's pretty ugly --Mark | |
762 * If you want to use this, make sure you add the vbox to the hbox below | |
763 */ | |
764 /* | |
765 hbox = gtk_hbox_new(FALSE, 12); | |
766 gtk_container_set_border_width(GTK_CONTAINER(hbox), 12); | |
767 gtk_container_add(GTK_CONTAINER(ca->window), hbox); | |
768 */ | |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
769 |
7949 | 770 vbox = gtk_vbox_new(FALSE, 12); |
771 gtk_container_add(GTK_CONTAINER(ca->window), vbox); | |
1185 | 772 |
7949 | 773 /* Away message title */ |
774 hbox = gtk_hbox_new(FALSE, 0); | |
775 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
776 |
350
fd3cc0a28d5d
[gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
777 label = gtk_label_new(_("Away title: ")); |
7949 | 778 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
1185 | 779 |
1 | 780 ca->entry = gtk_entry_new(); |
7949 | 781 gtk_box_pack_start(GTK_BOX(hbox), ca->entry, TRUE, TRUE, 0); |
8137 | 782 gaim_set_accessible_label (ca->entry, label); |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
783 gtk_widget_grab_focus(ca->entry); |
1 | 784 |
8317 | 785 /* Toolbar */ |
786 ca->toolbar = gtk_imhtmltoolbar_new(); | |
787 gtk_box_pack_start(GTK_BOX(vbox), ca->toolbar, FALSE, FALSE, 0); | |
788 | |
7949 | 789 /* Away message text */ |
790 sw = gtk_scrolled_window_new(NULL, NULL); | |
791 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | |
792 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
793 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | |
794 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); | |
5024 | 795 |
8317 | 796 ca->text = gtk_imhtml_new(NULL, NULL); |
8319
a2c5537a814b
[gaim-migrate @ 9043]
Christian Hammond <chipx86@chipx86.com>
parents:
8317
diff
changeset
|
797 gtk_imhtml_set_editable(GTK_IMHTML(ca->text), TRUE); |
5105 | 798 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(ca->text), GTK_WRAP_WORD_CHAR); |
5024 | 799 |
7538
357eb1c39b72
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
800 if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) |
357eb1c39b72
[gaim-migrate @ 8151]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
801 gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(ca->text)); |
8317 | 802 gtk_imhtmltoolbar_attach(GTK_IMHTMLTOOLBAR(ca->toolbar), ca->text); |
7002 | 803 |
7949 | 804 gtk_container_add(GTK_CONTAINER(sw), ca->text); |
5024 | 805 |
3374 | 806 if (dummy) { |
807 struct away_message *amt; | |
808 GtkTreeIter iter; | |
809 GtkListStore *ls = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(dummy))); | |
810 GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(dummy)); | |
811 GValue val = { 0, }; | |
812 | |
3716
d7e83b4db191
[gaim-migrate @ 3849]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
3671
diff
changeset
|
813 if (! gtk_tree_selection_get_selected (sel, (GtkTreeModel**)&ls, &iter)) |
3374 | 814 return; |
3716
d7e83b4db191
[gaim-migrate @ 3849]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
3671
diff
changeset
|
815 gtk_tree_model_get_value (GTK_TREE_MODEL(ls), &iter, 1, &val); |
3374 | 816 amt = g_value_get_pointer (&val); |
817 gtk_entry_set_text(GTK_ENTRY(ca->entry), amt->name); | |
8317 | 818 gtk_imhtml_append_text_with_images(GTK_IMHTML(ca->text), amt->message, 0, NULL); |
3374 | 819 ca->mess = amt; |
820 } | |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
825
diff
changeset
|
821 |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
822 hbox = gtk_hbox_new(FALSE, 5); |
7949 | 823 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
5024 | 824 |
825 button = gaim_pixbuf_button_from_stock(_("Save"), GTK_STOCK_SAVE, GAIM_BUTTON_HORIZONTAL); | |
5314
1f901484599d
[gaim-migrate @ 5686]
Christian Hammond <chipx86@chipx86.com>
parents:
5294
diff
changeset
|
826 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(save_away_mess), ca); |
4092 | 827 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
828 | |
5024 | 829 button = gaim_pixbuf_button_from_stock(_("Save & Use"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL); |
5314
1f901484599d
[gaim-migrate @ 5686]
Christian Hammond <chipx86@chipx86.com>
parents:
5294
diff
changeset
|
830 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(su_away_mess), ca); |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
831 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
832 |
5024 | 833 button = gaim_pixbuf_button_from_stock(_("Use"), GTK_STOCK_EXECUTE, GAIM_BUTTON_HORIZONTAL); |
5314
1f901484599d
[gaim-migrate @ 5686]
Christian Hammond <chipx86@chipx86.com>
parents:
5294
diff
changeset
|
834 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(use_away_mess), ca); |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
835 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
836 |
5024 | 837 button = gaim_pixbuf_button_from_stock(_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL); |
5314
1f901484599d
[gaim-migrate @ 5686]
Christian Hammond <chipx86@chipx86.com>
parents:
5294
diff
changeset
|
838 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(destroy_dialog), ca->window); |
1213
1bdb08cc5d59
[gaim-migrate @ 1223]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1210
diff
changeset
|
839 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2370
diff
changeset
|
840 |
5024 | 841 gtk_widget_show_all(ca->window); |
1 | 842 } |
555 | 843 |
6329
418cc72136d1
[gaim-migrate @ 6828]
Christian Hammond <chipx86@chipx86.com>
parents:
6328
diff
changeset
|
844 static void |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
845 alias_chat_cb(GaimChat *chat, const char *new_alias) |
5234 | 846 { |
6329
418cc72136d1
[gaim-migrate @ 6828]
Christian Hammond <chipx86@chipx86.com>
parents:
6328
diff
changeset
|
847 gaim_blist_alias_chat(chat, new_alias); |
418cc72136d1
[gaim-migrate @ 6828]
Christian Hammond <chipx86@chipx86.com>
parents:
6328
diff
changeset
|
848 gaim_blist_save(); |
5234 | 849 } |
850 | |
6329
418cc72136d1
[gaim-migrate @ 6828]
Christian Hammond <chipx86@chipx86.com>
parents:
6328
diff
changeset
|
851 void |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
852 alias_dialog_blist_chat(GaimChat *chat) |
6329
418cc72136d1
[gaim-migrate @ 6828]
Christian Hammond <chipx86@chipx86.com>
parents:
6328
diff
changeset
|
853 { |
7843 | 854 gaim_request_input(NULL, _("Alias Chat"), NULL, |
855 _("Enter an alias for this chat."), | |
6329
418cc72136d1
[gaim-migrate @ 6828]
Christian Hammond <chipx86@chipx86.com>
parents:
6328
diff
changeset
|
856 chat->alias, FALSE, FALSE, |
8302
462ead6fc1a0
[gaim-migrate @ 9026]
Christian Hammond <chipx86@chipx86.com>
parents:
8301
diff
changeset
|
857 _("Alias"), G_CALLBACK(alias_chat_cb), |
6329
418cc72136d1
[gaim-migrate @ 6828]
Christian Hammond <chipx86@chipx86.com>
parents:
6328
diff
changeset
|
858 _("Cancel"), NULL, chat); |
5234 | 859 } |
860 | |
6327
493eed80869c
[gaim-migrate @ 6826]
Christian Hammond <chipx86@chipx86.com>
parents:
6322
diff
changeset
|
861 static void |
7245 | 862 alias_contact_cb(GaimContact *contact, const char *new_alias) |
863 { | |
864 gaim_contact_set_alias(contact, new_alias); | |
865 gaim_blist_save(); | |
866 } | |
867 | |
868 void | |
869 alias_dialog_contact(GaimContact *contact) | |
870 { | |
7843 | 871 gaim_request_input(NULL, _("Alias Contact"), NULL, |
872 _("Enter an alias for this contact."), | |
873 contact->alias, FALSE, FALSE, | |
8302
462ead6fc1a0
[gaim-migrate @ 9026]
Christian Hammond <chipx86@chipx86.com>
parents:
8301
diff
changeset
|
874 _("Alias"), G_CALLBACK(alias_contact_cb), |
7843 | 875 _("Cancel"), NULL, contact); |
7245 | 876 } |
877 | |
878 static void | |
7843 | 879 alias_buddy_cb(GaimBuddy *buddy, const char *alias) |
6327
493eed80869c
[gaim-migrate @ 6826]
Christian Hammond <chipx86@chipx86.com>
parents:
6322
diff
changeset
|
880 { |
7843 | 881 gaim_blist_alias_buddy(buddy, (alias != NULL && *alias != '\0') ? alias : NULL); |
6327
493eed80869c
[gaim-migrate @ 6826]
Christian Hammond <chipx86@chipx86.com>
parents:
6322
diff
changeset
|
882 serv_alias_buddy(buddy); |
493eed80869c
[gaim-migrate @ 6826]
Christian Hammond <chipx86@chipx86.com>
parents:
6322
diff
changeset
|
883 gaim_blist_save(); |
493eed80869c
[gaim-migrate @ 6826]
Christian Hammond <chipx86@chipx86.com>
parents:
6322
diff
changeset
|
884 } |
493eed80869c
[gaim-migrate @ 6826]
Christian Hammond <chipx86@chipx86.com>
parents:
6322
diff
changeset
|
885 |
5050
dfec167391a5
[gaim-migrate @ 5398]
Christian Hammond <chipx86@chipx86.com>
parents:
5024
diff
changeset
|
886 void |
6695 | 887 alias_dialog_bud(GaimBuddy *b) |
1397
d2799e0672ee
[gaim-migrate @ 1407]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1396
diff
changeset
|
888 { |
7843 | 889 char *secondary = g_strdup_printf(_("Enter an alias for %s."), b->name); |
6327
493eed80869c
[gaim-migrate @ 6826]
Christian Hammond <chipx86@chipx86.com>
parents:
6322
diff
changeset
|
890 |
7843 | 891 gaim_request_input(NULL, _("Alias Buddy"), NULL, |
892 secondary, b->alias, FALSE, FALSE, | |
8302
462ead6fc1a0
[gaim-migrate @ 9026]
Christian Hammond <chipx86@chipx86.com>
parents:
8301
diff
changeset
|
893 _("Alias"), G_CALLBACK(alias_buddy_cb), |
7843 | 894 _("Cancel"), NULL, b); |
6327
493eed80869c
[gaim-migrate @ 6826]
Christian Hammond <chipx86@chipx86.com>
parents:
6322
diff
changeset
|
895 |
7843 | 896 g_free(secondary); |
1397
d2799e0672ee
[gaim-migrate @ 1407]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1396
diff
changeset
|
897 } |