hildon-libs 0.14.11 Reference Manual |
---|
HildonNamePasswordDialogHildonNamePasswordDialog — A widget which allows a user to enter an username and a password |
#define HILDON_NAME_PASSWORD_DIALOG_TITLE #define HILDON_NAME_PASSWORD_DIALOG_NAME #define HILDON_NAME_PASSWORD_DIALOG_PASSWORD #define HILDON_NAME_PASSWORD_DIALOG_OK #define HILDON_NAME_PASSWORD_DIALOG_CANCEL GtkWidget* hildon_name_password_dialog_new (GtkWindow *parent); GtkWidget* hildon_name_password_dialog_new_with_default (GtkWindow *parent, const gchar *name, const gchar *pass); const gchar* hildon_name_password_dialog_get_name (HildonNamePasswordDialog *dialog); const gchar* hildon_name_password_dialog_get_password (HildonNamePasswordDialog *dialog); void hildon_name_password_dialog_set_domain (HildonNamePasswordDialog *dialog, const gchar *domain);
HildonNamePasswordDialog is used to enter a username and password when accessing a password protected function. The widget performs no input checking and is used only for retrieving a user name and a password.
void _new_name_password_dialog(GtkDialog *options) { gtk_widget_destroy(GTK_WIDGET(nameDialog)); nameDialog = HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new(grand_parent)); gtk_dialog_run(GTK_DIALOG(nameDialog)); gtk_widget_hide(GTK_WIDGET(nameDialog)); } void _testNamePasswordDialog(GtkWidget *parent, gchar **help) { GtkWidget *button; GtkWidget *vbox = gtk_vbox_new(FALSE, 0); grand_parent = GTK_WINDOW(gtk_widget_get_ancestor(parent,GTK_TYPE_WINDOW)); normalDialog = gtk_dialog_new_with_buttons(``dialog'',grand_parent,GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK,NULL); nameDialog = HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new(grand_parent)); gtk_container_add(GTK_CONTAINER(parent), vbox); button = gtk_button_new_with_label(_(``Name and Password Dialog'')); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(button), ``clicked'', G_CALLBACK(_new_name_password_dialog), NULL); gtk_widget_show_all(vbox); }
#define HILDON_NAME_PASSWORD_DIALOG_TITLE "frw_ti_get_user_name_and_pwd"
#define HILDON_NAME_PASSWORD_DIALOG_OK "frw_bd_get_user_name_and_pwd_ok"
GtkWidget* hildon_name_password_dialog_new (GtkWindow *parent);
Creates a new HildonNamePasswordDialog widget with Ok and Close buttons.
parent : |
the parent window of the dialog |
Returns : | the newly created HildonNamePasswordDialog |
GtkWidget* hildon_name_password_dialog_new_with_default (GtkWindow *parent, const gchar *name, const gchar *pass);
Same as hildon_name_password_dialog_new, but with a default name and password.
parent : |
the parent window of the dialog |
name : |
default username, NULL if unset |
pass : |
|
Returns : | the newly created HildonNamePasswordDialog |
const gchar* hildon_name_password_dialog_get_name (HildonNamePasswordDialog *dialog);
Gets the text that's in the name entry.
dialog : |
the dialog |
Returns : | a pointer to the name string. |
const gchar* hildon_name_password_dialog_get_password (HildonNamePasswordDialog *dialog);
Gets the text that's in the password entry.
dialog : |
the dialog |
Returns : | a pointer to the password string |
<< HildonGetPasswordDialog | HildonSortDialog >> |