summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/aboutWindow.vala2
-rw-r--r--src/gui/preferencesWindow.vala29
-rw-r--r--src/gui/themeList.vala1
3 files changed, 28 insertions, 4 deletions
diff --git a/src/gui/aboutWindow.vala b/src/gui/aboutWindow.vala
index fd38c8c..73fb1be 100644
--- a/src/gui/aboutWindow.vala
+++ b/src/gui/aboutWindow.vala
@@ -76,7 +76,7 @@ public class AboutWindow: Gtk.AboutDialog {
logo_icon_name: "gnome-pie",
website: "http://simmesimme.github.io/gnome-pie.html",
website_label: "Homepage",
- version: Deamon.version
+ version: Daemon.version
);
}
}
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.
/////////////////////////////////////////////////////////////////////
diff --git a/src/gui/themeList.vala b/src/gui/themeList.vala
index e6ecb3c..786c305 100644
--- a/src/gui/themeList.vala
+++ b/src/gui/themeList.vala
@@ -109,6 +109,7 @@ class ThemeList : Gtk.TreeView {
+ "</i></span>");
if(theme == Config.global.theme) {
get_selection().select_iter(current);
+ this.scroll_to_cell(get_selection().get_selected_rows(null).nth_data(0), null, true, 0.5f, 0.5f);
}
}
}