gnome-dialog-util

Name

gnome-dialog-util -- Convenience functions for making dialogs.

Synopsis


#include <gnome.h>


GtkWidget*  gnome_ok_dialog                 (const gchar *message);
GtkWidget*  gnome_ok_dialog_parented        (const gchar *message,
                                             GtkWindow *parent);
GtkWidget*  gnome_error_dialog              (const gchar *error);
GtkWidget*  gnome_error_dialog_parented     (const gchar *error,
                                             GtkWindow *parent);
GtkWidget*  gnome_warning_dialog            (const gchar *warning);
GtkWidget*  gnome_warning_dialog_parented   (const gchar *warning,
                                             GtkWindow *parent);
GtkWidget*  gnome_question_dialog           (const gchar *question,
                                             GnomeReplyCallback callback,
                                             gpointer data);
GtkWidget*  gnome_question_dialog_parented  (const gchar *question,
                                             GnomeReplyCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);
GtkWidget*  gnome_question_dialog_modal     (const gchar *question,
                                             GnomeReplyCallback callback,
                                             gpointer data);
GtkWidget*  gnome_question_dialog_modal_parented
                                            (const gchar *question,
                                             GnomeReplyCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);
GtkWidget*  gnome_ok_cancel_dialog          (const gchar *message,
                                             GnomeReplyCallback callback,
                                             gpointer data);
GtkWidget*  gnome_ok_cancel_dialog_parented (const gchar *message,
                                             GnomeReplyCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);
GtkWidget*  gnome_ok_cancel_dialog_modal    (const gchar *message,
                                             GnomeReplyCallback callback,
                                             gpointer data);
GtkWidget*  gnome_ok_cancel_dialog_modal_parented
                                            (const gchar *message,
                                             GnomeReplyCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);
GtkWidget*  gnome_request_string_dialog     (const gchar *prompt,
                                             GnomeStringCallback callback,
                                             gpointer data);
GtkWidget*  gnome_request_string_dialog_parented
                                            (const gchar *prompt,
                                             GnomeStringCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);
GtkWidget*  gnome_request_password_dialog   (const gchar *prompt,
                                             GnomeStringCallback callback,
                                             gpointer data);
GtkWidget*  gnome_request_password_dialog_parented
                                            (const gchar *prompt,
                                             GnomeStringCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);
GtkWidget*  gnome_request_dialog            (gboolean password,
                                             const gchar *prompt,
                                             const gchar *default_text,
                                             const guint16 max_length,
                                             GnomeStringCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);

Description

These functions create common dialogs for you. In all cases, you should prefer the _parented() variants, because they will properly call gnome_dialog_set_parent() prior to showing the dialog. All of these functions automatically show the dialog before they return.

Details

gnome_ok_dialog ()

GtkWidget*  gnome_ok_dialog                 (const gchar *message);

Creates and shows a simple message dialog.

message : Message to display
Returns : Pointer to new GNOME dialog object.


gnome_ok_dialog_parented ()

GtkWidget*  gnome_ok_dialog_parented        (const gchar *message,
                                             GtkWindow *parent);

Creates and shows a simple message dialog.

message : Message to display
parent : Parent window
Returns : Pointer to new GNOME dialog object.


gnome_error_dialog ()

GtkWidget*  gnome_error_dialog              (const gchar *error);

Creates and shows a error dialog. This is an OK dialog to display on fatally failed operations.

error : Message to display
Returns : Pointer to new GNOME dialog object.


gnome_error_dialog_parented ()

GtkWidget*  gnome_error_dialog_parented     (const gchar *error,
                                             GtkWindow *parent);

Creates and shows a error dialog. This is an OK dialog to display on fatally failed operations.

error : 
parent : Parent window
Returns : Pointer to new GNOME dialog object.


gnome_warning_dialog ()

GtkWidget*  gnome_warning_dialog            (const gchar *warning);

Creates and shows a warning dialog. For non-fatal warnings.

warning : Message to display
Returns : Pointer to new GNOME dialog object.


gnome_warning_dialog_parented ()

GtkWidget*  gnome_warning_dialog_parented   (const gchar *warning,
                                             GtkWindow *parent);

Creates and shows a warning dialog. For non-fatal warnings.

warning : Message to display
parent : Parent window
Returns : Pointer to new GNOME dialog object.


gnome_question_dialog ()

GtkWidget*  gnome_question_dialog           (const gchar *question,
                                             GnomeReplyCallback callback,
                                             gpointer data);

Creates a question dialog and calls callback when user answers the button number is passed onto 'reply'. 0 is for 'Yes', 1 for 'No'

void (* GnomeReplyCallback)(gint reply, gpointer data);

question : Question to ask
callback : Callback function for handling dialog results
data : Data to pass to callback
Returns : Pointer to new GNOME dialog object.


gnome_question_dialog_parented ()

GtkWidget*  gnome_question_dialog_parented  (const gchar *question,
                                             GnomeReplyCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);

Creates a question dialog and calls callback when user answers the button number is passed onto 'reply'. 0 is for 'Yes', 1 for 'No'

void (* GnomeReplyCallback)(gint reply, gpointer data);

question : Question to ask
callback : Callback function for handling dialog results
data : Data to pass to callback
parent : Parent window
Returns : Pointer to new GNOME dialog object.


gnome_question_dialog_modal ()

GtkWidget*  gnome_question_dialog_modal     (const gchar *question,
                                             GnomeReplyCallback callback,
                                             gpointer data);

Creates a question dialog and calls callback when user answers the button number is passed onto 'reply'. 0 is for 'Yes', 1 for 'No'. The dialog is created as a modal dialog and the user will have to answer this before proceeding.

void (* GnomeReplyCallback)(gint reply, gpointer data);

question : Question to ask
callback : Callback function for handling dialog results
data : Data to pass to callback
Returns : Pointer to new GNOME dialog object.


gnome_question_dialog_modal_parented ()

GtkWidget*  gnome_question_dialog_modal_parented
                                            (const gchar *question,
                                             GnomeReplyCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);

Creates a question dialog and calls callback when user answers the button number is passed onto 'reply'. 0 is for 'Yes', 1 for 'No'. The dialog is created as a modal dialog and the user will have to answer this before proceeding.

void (* GnomeReplyCallback)(gint reply, gpointer data);

question : Question to ask
callback : Callback function for handling dialog results
data : Data to pass to callback
parent : Parent window
Returns : Pointer to new GNOME dialog object.


gnome_ok_cancel_dialog ()

GtkWidget*  gnome_ok_cancel_dialog          (const gchar *message,
                                             GnomeReplyCallback callback,
                                             gpointer data);

Creates an OK/Cancel dialog and calls callback when user answers the button number is passed onto 'reply'. 0 is for 'OK', 1 for 'Cancel'.

void (* GnomeReplyCallback)(gint reply, gpointer data);

message : Message to display
callback : Callback function for handling dialog results
data : Data to pass to callback
Returns : Pointer to new GNOME dialog object.


gnome_ok_cancel_dialog_parented ()

GtkWidget*  gnome_ok_cancel_dialog_parented (const gchar *message,
                                             GnomeReplyCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);

Creates an OK/Cancel dialog and calls callback when user answers the button number is passed onto 'reply'. 0 is for 'OK', 1 for 'Cancel'.

void (* GnomeReplyCallback)(gint reply, gpointer data);

message : Message to display
callback : Callback function for handling dialog results
data : Data to pass to callback
parent : Parent window
Returns : Pointer to new GNOME dialog object.


gnome_ok_cancel_dialog_modal ()

GtkWidget*  gnome_ok_cancel_dialog_modal    (const gchar *message,
                                             GnomeReplyCallback callback,
                                             gpointer data);

Creates an OK/Cancel dialog and calls callback when user answers the button number is passed onto 'reply'. 0 is for 'OK', 1 for 'Cancel'. The dialog is created as a modal dialog and the user will have to answer this before proceeding.

void (* GnomeReplyCallback)(gint reply, gpointer data);

message : Message to display
callback : Callback function for handling dialog results
data : Data to pass to callback
Returns : Pointer to new GNOME dialog object.


gnome_ok_cancel_dialog_modal_parented ()

GtkWidget*  gnome_ok_cancel_dialog_modal_parented
                                            (const gchar *message,
                                             GnomeReplyCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);

Creates and shows an OK/Cancel dialog and calls callback when user answers the button number is passed onto 'reply'. 0 is for 'OK', 1 for 'Cancel'. The dialog is created as a modal dialog and the user will have to answer this before proceeding.

void (* GnomeReplyCallback)(gint reply, gpointer data);

message : Message to display
callback : Callback function for handling dialog results
data : Data to pass to callback
parent : Parent window
Returns : Pointer to new GNOME dialog object.


gnome_request_string_dialog ()

GtkWidget*  gnome_request_string_dialog     (const gchar *prompt,
                                             GnomeStringCallback callback,
                                             gpointer data);

Deprecated, use gnome_request_dialog

prompt : 
callback : 
data : 
Returns : 


gnome_request_string_dialog_parented ()

GtkWidget*  gnome_request_string_dialog_parented
                                            (const gchar *prompt,
                                             GnomeStringCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);

Deprecated, use gnome_request_dialog

prompt : 
callback : 
data : 
parent : 
Returns : 


gnome_request_password_dialog ()

GtkWidget*  gnome_request_password_dialog   (const gchar *prompt,
                                             GnomeStringCallback callback,
                                             gpointer data);

Deprecated, use gnome_request_dialog

prompt : 
callback : 
data : 
Returns : 


gnome_request_password_dialog_parented ()

GtkWidget*  gnome_request_password_dialog_parented
                                            (const gchar *prompt,
                                             GnomeStringCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);

Deprecated, use gnome_request_dialog

prompt : 
callback : 
data : 
parent : 
Returns : 


gnome_request_dialog ()

GtkWidget*  gnome_request_dialog            (gboolean password,
                                             const gchar *prompt,
                                             const gchar *default_text,
                                             const guint16 max_length,
                                             GnomeStringCallback callback,
                                             gpointer data,
                                             GtkWindow *parent);

Creates and shows a GNOME text entry request dialog. callback is called when the dialog closes, passing the text entry input or NULL if the user cancelled. callback is defined as

void (* GnomeStringCallback)(gchar * string, gpointer data);

password : TRUE if on-screen text input is masked
prompt : Text of the prompt to be displayed
default_text : Default text in entry widget, NULL if none
max_length : Maximum input chars allowed
callback : Callback function for handling dialog results
data : Data passed to the callback
parent : Parent window, or NULL for no parent.
Returns : Pointer to new GNOME dialog object.