[libfwdialog: new function: dialog_password()
VMiklos <[EMAIL PROTECTED]>**20060711120032] {
hunk ./libfwdialog/libfwdialog.c 111
+
+/** A wrapper to dialog_inputbox() for passwords
+ * @param title the title of the window
+ * @param desc the prompt text shown within the widget
+ * @return the answer - you must free() the allocated memory
+ */
+char *dialog_password(char *title, char *desc)
+{
+       char my_buffer[MAX_LEN + 1] = "";
+       int ret;
+
+       dlg_put_backtitle();
+       dlg_clear();
+       while(1)
+       {
+               dialog_vars.input_result = my_buffer;
+               dialog_vars.insecure = 1;
+               ret = dialog_inputbox(title, desc, 0, 0, 0, 1);
+               if (ret != DLG_EXIT_CANCEL)
+                       break;
+               if(dialog_confirm())
+                       dialog_exit();
+       }
+       return(strdup(my_buffer));
+}
hunk ./libfwdialog/libfwdialog.h 28
+char *dialog_password(char *title, char *desc);
}
_______________________________________________
Frugalware-darcs mailing list
Frugalware-darcs@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-darcs

Reply via email to