comparison src/dialogs.c @ 4201:511c2b63caa4

[gaim-migrate @ 4432] Some code cleanups to remove warnings and fix up indenting a little. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 04 Jan 2003 21:01:32 +0000
parents c46c977cfc9e
children a614423c648f
comparison
equal deleted inserted replaced
4200:c8fb43808a4b 4201:511c2b63caa4
57 #include "pixmaps/cancel.xpm" 57 #include "pixmaps/cancel.xpm"
58 #include "pixmaps/save.xpm" 58 #include "pixmaps/save.xpm"
59 #include "pixmaps/ok.xpm" 59 #include "pixmaps/ok.xpm"
60 #include "pixmaps/add.xpm" 60 #include "pixmaps/add.xpm"
61 #include "pixmaps/close.xpm" 61 #include "pixmaps/close.xpm"
62 #include "pixmaps/gnome_add.xpm"
63 #include "pixmaps/gnome_remove.xpm"
64 62
65 #include "pixmaps/protocols/oscar/aol_icon.xpm" 63 #include "pixmaps/protocols/oscar/aol_icon.xpm"
66 #include "pixmaps/protocols/oscar/free_icon.xpm" 64 #include "pixmaps/protocols/oscar/free_icon.xpm"
67 #include "pixmaps/protocols/oscar/dt_icon.xpm" 65 #include "pixmaps/protocols/oscar/dt_icon.xpm"
68 #include "pixmaps/protocols/oscar/admin_icon.xpm" 66 #include "pixmaps/protocols/oscar/admin_icon.xpm"
1052 1050
1053 } 1051 }
1054 1052
1055 void show_add_buddy(struct gaim_connection *gc, char *buddy, char *group, char *alias) 1053 void show_add_buddy(struct gaim_connection *gc, char *buddy, char *group, char *alias)
1056 { 1054 {
1057 GtkWidget *mainbox;
1058 GtkWidget *frame;
1059 GtkWidget *table; 1055 GtkWidget *table;
1060 GtkWidget *bbox;
1061 GtkWidget *cancel;
1062 GtkWidget *add;
1063 GtkWidget *label; 1056 GtkWidget *label;
1064 GtkWidget *hbox; 1057 GtkWidget *hbox;
1065 GtkWidget *vbox; 1058 GtkWidget *vbox;
1066 1059
1067 char *filename = g_build_filename(DATADIR, "pixmaps", "gaim", "dialogs", "gaim_question.png", NULL); 1060 char *filename = g_build_filename(DATADIR, "pixmaps", "gaim", "dialogs", "gaim_question.png", NULL);
1368 return NULL; 1361 return NULL;
1369 } 1362 }
1370 1363
1371 static void pref_deny_rem(GtkWidget *button, gboolean permit) 1364 static void pref_deny_rem(GtkWidget *button, gboolean permit)
1372 { 1365 {
1373 GList *i;
1374 gchar *who; 1366 gchar *who;
1375 GtkTreeIter iter; 1367 GtkTreeIter iter;
1376 GtkTreeModel *mod; 1368 GtkTreeModel *mod;
1377 GtkTreeSelection *sel; 1369 GtkTreeSelection *sel;
1378 1370
1453 void show_privacy_options() { 1445 void show_privacy_options() {
1454 GtkWidget *pwin; 1446 GtkWidget *pwin;
1455 GtkWidget *box; 1447 GtkWidget *box;
1456 GtkWidget *hbox; 1448 GtkWidget *hbox;
1457 GtkWidget *label; 1449 GtkWidget *label;
1458 GtkWidget *vbox;
1459 GtkWidget *sw; 1450 GtkWidget *sw;
1460 GtkWidget *bbox; 1451 GtkWidget *bbox;
1461 GtkWidget *button; 1452 GtkWidget *button;
1462 GtkWidget *sep; 1453 GtkWidget *sep;
1463 GtkWidget *close_button; 1454 GtkWidget *close_button;
1464 GtkSizeGroup *sg1 = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); 1455 GtkSizeGroup *sg1 = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
1465 GtkSizeGroup *sg2 = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); 1456 GtkSizeGroup *sg2 = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
1466 GtkListStore *ls;
1467 GtkWidget *list;
1468 GtkCellRenderer *rend; 1457 GtkCellRenderer *rend;
1469 GtkTreeViewColumn *col; 1458 GtkTreeViewColumn *col;
1470 GtkWidget *table; 1459 GtkWidget *table;
1471 1460
1472 current_deny_gc = connections->data; /* this is safe because this screen will only be 1461 current_deny_gc = connections->data; /* this is safe because this screen will only be
2505 static void do_add_perm(GtkWidget *w, struct addperm *p) 2494 static void do_add_perm(GtkWidget *w, struct addperm *p)
2506 { 2495 {
2507 2496
2508 const char *who; 2497 const char *who;
2509 char *name; 2498 char *name;
2510 GtkTreeIter iter;
2511 GtkListStore *ls;
2512 2499
2513 who = gtk_entry_get_text(GTK_ENTRY(p->entry)); 2500 who = gtk_entry_get_text(GTK_ENTRY(p->entry));
2514 2501
2515 name = g_malloc(strlen(who) + 2); 2502 name = g_malloc(strlen(who) + 2);
2516 g_snprintf(name, strlen(who) + 2, "%s", who); 2503 g_snprintf(name, strlen(who) + 2, "%s", who);
4333 4320
4334 GtkWidget *hbox, *vbox; 4321 GtkWidget *hbox, *vbox;
4335 GtkWidget *label; 4322 GtkWidget *label;
4336 char *filename = g_build_filename(DATADIR, "pixmaps", "gaim", "dialogs", "gaim_question.png", NULL); 4323 char *filename = g_build_filename(DATADIR, "pixmaps", "gaim", "dialogs", "gaim_question.png", NULL);
4337 GtkWidget *img = gtk_image_new_from_file(filename); 4324 GtkWidget *img = gtk_image_new_from_file(filename);
4338 GtkWidget *name_entry; 4325 GtkWidget *name_entry = NULL;
4339 4326
4340 g_free(filename); 4327 g_free(filename);
4341 4328
4342 if (!rename_dialog) { 4329 if (!rename_dialog) {
4343 rename_dialog = gtk_dialog_new_with_buttons(_("Gaim - Rename Group"), GTK_WINDOW(blist), GTK_DIALOG_MODAL, 4330 rename_dialog = gtk_dialog_new_with_buttons(_("Gaim - Rename Group"), GTK_WINDOW(blist), GTK_DIALOG_MODAL,
4380 g_signal_connect(G_OBJECT(rename_dialog), "response", G_CALLBACK(do_rename_group), name_entry); 4367 g_signal_connect(G_OBJECT(rename_dialog), "response", G_CALLBACK(do_rename_group), name_entry);
4381 4368
4382 } 4369 }
4383 4370
4384 gtk_widget_show_all(rename_dialog); 4371 gtk_widget_show_all(rename_dialog);
4385 gtk_widget_grab_focus(GTK_WIDGET(name_entry)); 4372 if(name_entry)
4373 gtk_widget_grab_focus(GTK_WIDGET(name_entry));
4386 } 4374 }
4387 4375
4388 4376
4389 /*------------------------------------------------------------------------*/ 4377 /*------------------------------------------------------------------------*/
4390 /* The dialog for renaming buddies */ 4378 /* The dialog for renaming buddies */