Commit 2f4419c5 authored by Tristan Matthews's avatar Tristan Matthews

gnome: cleanup account config dialog

parent 82fc0af5
......@@ -1422,7 +1422,7 @@ show_account_window(account_t *account, SFLPhoneClient *client, gboolean is_new)
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
GTK_STOCK_APPLY,
GTK_RESPONSE_ACCEPT,
GTK_RESPONSE_APPLY,
NULL);
gtk_container_set_border_width(GTK_CONTAINER(dialog), 0);
......@@ -1474,12 +1474,11 @@ show_account_window(account_t *account, SFLPhoneClient *client, gboolean is_new)
/* Run dialog, this blocks */
gint response = gtk_dialog_run(GTK_DIALOG(dialog));
// If anything but "Apply" button is pressed
if (response != GTK_RESPONSE_ACCEPT) {
if (response == GTK_RESPONSE_APPLY) {
return dialog;
} else {
gtk_widget_destroy(dialog);
return NULL;
} else {
return dialog;
}
}
......@@ -121,8 +121,10 @@ run_account_dialog(const gchar *selected_accountID, SFLPhoneClient *client, gboo
{
account_t *account = account_list_get_by_id(selected_accountID);
GtkWidget *dialog = show_account_window(account, client, is_new);
update_account_from_dialog(dialog, account);
account_store_fill();
if (dialog) {
update_account_from_dialog(dialog, account);
account_store_fill();
}
}
static void row_activated_cb(GtkTreeView *view,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment