/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2009 Hiroyuki Yamamoto and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
gchar *input_dialog(const gchar *title, const gchar *message,
const gchar *default_string)
{
- if (dialog && GTK_WIDGET_VISIBLE(dialog)) return NULL;
+ if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
if (!dialog)
input_dialog_create(FALSE);
gchar *input_dialog_with_invisible(const gchar *title, const gchar *message,
const gchar *default_string)
{
- if (dialog && GTK_WIDGET_VISIBLE(dialog)) return NULL;
+ if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
if (!dialog)
input_dialog_create(TRUE);
const gchar *default_string, const gchar *checkbtn_label,
gboolean *checkbtn_state)
{
- if (dialog && GTK_WIDGET_VISIBLE(dialog)) return NULL;
+ if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
if (!dialog)
input_dialog_create(TRUE);
HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
#endif
- return input_dialog_open(title, message, checkbtn_label, default_string, FALSE, checkbtn_state);
+ return input_dialog_open(title, message, checkbtn_label, default_string, (checkbtn_state? *checkbtn_state:FALSE), checkbtn_state);
}
gchar *input_dialog_combo(const gchar *title, const gchar *message,
const gchar *default_string, GList *list,
gboolean *remember)
{
- if (dialog && GTK_WIDGET_VISIBLE(dialog)) return NULL;
+ if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
if (!dialog)
input_dialog_create(FALSE);
const gchar *checkbtn_label,
gboolean *checkbtn_state)
{
- if (dialog && GTK_WIDGET_VISIBLE(dialog)) return NULL;
+ if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
if (!dialog)
input_dialog_create(FALSE);
user);
else
message = g_strdup_printf(_("Input password:"));
- if (keep && prefs_common.session_passwords) {
+ if (keep) {
if (*keep != NULL) {
pass = g_strdup (*keep);
}
else {
- gboolean state = FALSE;
+ gboolean state = prefs_common.session_passwords;
pass = input_dialog_with_invisible_checkbtn(_("Input password"),
message, NULL,
_("Remember password for this session"),
*keep = g_strdup (pass);
debug_print("keeping session password for account\n");
}
+ prefs_common.session_passwords = state;
}
}
else {
gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
gtk_window_set_default_size(GTK_WINDOW(dialog), 375, 100);
gtk_window_set_title(GTK_WINDOW(dialog), "");
- gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
g_signal_connect(G_OBJECT(dialog), "delete_event",
G_CALLBACK(delete_event), NULL);
{
gchar *str;
- if (dialog && GTK_WIDGET_VISIBLE(dialog)) return NULL;
+ if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
if (!dialog)
input_dialog_create(FALSE);