![]() | ![]() | ![]() | LibGKSuUI Reference Manual |
---|
GksuUIDialog -- authentication dialog widgetGksuUIDialog -- authentication dialog widget — |
GksuuiDialog; GtkWidget* gksuui_dialog_new (void); void gksuui_dialog_set_message (GksuuiDialog *dialog, gchar *message); const gchar* gksuui_dialog_get_message (GksuuiDialog *dialog); void gksuui_dialog_set_icon (GksuuiDialog *dialog, GdkPixbuf *icon); GtkWidget* gksuui_dialog_get_icon (GksuuiDialog *dialog); gchar* gksuui_dialog_get_password (GksuuiDialog *dialog);
typedef struct { GtkDialog dialog; GtkWidget *main_vbox; GtkWidget *hbox; GtkWidget *image; GtkWidget *entry_vbox; GtkWidget *label; GtkWidget *entry; GtkWidget *ok_button; GtkWidget *cancel_button; } GksuuiDialog;
Convenience widget based on GtkDialog to request a password.
GtkDialog dialog ; | parent widget |
GtkWidget *main_vbox ; | GtkDialog's vbox |
GtkWidget *hbox ; | box to separate the image of the right-side widgets |
GtkWidget *image ; | the authorization image, left-side widget |
GtkWidget *entry_vbox ; | right-side widgets container |
GtkWidget *label ; | message describing what is required from the user, right-side widget |
GtkWidget *entry ; | place to type the password in, right-side widget |
GtkWidget *ok_button ; | OK button of the dialog |
GtkWidget *cancel_button ; | Cancel button of the dialog |
GtkWidget* gksuui_dialog_new (void);
Creates a new GksuuiDialog.
Returns : | the new GksuuiDialog |
void gksuui_dialog_set_message (GksuuiDialog *dialog, gchar *message);
Sets the message that is displayed to the user when requesting a password. You can use Pango markup to modify font attributes.
dialog : | the dialog on which to set the message |
message : | the message to be set on the dialog |
const gchar* gksuui_dialog_get_message (GksuuiDialog *dialog);
Gets the current message that the dialog will use when run.
dialog : | the dialog from which to get the message |
Returns : | a pointer to the string containing the message. You need to make a copy of the string to keep it. |
void gksuui_dialog_set_icon (GksuuiDialog *dialog, GdkPixbuf *icon);
Sets the icon that will be shown on the dialog. Should probably not be used, as the default icon is the default authorization icon.
dialog : | the dialog on which the icon will be set |
icon : | a GdkPixbuf from which to set the image |
GtkWidget* gksuui_dialog_get_icon (GksuuiDialog *dialog);
Gets the GtkImage which is currently defined as the icon for the authorization dialog.
dialog : | the dialog from which the icon should be got |
Returns : | a GtkWidget which is the GtkImage |
gchar* gksuui_dialog_get_password (GksuuiDialog *dialog);
Gets the password typed by the user on the dialog.
This is a convenience function to grab the password
easily from the dialog after calling gtk_dialog_run()
dialog : | the dialog from which to get the message |
Returns : | a newly allocated string containing the password |
<< Main Reference |