MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_alert_dialog_show

Function ghb_alert_dialog_show

gtk/src/callbacks.c:4026–4050  ·  view source on GitHub ↗

* Displays a modal message dialog which will be destroyed automatically. * Use for warnings which don't need a response. * * @type: The @GtkMessageType for the dialog * @title: The title of the dialog * @message: The detail text of the dialog */

Source from the content-addressed store, hash-verified

4024 * @message: The detail text of the dialog
4025 */
4026void
4027ghb_alert_dialog_show (GtkMessageType type, const char *title,
4028 const char *format, ...)
4029{
4030 GtkWindow *parent;
4031 GtkWidget *dialog;
4032 char *message;
4033 va_list args;
4034
4035 parent = gtk_application_get_active_window(GTK_APPLICATION(g_application_get_default()));
4036
4037 dialog = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
4038 type, GTK_BUTTONS_CLOSE, "%s", title);
4039
4040 if (format != NULL)
4041 {
4042 va_start(args, format);
4043 message = g_strdup_vprintf(format, args);
4044 va_end(args);
4045 gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", message);
4046 g_free(message);
4047 }
4048 g_signal_connect(dialog, "response", G_CALLBACK(message_dialog_destroy), NULL);
4049 gtk_widget_set_visible(dialog, TRUE);
4050}
4051
4052GtkWidget *
4053ghb_cancel_dialog_new (GtkWindow *parent, const char *title, const char *message,

Callers 2

ghb_validate_filtersFunction · 0.85
validate_settingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected