fix details on dialog building

This commit is contained in:
Alberto Fanjul 2024-04-02 22:52:40 +02:00
parent 81cc44fcf2
commit 14a7b06420
4 changed files with 6 additions and 8 deletions

View file

@ -942,7 +942,7 @@ class Dialog : Gtk.Dialog
try {
file.delete_async.end (res);
} catch (Error e) {
warning ("Error deleting %S file: %s", PREPARE_COMMIT_MSG_FILENAME, e.message);
warning ("Error deleting %s file: %s", PREPARE_COMMIT_MSG_FILENAME, e.message);
}
});
}

View file

@ -205,7 +205,7 @@ namespace Gitg
if (exists_local_property(USER_NAME_PROP) || exists_local_property(USER_EMAIL_PROP)) {
var alert_dialog = new Gtk.MessageDialog (this, Gtk.DialogFlags.MODAL, Gtk.MessageType.WARNING,
Gtk.ButtonsType.OK_CANCEL,
_("Disable override will clean existing local author details. Are you sure?"), null);
_("Disable override will clean existing local author details. Are you sure?"));
alert_dialog.response.connect ((id) => {
if (id == Gtk.ResponseType.OK) {
delete_local_entry(USER_NAME_PROP);

View file

@ -1146,14 +1146,12 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
public void user_query(GitgExt.UserQuery query)
{
var dlg = new Gtk.MessageDialog(this,
var dlg = new Gtk.MessageDialog.with_markup(this,
Gtk.DialogFlags.MODAL,
query.message_type,
Gtk.ButtonsType.NONE,
"");
var primary = "<b>%s</b>".printf(Markup.escape_text(query.title));
dlg.set_markup(primary);
"<b>%s</b>",
query.title);
dlg.format_secondary_text("%s", query.message);

View file

@ -569,7 +569,7 @@ namespace Gitg
{
var alert_dialog = new Gtk.MessageDialog((Gtk.Window) row.get_toplevel(),
Gtk.DialogFlags.MODAL, Gtk.MessageType.ERROR, Gtk.ButtonsType.NONE,
_("Deleting repository source files “%s” will delete them from disk and cannot be undone. Are you sure?").printf(uri), null);
_("Deleting repository source files “%s” will delete them from disk and cannot be undone. Are you sure?"), uri);
alert_dialog.add_button(_("Cancel"), DeleteSources.CANCEL);
alert_dialog.add_button(_("Move to trash"), DeleteSources.TRASH);
alert_dialog.add_button(_("Delete permanently"), DeleteSources.DELETE);