Compare commits
1 Commits
frame-cloc
...
alert-dial
Author | SHA1 | Date | |
---|---|---|---|
|
7c70ad4626 |
@@ -317,7 +317,8 @@ save_response_cb (GObject *source,
|
||||
alert = gtk_alert_dialog_new ("Saving failed");
|
||||
gtk_alert_dialog_set_detail (alert, error->message);
|
||||
gtk_alert_dialog_show (alert,
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))));
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))),
|
||||
NULL);
|
||||
g_object_unref (alert);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ show_action_dialog (GSimpleAction *action)
|
||||
|
||||
dialog = gtk_alert_dialog_new ("You activated action: \"%s\n",
|
||||
g_action_get_name (G_ACTION (action)));
|
||||
gtk_alert_dialog_show (dialog, NULL);
|
||||
gtk_alert_dialog_show (dialog, NULL, NULL);
|
||||
g_object_unref (dialog);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ open_response_cb (GObject *source,
|
||||
GtkAlertDialog *alert;
|
||||
|
||||
alert = gtk_alert_dialog_new ("Error loading file: \"%s\"", error->message);
|
||||
gtk_alert_dialog_show (alert, NULL);
|
||||
gtk_alert_dialog_show (alert, NULL, NULL);
|
||||
g_object_unref (alert);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ progressive_timeout (gpointer data)
|
||||
|
||||
dialog = gtk_alert_dialog_new ("Failure reading image file 'alphatest.png': %s",
|
||||
error->message);
|
||||
gtk_alert_dialog_show (dialog, NULL);
|
||||
gtk_alert_dialog_show (dialog, NULL, NULL);
|
||||
g_object_unref (dialog);
|
||||
g_error_free (error);
|
||||
|
||||
@@ -107,7 +107,7 @@ progressive_timeout (gpointer data)
|
||||
|
||||
dialog = gtk_alert_dialog_new ("Failed to load image: %s",
|
||||
error->message);
|
||||
gtk_alert_dialog_show (dialog, NULL);
|
||||
gtk_alert_dialog_show (dialog, NULL, NULL);
|
||||
g_object_unref (dialog);
|
||||
g_error_free (error);
|
||||
|
||||
@@ -132,7 +132,7 @@ progressive_timeout (gpointer data)
|
||||
|
||||
dialog = gtk_alert_dialog_new ("Failed to load image: %s",
|
||||
error->message);
|
||||
gtk_alert_dialog_show (dialog, NULL);
|
||||
gtk_alert_dialog_show (dialog, NULL, NULL);
|
||||
g_object_unref (dialog);
|
||||
g_error_free (error);
|
||||
|
||||
@@ -160,7 +160,7 @@ progressive_timeout (gpointer data)
|
||||
|
||||
dialog = gtk_alert_dialog_new ("Failed to load image: %s",
|
||||
error->message);
|
||||
gtk_alert_dialog_show (dialog, NULL);
|
||||
gtk_alert_dialog_show (dialog, NULL, NULL);
|
||||
g_object_unref (dialog);
|
||||
g_error_free (error);
|
||||
|
||||
@@ -188,7 +188,7 @@ progressive_timeout (gpointer data)
|
||||
|
||||
dialog = gtk_alert_dialog_new ("%s",
|
||||
error->message);
|
||||
gtk_alert_dialog_show (dialog, NULL);
|
||||
gtk_alert_dialog_show (dialog, NULL, NULL);
|
||||
g_object_unref (dialog);
|
||||
g_error_free (error);
|
||||
|
||||
|
@@ -27,7 +27,7 @@ on_bar_response (GtkInfoBar *info_bar,
|
||||
detail = g_strdup_printf ("Your response has been %d", response_id);
|
||||
gtk_alert_dialog_set_detail (dialog, detail);
|
||||
g_free (detail);
|
||||
gtk_alert_dialog_show (dialog, GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (info_bar))));
|
||||
gtk_alert_dialog_show (dialog, GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (info_bar))), NULL);
|
||||
g_object_unref (dialog);
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ activate_link (GtkWidget *label,
|
||||
"The term ‘keynav’ is a shorthand for "
|
||||
"keyboard navigation and refers to the process of using "
|
||||
"a program (exclusively) via keyboard input.");
|
||||
gtk_alert_dialog_show (dialog, GTK_WINDOW (gtk_widget_get_root (label)));
|
||||
gtk_alert_dialog_show (dialog, GTK_WINDOW (gtk_widget_get_root (label)), NULL);
|
||||
g_object_unref (dialog);
|
||||
|
||||
return TRUE;
|
||||
|
@@ -124,7 +124,7 @@ activate_cb (GtkListView *list,
|
||||
*/
|
||||
dialog = gtk_alert_dialog_new ("Could not launch %s", g_app_info_get_display_name (app_info));
|
||||
gtk_alert_dialog_set_detail (dialog, error->message);
|
||||
gtk_alert_dialog_show (dialog, GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (list))));
|
||||
gtk_alert_dialog_show (dialog, GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (list))), NULL);
|
||||
g_object_unref (dialog);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
@@ -180,7 +180,7 @@ do_printing (GtkWidget *do_widget)
|
||||
GtkAlertDialog *dialog;
|
||||
|
||||
dialog = gtk_alert_dialog_new ("%s", error->message);
|
||||
gtk_alert_dialog_show (dialog, GTK_WINDOW (do_widget));
|
||||
gtk_alert_dialog_show (dialog, GTK_WINDOW (do_widget), NULL);
|
||||
g_object_unref (dialog);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
@@ -613,7 +613,8 @@ save_response_cb (GObject *source,
|
||||
alert = gtk_alert_dialog_new ("Saving failed");
|
||||
gtk_alert_dialog_set_detail (alert, error->message);
|
||||
gtk_alert_dialog_show (alert,
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))));
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))),
|
||||
NULL);
|
||||
g_object_unref (alert);
|
||||
g_error_free (error);
|
||||
}
|
||||
@@ -719,7 +720,9 @@ export_image_response_cb (GObject *source,
|
||||
GtkAlertDialog *alert;
|
||||
|
||||
alert = gtk_alert_dialog_new ("Exporting to image failed");
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (gtk_window_get_transient_for (GTK_WINDOW (dialog))));
|
||||
gtk_alert_dialog_show (alert,
|
||||
GTK_WINDOW (gtk_window_get_transient_for (GTK_WINDOW (dialog))),
|
||||
NULL);
|
||||
g_object_unref (alert);
|
||||
}
|
||||
|
||||
|
@@ -119,7 +119,7 @@ load_file (GFile *open_filename)
|
||||
|
||||
alert = gtk_alert_dialog_new ("Error loading file %s", display_name);
|
||||
gtk_alert_dialog_set_detail (alert, "Not valid utf8");
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (main_window));
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (main_window), NULL);
|
||||
g_object_unref (alert);
|
||||
g_object_unref (info);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ load_file (GFile *open_filename)
|
||||
|
||||
alert = gtk_alert_dialog_new ("Error loading file %s", display_name);
|
||||
gtk_alert_dialog_set_detail (alert, error->message);
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (main_window));
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (main_window), NULL);
|
||||
g_object_unref (alert);
|
||||
g_object_unref (info);
|
||||
g_error_free (error);
|
||||
@@ -173,7 +173,7 @@ save_file (GFile *save_filename)
|
||||
|
||||
alert = gtk_alert_dialog_new ("Error saving to file %s", display_name);
|
||||
gtk_alert_dialog_set_detail (alert, error->message);
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (main_window));
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (main_window), NULL);
|
||||
g_object_unref (alert);
|
||||
g_error_free (error);
|
||||
g_object_unref (info);
|
||||
@@ -374,7 +374,7 @@ print_done (GtkPrintOperation *op,
|
||||
alert = gtk_alert_dialog_new ("Error printing file");
|
||||
if (error)
|
||||
gtk_alert_dialog_set_detail (alert, error->message);
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (main_window));
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (main_window), NULL);
|
||||
g_object_unref (alert);
|
||||
}
|
||||
else if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
|
||||
|
@@ -744,6 +744,7 @@ gtk_alert_dialog_choose_finish (GtkAlertDialog *self,
|
||||
* gtk_alert_dialog_show:
|
||||
* @self: a `GtkAlertDialog`
|
||||
* @parent: (nullable): the parent `GtkWindow`
|
||||
* @cancellable: (nullable): a `GCancellable` to cancel the operation
|
||||
*
|
||||
* This function shows the alert to the user.
|
||||
*
|
||||
@@ -755,9 +756,10 @@ gtk_alert_dialog_choose_finish (GtkAlertDialog *self,
|
||||
*/
|
||||
void
|
||||
gtk_alert_dialog_show (GtkAlertDialog *self,
|
||||
GtkWindow *parent)
|
||||
GtkWindow *parent,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
gtk_alert_dialog_choose (self, parent, NULL, NULL, NULL);
|
||||
gtk_alert_dialog_choose (self, parent, cancellable, NULL, NULL);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
@@ -91,6 +91,7 @@ int gtk_alert_dialog_choose_finish (GtkAlertDialog *self,
|
||||
|
||||
GDK_AVAILABLE_IN_4_10
|
||||
void gtk_alert_dialog_show (GtkAlertDialog *self,
|
||||
GtkWindow *parent);
|
||||
GtkWindow *parent,
|
||||
GCancellable *cancellable);
|
||||
|
||||
G_END_DECLS
|
||||
|
@@ -673,7 +673,7 @@ error_message (GtkFileChooserWidget *impl,
|
||||
|
||||
dialog = gtk_alert_dialog_new ("%s", msg);
|
||||
gtk_alert_dialog_set_detail (dialog, detail);
|
||||
gtk_alert_dialog_show (dialog, parent);
|
||||
gtk_alert_dialog_show (dialog, parent, NULL);
|
||||
g_object_unref (dialog);
|
||||
}
|
||||
|
||||
|
@@ -1395,7 +1395,7 @@ on_end_process_activated (GtkButton *button,
|
||||
*/
|
||||
dialog = gtk_alert_dialog_new (_("Unable to end process"));
|
||||
gtk_alert_dialog_set_detail (dialog, error->message);
|
||||
gtk_alert_dialog_show (dialog, GTK_WINDOW (op->priv->dialog));
|
||||
gtk_alert_dialog_show (dialog, GTK_WINDOW (op->priv->dialog), NULL);
|
||||
g_object_unref (dialog);
|
||||
|
||||
g_error_free (error);
|
||||
|
@@ -169,7 +169,7 @@ show_uri_done (GObject *object,
|
||||
|
||||
dialog = gtk_alert_dialog_new ("%s", _("Could not show link"));
|
||||
gtk_alert_dialog_set_detail (dialog, error->message);
|
||||
gtk_alert_dialog_show (dialog, parent);
|
||||
gtk_alert_dialog_show (dialog, parent, NULL);
|
||||
g_object_unref (dialog);
|
||||
|
||||
g_error_free (error);
|
||||
|
@@ -205,7 +205,7 @@ save_to_file (GtkInspectorCssEditor *ce,
|
||||
|
||||
alert = gtk_alert_dialog_new (_("Saving CSS failed"));
|
||||
gtk_alert_dialog_set_detail (alert, error->message);
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (ce))));
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (ce))), NULL);
|
||||
g_object_unref (alert);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
@@ -1828,7 +1828,7 @@ render_node_save_response (GObject *source,
|
||||
|
||||
alert = gtk_alert_dialog_new (_("Saving RenderNode failed"));
|
||||
gtk_alert_dialog_set_detail (alert, error->message);
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (gtk_window_get_transient_for (GTK_WINDOW (dialog))));
|
||||
gtk_alert_dialog_show (alert, GTK_WINDOW (gtk_window_get_transient_for (GTK_WINDOW (dialog))), NULL);
|
||||
g_object_unref (alert);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user