Mercurial > pidgin.yaz
comparison src/gtkpounce.c @ 7276:29c0fe160f90
[gaim-migrate @ 7855]
Fixed a crash in the Add Chat dialog when selecting an account that doesn't
support chats. Closes bug #821606.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 15 Oct 2003 22:50:58 +0000 |
parents | 770233dad86c |
children | d5874c4f19c5 |
comparison
equal
deleted
inserted
replaced
7275:690ff28ae262 | 7276:29c0fe160f90 |
---|---|
276 GaimGtkPounceDialog *dialog) | 276 GaimGtkPounceDialog *dialog) |
277 { | 277 { |
278 dialog->account = account; | 278 dialog->account = account; |
279 } | 279 } |
280 | 280 |
281 #if 0 | |
282 static GtkWidget * | |
283 pounce_user_menu(GaimGtkPounceDialog *dialog) | |
284 { | |
285 GaimAccount *account; | |
286 GaimPlugin *prpl; | |
287 GtkWidget *opt_menu; | |
288 GtkWidget *menu; | |
289 GtkWidget *item; | |
290 GList *l; | |
291 char buf[2048]; | |
292 int count, place = 0; | |
293 | |
294 opt_menu = gtk_option_menu_new(); | |
295 menu = gtk_menu_new(); | |
296 | |
297 for (l = gaim_accounts_get_all(), count = 0; | |
298 l != NULL; | |
299 l = l->next, count++) { | |
300 | |
301 account = (GaimAccount *)l->data; | |
302 | |
303 prpl = gaim_find_prpl(account->protocol); | |
304 | |
305 g_snprintf(buf, sizeof(buf), "%s (%s)", account->username, | |
306 (prpl && prpl->info->name) | |
307 ? prpl->info->name : _("Unknown")); | |
308 | |
309 item = gtk_menu_item_new_with_label(buf); | |
310 g_object_set_data(G_OBJECT(item), "user_data", account); | |
311 | |
312 g_signal_connect(G_OBJECT(item), "activate", | |
313 G_CALLBACK(pounce_choose_cb), dialog); | |
314 | |
315 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); | |
316 gtk_widget_show(item); | |
317 | |
318 if (dialog->account == account) { | |
319 gtk_menu_item_activate(GTK_MENU_ITEM(item)); | |
320 place = count; | |
321 } | |
322 } | |
323 | |
324 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt_menu), menu); | |
325 gtk_option_menu_set_history(GTK_OPTION_MENU(opt_menu), place); | |
326 | |
327 return opt_menu; | |
328 } | |
329 #endif | |
330 | |
331 static void | 281 static void |
332 buddy_changed_cb(GtkEntry *entry, GaimGtkPounceDialog *dialog) | 282 buddy_changed_cb(GtkEntry *entry, GaimGtkPounceDialog *dialog) |
333 { | 283 { |
334 if (dialog->save_button == NULL) | 284 if (dialog->save_button == NULL) |
335 return; | 285 return; |
894 | 844 |
895 memset(&ProcInfo, 0, sizeof(ProcInfo)); | 845 memset(&ProcInfo, 0, sizeof(ProcInfo)); |
896 memset(&StartInfo, 0 , sizeof(StartInfo)); | 846 memset(&StartInfo, 0 , sizeof(StartInfo)); |
897 StartInfo.cb = sizeof(StartInfo); | 847 StartInfo.cb = sizeof(StartInfo); |
898 CreateProcess(NULL, (char *)command, NULL, NULL, 0, 0, NULL, NULL, &StartInfo, &ProcInfo); | 848 CreateProcess(NULL, (char *)command, NULL, NULL, 0, 0, NULL, NULL, &StartInfo, &ProcInfo); |
899 gaim_debug(GAIM_DEBUG_INFO, "pounce", "Pounce execute command called for: %s\n", command); | 849 gaim_debug_info("pounce", |
900 | 850 "Pounce execute command called for: %s\n", |
851 command); | |
901 #endif | 852 #endif |
902 } | 853 } |
903 } | 854 } |
904 | 855 |
905 if (gaim_pounce_action_is_enabled(pounce, "play-sound")) { | 856 if (gaim_pounce_action_is_enabled(pounce, "play-sound")) { |