diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-11-04 08:56:36 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-11-04 08:56:36 +0100 |
commit | 33ca80da0e3dffe7af9cadbd911bb3a3ebf9c221 (patch) | |
tree | af327ebb4863c7dedd7dfd652c47e61ffa68ab19 /src/gui | |
parent | 7390c07caf75c9b3d04748bf46477fa572ae267c (diff) | |
parent | f8726defb71d6b1777a38887524adc99638f0d09 (diff) |
Merge tag 'upstream/0.6.8'
Upstream version 0.6.8
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/aboutWindow.vala | 2 | ||||
-rw-r--r-- | src/gui/preferencesWindow.vala | 29 | ||||
-rw-r--r-- | src/gui/themeList.vala | 1 |
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); } } } |