Skip to content
This repository was archived by the owner on Apr 2, 2022. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ executable(
join_paths('src', 'Views', 'ErrorView.vala'),
join_paths('src', 'Views', 'WelcomeView.vala'),
join_paths('src', 'Widgets', 'BrowserButton.vala'),
join_paths('src', 'Widgets', 'IllustrativeDialog.vala'),
join_paths('src', 'Widgets', 'UrlEntry.vala'),
join_paths('src', 'Widgets', 'WebView.vala'),
asresources,
Expand Down
6 changes: 2 additions & 4 deletions src/Dialogs/CustomSearchDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
* Authored by: Cassidy James Blaede <[email protected]>
*/

public class Ephemeral.CustomSearchDialog : Granite.MessageDialog {
public class Ephemeral.CustomSearchDialog : IllustrativeDialog {
public CustomSearchDialog () {
Object (
buttons: Gtk.ButtonsType.CANCEL,
image_icon: new ThemedIcon ("system-search"),
primary_text: _("Set a Custom Search Engine"),
secondary_text: _("Searches from the URL entry will be sent to this custom URL. <b>%s</b> will be replaced with the search query."),
Expand All @@ -32,9 +33,6 @@ public class Ephemeral.CustomSearchDialog : Granite.MessageDialog {
construct {
secondary_label.use_markup = true;

var cancel = add_button (_("Never Mind"), Gtk.ResponseType.CANCEL) as Gtk.Button;
cancel.clicked.connect (() => { destroy (); });

var accept = add_button (_("Set Search Engine"), Gtk.ResponseType.OK) as Gtk.Button;
accept.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);

Expand Down
8 changes: 3 additions & 5 deletions src/Dialogs/ExternalDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
* Authored by: Cassidy James Blaede <[email protected]>
*/

public class Ephemeral.ExternalDialog : Granite.MessageDialog {
public string? protocol { get; construct set; }
public class Ephemeral.ExternalDialog : IllustrativeDialog {
public string protocol { get; construct set; }

public ExternalDialog (string? _protocol = null) {
Object (
buttons: Gtk.ButtonsType.CANCEL,
image_icon: new ThemedIcon ("dialog-warning"),
primary_text: _("Open Link Externally?"),
protocol: _protocol,
Expand All @@ -44,9 +45,6 @@ public class Ephemeral.ExternalDialog : Granite.MessageDialog {
secondary_text = "%s %s".printf (explanation, implication);
secondary_label.use_markup = true;

var cancel = add_button (_("Don’t Open"), Gtk.ResponseType.CANCEL) as Gtk.Button;
cancel.clicked.connect (() => { destroy (); });

var accept = add_button (_("Open Anyway"), Gtk.ResponseType.OK) as Gtk.Button;
accept.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
}
Expand Down
6 changes: 2 additions & 4 deletions src/Dialogs/PreferencesDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
* Authored by: Cassidy James Blaede <[email protected]>
*/

public class Ephemeral.PreferencesDialog : Granite.MessageDialog {
public class Ephemeral.PreferencesDialog : IllustrativeDialog {
public PreferencesDialog () {
Object (
buttons: Gtk.ButtonsType.CANCEL,
image_icon: new ThemedIcon ("document-open-recent"),
primary_text: _("Reset Preferences?"),
secondary_text: _("All added website suggestions will be removed. Any dismissed or remembered alerts, warnings, etc. will be displayed again the next time Ephemeral is opened."),
Expand All @@ -30,9 +31,6 @@ public class Ephemeral.PreferencesDialog : Granite.MessageDialog {
}

construct {
var cancel = add_button (_("Never Mind"), Gtk.ResponseType.CANCEL) as Gtk.Button;
cancel.clicked.connect (() => { destroy (); });

var accept = add_button (_("Reset Preferences"), Gtk.ResponseType.OK) as Gtk.Button;
accept.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Dialogs/ScriptDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Authored by: David Hewitt <[email protected]>
*/

public class Ephemeral.ScriptDialog : Granite.MessageDialog {
public class Ephemeral.ScriptDialog : IllustrativeDialog {
public WebKit.ScriptDialog dialog_info { get; construct; }

public ScriptDialog (WebKit.ScriptDialog dialog) {
Expand Down
Loading