diff --git a/resources/history_dialog.ui b/resources/history_dialog.ui
index ee5fb0f..67f4169 100644
--- a/resources/history_dialog.ui
+++ b/resources/history_dialog.ui
@@ -15,13 +15,23 @@
+
+ close_button
+
+
+
+
diff --git a/src/choose_ignorepkgs_dialog.vala b/src/choose_ignorepkgs_dialog.vala
index 25b1714..c67baf4 100644
--- a/src/choose_ignorepkgs_dialog.vala
+++ b/src/choose_ignorepkgs_dialog.vala
@@ -28,7 +28,9 @@ namespace Pamac {
public Gtk.ListStore pkgs_list;
public ChooseIgnorepkgsDialog (Gtk.Window window) {
- Object (transient_for: window, use_header_bar: 1);
+ int use_header_bar;
+ Gtk.Settings.get_default ().get ("gtk-dialogs-use-header", out use_header_bar);
+ Object (transient_for: window, use_header_bar: use_header_bar);
pkgs_list = new Gtk.ListStore (2, typeof (bool), typeof (string));
treeview.set_model (pkgs_list);
diff --git a/src/choose_provider_dialog.vala b/src/choose_provider_dialog.vala
index 30816e5..73651d3 100644
--- a/src/choose_provider_dialog.vala
+++ b/src/choose_provider_dialog.vala
@@ -23,7 +23,9 @@ namespace Pamac {
class ChooseProviderDialog : Gtk.Dialog {
public ChooseProviderDialog (Gtk.ApplicationWindow? window) {
- Object (transient_for: window, use_header_bar: 1);
+ int use_header_bar;
+ Gtk.Settings.get_default ().get ("gtk-dialogs-use-header", out use_header_bar);
+ Object (transient_for: window, use_header_bar: use_header_bar);
}
}
}
diff --git a/src/history_dialog.vala b/src/history_dialog.vala
index 43570ab..3d2a0f3 100644
--- a/src/history_dialog.vala
+++ b/src/history_dialog.vala
@@ -26,7 +26,9 @@ namespace Pamac {
public Gtk.TextView textview;
public HistoryDialog (Gtk.ApplicationWindow window) {
- Object (transient_for: window, use_header_bar: 1);
+ int use_header_bar;
+ Gtk.Settings.get_default ().get ("gtk-dialogs-use-header", out use_header_bar);
+ Object (transient_for: window, use_header_bar: use_header_bar);
}
}
}
diff --git a/src/transaction.vala b/src/transaction.vala
index 480bf45..1f88c1f 100644
--- a/src/transaction.vala
+++ b/src/transaction.vala
@@ -279,12 +279,15 @@ namespace Pamac {
}
public void run_about_dialog () {
+ string[] authors = {"Guillaume Benoit"};
Gtk.show_about_dialog (
application_window,
"program_name", "Pamac",
+ "icon_name", "system-software-install",
"logo_icon_name", "system-software-install",
"comments", dgettext (null, "A Gtk3 frontend for libalpm"),
"copyright", "Copyright © 2017 Guillaume Benoit",
+ "authors", authors,
"version", VERSION,
"license_type", Gtk.License.GPL_3_0,
"website", "http://github.com/manjaro/pamac");
@@ -1481,9 +1484,17 @@ namespace Pamac {
void show_warnings () {
if (warning_textbuffer.len > 0) {
+ var flags = Gtk.DialogFlags.MODAL;
+ int use_header_bar;
+ Gtk.Settings.get_default ().get ("gtk-dialogs-use-header", out use_header_bar);
+ if (use_header_bar == 1) {
+ flags |= Gtk.DialogFlags.USE_HEADER_BAR;
+ }
var dialog = new Gtk.Dialog.with_buttons (dgettext (null, "Warning"),
application_window,
- Gtk.DialogFlags.MODAL | Gtk.DialogFlags.USE_HEADER_BAR);
+ flags);
+ dialog.border_width = 6;
+ dialog.icon_name = "system-software-install";
dialog.deletable = false;
unowned Gtk.Widget widget = dialog.add_button (dgettext (null, "_Close"), Gtk.ResponseType.CLOSE);
widget.can_focus = true;
@@ -1508,9 +1519,17 @@ namespace Pamac {
}
void display_error (string message, string[] details) {
+ var flags = Gtk.DialogFlags.MODAL;
+ int use_header_bar;
+ Gtk.Settings.get_default ().get ("gtk-dialogs-use-header", out use_header_bar);
+ if (use_header_bar == 1) {
+ flags |= Gtk.DialogFlags.USE_HEADER_BAR;
+ }
var dialog = new Gtk.Dialog.with_buttons (message,
application_window,
- Gtk.DialogFlags.MODAL | Gtk.DialogFlags.USE_HEADER_BAR);
+ flags);
+ dialog.border_width = 6;
+ dialog.icon_name = "system-software-install";
var textbuffer = new StringBuilder ();
if (details.length != 0) {
show_in_term (message + ":");
diff --git a/src/transaction_sum_dialog.vala b/src/transaction_sum_dialog.vala
index 02d7b8b..8a4c772 100644
--- a/src/transaction_sum_dialog.vala
+++ b/src/transaction_sum_dialog.vala
@@ -30,7 +30,9 @@ namespace Pamac {
public Gtk.ListStore sum_list;
public TransactionSumDialog (Gtk.ApplicationWindow? window) {
- Object (transient_for: window, use_header_bar: 1);
+ int use_header_bar;
+ Gtk.Settings.get_default ().get ("gtk-dialogs-use-header", out use_header_bar);
+ Object (transient_for: window, use_header_bar: use_header_bar);
sum_list = new Gtk.ListStore (4, typeof (string), typeof (string), typeof (string), typeof (string));
treeview.set_model (sum_list);