Mercurial > pidgin
comparison src/gtkprivacy.c @ 8940:b875f5d57b81
[gaim-migrate @ 9710]
Gray out the Join a Chat menu item when no online accounts support chats.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 16 May 2004 00:06:25 +0000 |
parents | 88ec59dec95a |
children | 7a8aa87164ae |
comparison
equal
deleted
inserted
replaced
8939:19885cb8a24c | 8940:b875f5d57b81 |
---|---|
365 | 365 |
366 static GaimGtkPrivacyDialog * | 366 static GaimGtkPrivacyDialog * |
367 privacy_dialog_new(void) | 367 privacy_dialog_new(void) |
368 { | 368 { |
369 GaimGtkPrivacyDialog *dialog; | 369 GaimGtkPrivacyDialog *dialog; |
370 GaimConnection *gc; | |
371 GtkWidget *bbox; | 370 GtkWidget *bbox; |
372 GtkWidget *hbox; | 371 GtkWidget *hbox; |
373 GtkWidget *vbox; | 372 GtkWidget *vbox; |
374 GtkWidget *button; | 373 GtkWidget *button; |
375 GtkWidget *dropdown; | 374 GtkWidget *dropdown; |
379 int selected = 0; | 378 int selected = 0; |
380 int i; | 379 int i; |
381 | 380 |
382 dialog = g_new0(GaimGtkPrivacyDialog, 1); | 381 dialog = g_new0(GaimGtkPrivacyDialog, 1); |
383 | 382 |
384 gc = (GaimConnection *)gaim_connections_get_all()->data; | |
385 dialog->account = gaim_connection_get_account(gc); | |
386 | |
387 dialog->win = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 383 dialog->win = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
388 gtk_window_set_resizable(GTK_WINDOW(dialog->win), FALSE); | 384 gtk_window_set_resizable(GTK_WINDOW(dialog->win), FALSE); |
389 gtk_window_set_role(GTK_WINDOW(dialog->win), "privacy"); | 385 gtk_window_set_role(GTK_WINDOW(dialog->win), "privacy"); |
390 gtk_window_set_title(GTK_WINDOW(dialog->win), _("Privacy")); | 386 gtk_window_set_title(GTK_WINDOW(dialog->win), _("Privacy")); |
391 gtk_container_set_border_width(GTK_CONTAINER(dialog->win), 12); | 387 gtk_container_set_border_width(GTK_CONTAINER(dialog->win), 12); |
417 label = gtk_label_new(_("Set privacy for:")); | 413 label = gtk_label_new(_("Set privacy for:")); |
418 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | 414 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
419 gtk_widget_show(label); | 415 gtk_widget_show(label); |
420 | 416 |
421 /* Accounts drop-down */ | 417 /* Accounts drop-down */ |
422 dropdown = gaim_gtk_account_option_menu_new(dialog->account, FALSE, | 418 dropdown = gaim_gtk_account_option_menu_new(NULL, FALSE, |
423 G_CALLBACK(select_account_cb), | 419 G_CALLBACK(select_account_cb), |
424 check_account_func, dialog); | 420 check_account_func, dialog); |
425 gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); | 421 gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); |
426 gtk_widget_show(dropdown); | 422 gtk_widget_show(dropdown); |
427 gaim_set_accessible_label (dropdown, label); | 423 gaim_set_accessible_label (dropdown, label); |
424 dialog->account = gaim_gtk_account_option_menu_get_selected(dropdown); | |
428 | 425 |
429 /* Add the drop-down list with the allow/block types. */ | 426 /* Add the drop-down list with the allow/block types. */ |
430 dialog->type_menu = gtk_option_menu_new(); | 427 dialog->type_menu = gtk_option_menu_new(); |
431 gtk_box_pack_start(GTK_BOX(vbox), dialog->type_menu, FALSE, FALSE, 0); | 428 gtk_box_pack_start(GTK_BOX(vbox), dialog->type_menu, FALSE, FALSE, 0); |
432 gtk_widget_show(dialog->type_menu); | 429 gtk_widget_show(dialog->type_menu); |