Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 7bc6401

Browse files
committed
Propose slight improvements over clear button
1 parent 4af0db6 commit 7bc6401

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/Dialogs/Preferences.vala

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,11 @@ public class Olifant.Dialogs.Preferences : Dialog {
5656
grid.attach (switch_notifications, 1, i++);
5757
grid.attach (new SettingsLabel (_("Always receive notifications:")), 0, i);
5858
grid.attach (switch_watcher, 1, i++);
59-
<<<<<<< HEAD
60-
61-
grid.attach (new SettingsLabel (_("Clear notifications:")), 0, i);
62-
var cleanNotifications=new Button.with_label (_("Clear"));
63-
||||||| merged common ancestors
64-
grid.attach (new SettingsLabel (_("Clean notifications:")), 0, i);
65-
var cleanNotifications=new Button.with_label (_("Clean"));
66-
=======
67-
grid.attach (new SettingsLabel (_("Clear notifications:")), 0, i);
68-
var cleanNotifications=new Button.with_label (_("Clear"));
69-
>>>>>>> Changed name of action
59+
60+
var clearNotificationsLabel = new SettingsLabel (_("Clear notifications:"));
61+
grid.attach (clearNotificationsLabel, 0, i);
62+
var cleanNotifications = new Button.with_label (_("Clear"));
63+
cleanNotifications.get_style_context ().add_class(Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
7064
cleanNotifications.clicked.connect (() => {
7165
var url = "%s/api/v1/notifications/clear".printf (accounts.formal.instance);
7266
var msg = new Soup.Message ("POST", url);
@@ -78,9 +72,13 @@ public class Olifant.Dialogs.Preferences : Dialog {
7872
open_link_fallback (url, reason);
7973
});
8074

75+
cleanNotifications.set_label (_("Done!"));
76+
cleanNotifications.set_sensitive (false);
77+
8178
});
8279
grid.attach (cleanNotifications, 1, i++);
8380
grid.set_margin_bottom(4);
81+
grid.set_margin_right(2);
8482

8583
var content = get_content_area () as Box;
8684
content.pack_start (grid, false, false, 0);

0 commit comments

Comments
 (0)