sync with 0.7.4cvs49
[claws.git] / src / inputdialog.c
index cc8d7d00abeb83d275a12657680ac8bcd0de67f3..ff2cd8dce7ba7834a72e93df7adf5073965b3484 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
  *
  * 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
@@ -116,7 +116,8 @@ gchar *input_dialog_with_invisible(const gchar *title, const gchar *message,
 }
 
 gchar *input_dialog_combo(const gchar *title, const gchar *message,
-                         const gchar *default_string, GList *list)
+                         const gchar *default_string, GList *list,
+                         gboolean case_sensitive)
 {
        if (dialog && GTK_WIDGET_VISIBLE(dialog)) return NULL;
 
@@ -137,9 +138,24 @@ gchar *input_dialog_combo(const gchar *title, const gchar *message,
        } else
                gtk_combo_set_popdown_strings(GTK_COMBO(combo), list);
 
+       gtk_combo_set_case_sensitive(GTK_COMBO(combo), case_sensitive);
+
        return input_dialog_open(title, message, default_string);
 }
 
+gchar *input_dialog_query_password(const gchar *server, const gchar *user)
+{
+       gchar *message;
+       gchar *pass;
+
+       message = g_strdup_printf(_("Input password for %s on %s:"),
+                                 user, server);
+       pass = input_dialog_with_invisible(_("Input password"), message, NULL);
+       g_free(message);
+
+       return pass;
+}
+
 static void input_dialog_create(void)
 {
        GtkWidget *vbox;
@@ -157,10 +173,7 @@ static void input_dialog_create(void)
                           GTK_SIGNAL_FUNC(delete_event), NULL);
        gtk_signal_connect(GTK_OBJECT(dialog), "key_press_event",
                           GTK_SIGNAL_FUNC(key_pressed), NULL);
-       gtk_signal_connect(GTK_OBJECT(dialog), "focus_in_event",
-                          GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
-       gtk_signal_connect(GTK_OBJECT(dialog), "focus_out_event",
-                          GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+       MANAGE_WINDOW_SIGNALS_CONNECT(dialog);
 
        gtk_widget_realize(dialog);