14a7b064.patch 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. From 14a7b0642046b8c91f8de96a0456dfc9c3cc0482 Mon Sep 17 00:00:00 2001
  2. From: Alberto Fanjul <albertofanjul@gmail.com>
  3. Date: Tue, 2 Apr 2024 22:52:40 +0200
  4. Subject: [PATCH] fix details on dialog building
  5. ---
  6. gitg/commit/gitg-commit-dialog.vala | 2 +-
  7. gitg/gitg-author-details-dialog.vala | 2 +-
  8. gitg/gitg-window.vala | 8 +++-----
  9. libgitg/gitg-repository-list-box.vala | 2 +-
  10. 4 files changed, 6 insertions(+), 8 deletions(-)
  11. diff --git a/gitg/commit/gitg-commit-dialog.vala b/gitg/commit/gitg-commit-dialog.vala
  12. index f5f12f42..ce020a94 100644
  13. --- a/gitg/commit/gitg-commit-dialog.vala
  14. +++ b/gitg/commit/gitg-commit-dialog.vala
  15. @@ -942,7 +942,7 @@ class Dialog : Gtk.Dialog
  16. try {
  17. file.delete_async.end (res);
  18. } catch (Error e) {
  19. - warning ("Error deleting %S file: %s", PREPARE_COMMIT_MSG_FILENAME, e.message);
  20. + warning ("Error deleting %s file: %s", PREPARE_COMMIT_MSG_FILENAME, e.message);
  21. }
  22. });
  23. }
  24. diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
  25. index 76df26cd..2756e71d 100644
  26. --- a/gitg/gitg-window.vala
  27. +++ b/gitg/gitg-window.vala
  28. @@ -1146,14 +1146,12 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
  29. public void user_query(GitgExt.UserQuery query)
  30. {
  31. - var dlg = new Gtk.MessageDialog(this,
  32. + var dlg = new Gtk.MessageDialog.with_markup(this,
  33. Gtk.DialogFlags.MODAL,
  34. query.message_type,
  35. Gtk.ButtonsType.NONE,
  36. - "");
  37. -
  38. - var primary = "<b>%s</b>".printf(Markup.escape_text(query.title));
  39. - dlg.set_markup(primary);
  40. + "<b>%s</b>",
  41. + query.title);
  42. dlg.format_secondary_text("%s", query.message);
  43. diff --git a/libgitg/gitg-repository-list-box.vala b/libgitg/gitg-repository-list-box.vala
  44. index 5f2e6de7..ab14df20 100644
  45. --- a/libgitg/gitg-repository-list-box.vala
  46. +++ b/libgitg/gitg-repository-list-box.vala
  47. @@ -569,7 +569,7 @@ namespace Gitg
  48. {
  49. var alert_dialog = new Gtk.MessageDialog((Gtk.Window) row.get_toplevel(),
  50. Gtk.DialogFlags.MODAL, Gtk.MessageType.ERROR, Gtk.ButtonsType.NONE,
  51. - _("Deleting repository source files “%s” will delete them from disk and cannot be undone. Are you sure?").printf(uri), null);
  52. + _("Deleting repository source files “%s” will delete them from disk and cannot be undone. Are you sure?"), uri);
  53. alert_dialog.add_button(_("Cancel"), DeleteSources.CANCEL);
  54. alert_dialog.add_button(_("Move to trash"), DeleteSources.TRASH);
  55. alert_dialog.add_button(_("Delete permanently"), DeleteSources.DELETE);
  56. --
  57. GitLab