Mercurial > pidgin.yaz
comparison pidgin/gtkaccount.c @ 18575:d767cd75d088
pidgin_accounts_window_hide() should actually dispose of the window. Fixes #2193.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 20 Jul 2007 18:11:26 +0000 |
parents | 3f964a7e27e2 |
children | 66df5d93cdf4 |
comparison
equal
deleted
inserted
replaced
18574:94f4048f1380 | 18575:d767cd75d088 |
---|---|
502 value = purple_account_user_split_get_default_value(split); | 502 value = purple_account_user_split_get_default_value(split); |
503 | 503 |
504 /* Google Talk default domain hackery! */ | 504 /* Google Talk default domain hackery! */ |
505 menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(dialog->protocol_menu)); | 505 menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(dialog->protocol_menu)); |
506 item = gtk_menu_get_active(GTK_MENU(menu)); | 506 item = gtk_menu_get_active(GTK_MENU(menu)); |
507 if (value == NULL && g_object_get_data(G_OBJECT(item), "fake") && | 507 if (value == NULL && g_object_get_data(G_OBJECT(item), "fake") && |
508 !strcmp(purple_account_user_split_get_text(split), _("Domain"))) | 508 !strcmp(purple_account_user_split_get_text(split), _("Domain"))) |
509 value = "gmail.com"; | 509 value = "gmail.com"; |
510 | 510 |
511 if (value != NULL) | 511 if (value != NULL) |
512 gtk_entry_set_text(GTK_ENTRY(entry), value); | 512 gtk_entry_set_text(GTK_ENTRY(entry), value); |
1812 } | 1812 } |
1813 | 1813 |
1814 static gint | 1814 static gint |
1815 accedit_win_destroy_cb(GtkWidget *w, GdkEvent *event, AccountsWindow *dialog) | 1815 accedit_win_destroy_cb(GtkWidget *w, GdkEvent *event, AccountsWindow *dialog) |
1816 { | 1816 { |
1817 /* Since this is called as the window is closing, we don't need | |
1818 * pidgin_accounts_window_hide() to also dispose of the window */ | |
1819 dialog->window = NULL; | |
1820 | |
1817 pidgin_accounts_window_hide(); | 1821 pidgin_accounts_window_hide(); |
1818 | 1822 |
1819 return 0; | 1823 return 0; |
1820 } | 1824 } |
1821 | 1825 |
1922 } | 1926 } |
1923 | 1927 |
1924 static void | 1928 static void |
1925 close_accounts_cb(GtkWidget *w, AccountsWindow *dialog) | 1929 close_accounts_cb(GtkWidget *w, AccountsWindow *dialog) |
1926 { | 1930 { |
1927 gtk_widget_destroy(dialog->window); | |
1928 | |
1929 pidgin_accounts_window_hide(); | 1931 pidgin_accounts_window_hide(); |
1930 } | 1932 } |
1931 | 1933 |
1932 | 1934 |
1933 static void | 1935 static void |
2398 void | 2400 void |
2399 pidgin_accounts_window_hide(void) | 2401 pidgin_accounts_window_hide(void) |
2400 { | 2402 { |
2401 if (accounts_window == NULL) | 2403 if (accounts_window == NULL) |
2402 return; | 2404 return; |
2405 | |
2406 if (accounts_window->window != NULL) | |
2407 gtk_widget_destroy(accounts_window->window); | |
2403 | 2408 |
2404 purple_signals_disconnect_by_handle(accounts_window); | 2409 purple_signals_disconnect_by_handle(accounts_window); |
2405 purple_prefs_disconnect_by_handle(accounts_window); | 2410 purple_prefs_disconnect_by_handle(accounts_window); |
2406 | 2411 |
2407 g_free(accounts_window); | 2412 g_free(accounts_window); |