/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2012 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
#ifdef HAVE_CONFIG_H
# include "config.h"
+#include "claws-features.h"
#endif
#include <glib.h>
gchar *input_dialog(const gchar *title, const gchar *message,
const gchar *default_string)
{
- if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
+ if (dialog && gtk_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 && gtkut_widget_get_visible(dialog)) return NULL;
+ if (dialog && gtk_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 && gtkut_widget_get_visible(dialog)) return NULL;
+ if (dialog && gtk_widget_get_visible(dialog)) return NULL;
if (!dialog)
input_dialog_create(TRUE);
const gchar *default_string, GList *list,
gboolean *remember)
{
- if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
+ if (dialog && gtk_widget_get_visible(dialog)) return NULL;
if (!dialog)
input_dialog_create(FALSE);
const gchar *checkbtn_label,
gboolean *checkbtn_state)
{
- if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
+ if (dialog && gtk_widget_get_visible(dialog)) return NULL;
if (!dialog)
input_dialog_create(FALSE);
static void input_dialog_create(gboolean is_password)
{
static PangoFontDescription *font_desc;
- GtkWidget *w_hbox;
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *cancel_button;
FALSE, FALSE, 0);
/* for title label */
- w_hbox = gtk_hbox_new(FALSE, 0);
-
icon_q = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION,
GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (icon_q), 0.5, 0.0);
{
gchar *str;
- if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
+ if (dialog && gtk_widget_get_visible(dialog)) return NULL;
if (!dialog)
input_dialog_create(FALSE);
gtk_button_set_label(GTK_BUTTON(remember_checkbtn), _("Remember this"));
input_dialog_set(title, message, default_string);
- gtk_widget_show(dialog);
+ gtk_window_present(GTK_WINDOW(dialog));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(remember_checkbtn),
default_checkbtn_state);
gtk_main_iteration();
manage_window_focus_out(dialog, NULL, NULL);
- gtk_widget_hide(dialog);
if (ack) {
GtkEditable *editable;
if (remember) {
*remember = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(remember_checkbtn));
}
+
+ gtk_widget_destroy(dialog);
+ dialog = NULL;
+
if (is_pass)
debug_print("return string = %s\n", str ? "********": ("none"));
else