Mercurial > pidgin
changeset 6021:d2d5d1984b09
[gaim-migrate @ 6471]
The "ok" button on the privacy dialog no longer gets grayed out when you sign
off your last account.
The privacy dialog now updates itself for new accounts when you sign online.
You can no longer open multiple privacy dialogs.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 05 Jul 2003 06:06:56 +0000 |
parents | 3b6f48766acb |
children | fb5d2ede88e7 |
files | src/dialogs.c src/gtkconn.c |
diffstat | 2 files changed, 22 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dialogs.c Sat Jul 05 03:09:43 2003 +0000 +++ b/src/dialogs.c Sat Jul 05 06:06:56 2003 +0000 @@ -1413,6 +1413,9 @@ /*------------------------------------------------------------------------* * Privacy Settings * *------------------------------------------------------------------------*/ +static GtkWidget *privacy_win; +static GtkWidget *privacy_sensbox; + static GtkWidget *deny_type = NULL; static GtkWidget *deny_conn_hbox = NULL; static GtkWidget *deny_opt_menu = NULL; @@ -1671,8 +1674,6 @@ gaim_blist_save(); } -static GtkWidget *privacy_win; - void update_privacy_connections() { /* This is a slightly better name */ gboolean needdeny = FALSE; GList *c = gaim_connections_get_all(); @@ -1692,22 +1693,24 @@ if (needdeny) { - gtk_widget_set_sensitive(privacy_win, TRUE); + gtk_widget_set_sensitive(privacy_sensbox, TRUE); build_deny_menu(); build_allow_list(); build_block_list(); } else { - gtk_widget_set_sensitive(privacy_win, FALSE); + gtk_widget_set_sensitive(privacy_sensbox, FALSE); } } static void destroy_privacy() { current_deny_gc = NULL; privacy_win = NULL; + privacy_sensbox = NULL; } void show_privacy_options() { GtkWidget *pwin; GtkWidget *box; + GtkWidget *box2; GtkWidget *hbox; GtkWidget *label; GtkWidget *sw; @@ -1721,6 +1724,12 @@ GtkTreeViewColumn *col; GtkWidget *table; + if (privacy_win != NULL) { + gtk_widget_show(privacy_win); + gdk_window_raise(privacy_win->window); + return; + } + current_deny_gc = gaim_connections_get_all()->data; /* this is safe because this screen will only be available when there are gaim_connections_get_all() */ current_is_deny = TRUE; @@ -1739,13 +1748,18 @@ gtk_container_add(GTK_CONTAINER(pwin), box); gtk_widget_show(box); + privacy_sensbox = box2 = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(box2), 5); + gtk_box_pack_start(GTK_BOX(box), box2, TRUE, TRUE, 0); + gtk_widget_show(box2); + label = gtk_label_new(_("Changes to privacy settings take effect immediately.")); - gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); + gtk_box_pack_start(GTK_BOX(box2), label, FALSE, FALSE, 0); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_widget_show(label); deny_conn_hbox = gtk_hbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(box), deny_conn_hbox, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(box2), deny_conn_hbox, FALSE, FALSE, 5); gtk_widget_show(deny_conn_hbox); label = gtk_label_new(_("Set privacy for:")); @@ -1760,7 +1774,7 @@ build_deny_menu(); table = gtk_table_new(5, 2, FALSE); - gtk_box_pack_start(GTK_BOX(box), table, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(box2), table, TRUE, TRUE, 0); gtk_table_set_row_spacings(GTK_TABLE(table), 7); gtk_table_set_col_spacings(GTK_TABLE(table), 5); gtk_widget_show(table); @@ -1867,7 +1881,6 @@ gtk_widget_show(close_button); gtk_widget_show(pwin); - }