summaryrefslogtreecommitdiff
path: root/src/gui/preferencesWindow.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/preferencesWindow.vala')
-rw-r--r--src/gui/preferencesWindow.vala29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/gui/preferencesWindow.vala b/src/gui/preferencesWindow.vala
index 09d8a3c..fff8168 100644
--- a/src/gui/preferencesWindow.vala
+++ b/src/gui/preferencesWindow.vala
@@ -72,7 +72,7 @@ public class PreferencesWindow : GLib.Object {
Gdk.EventMask.KEY_PRESS_MASK |
Gdk.EventMask.POINTER_MOTION_MASK);
- if (!Deamon.disable_header_bar) {
+ if (!Daemon.disable_header_bar) {
var headerbar = new Gtk.HeaderBar();
headerbar.show_close_button = true;
headerbar.title = _("Gnome-Pie Settings");
@@ -82,7 +82,7 @@ public class PreferencesWindow : GLib.Object {
this.notebook = builder.get_object("notebook") as Gtk.Notebook;
- if (!Deamon.disable_stack_switcher) {
+ if (!Daemon.disable_stack_switcher) {
var main_box = builder.get_object("main-box") as Gtk.Box;
var pie_settings = builder.get_object("pie-settings") as Gtk.Box;
var general_settings = builder.get_object("general-settings") as Gtk.Box;
@@ -170,6 +170,8 @@ public class PreferencesWindow : GLib.Object {
(builder.get_object("theme-export-button") as Gtk.Button).clicked.connect(on_export_theme_button_clicked);
(builder.get_object("theme-import-button") as Gtk.Button).clicked.connect(on_import_theme_button_clicked);
+ (builder.get_object("theme-reload-button") as Gtk.Button).clicked.connect(on_reload_theme_button_clicked);
+ (builder.get_object("theme-open-button") as Gtk.Button).clicked.connect(on_open_theme_button_clicked);
this.theme_delete_button = (builder.get_object("theme-delete-button") as Gtk.Button);
this.theme_delete_button.clicked.connect(on_delete_theme_button_clicked);
@@ -298,7 +300,7 @@ public class PreferencesWindow : GLib.Object {
this.theme_delete_button.sensitive = false;
}
- if (!Deamon.disable_stack_switcher) {
+ if (!Daemon.disable_stack_switcher) {
this.stack.set_visible_child_full("2", Gtk.StackTransitionType.NONE);
} else {
this.notebook.set_current_page(1);
@@ -463,6 +465,27 @@ public class PreferencesWindow : GLib.Object {
}
/////////////////////////////////////////////////////////////////////
+ /// Reloads all themes.
+ /////////////////////////////////////////////////////////////////////
+
+ private void on_reload_theme_button_clicked(Gtk.Button button) {
+ Config.global.load_themes(Config.global.theme.name);
+ this.theme_list.reload();
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Opens the loaction of the them in the file browser.
+ /////////////////////////////////////////////////////////////////////
+
+ private void on_open_theme_button_clicked(Gtk.Button button) {
+ try{
+ GLib.AppInfo.launch_default_for_uri("file://" + Config.global.theme.directory, null);
+ } catch (Error e) {
+ warning(e.message);
+ }
+ }
+
+ /////////////////////////////////////////////////////////////////////
/// Shows or hides the indicator.
/////////////////////////////////////////////////////////////////////