summaryrefslogtreecommitdiff
path: root/src/Page.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-22 06:40:44 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-22 06:40:44 +0100
commit8e1c5a834469d804d28ee8ab2cbe2da8e600a789 (patch)
treeb9771456583eaead893cfd8f02e680b58a3da970 /src/Page.vala
parent80a5f2d8b095e895a5424f90b2ce4684d94c1a32 (diff)
parent3253d99365813f2d2ffd05e10cbb8c11f53d746e (diff)
Merge tag 'upstream/0.26.0'
Upstream version 0.26.0
Diffstat (limited to 'src/Page.vala')
-rw-r--r--src/Page.vala20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/Page.vala b/src/Page.vala
index 06454d8..bdeee6b 100644
--- a/src/Page.vala
+++ b/src/Page.vala
@@ -268,7 +268,11 @@ public abstract class Page : Gtk.ScrolledWindow {
public virtual void switching_from() {
in_view = false;
- remove_actions(AppWindow.get_instance());
+ //remove_actions(AppWindow.get_instance());
+ var map = get_container() as GLib.ActionMap;
+ if (map != null) {
+ remove_actions(map);
+ }
if (toolbar_path != null)
toolbar = null;
}
@@ -276,7 +280,10 @@ public abstract class Page : Gtk.ScrolledWindow {
public virtual void switched_to() {
in_view = true;
add_ui();
- add_actions(AppWindow.get_instance());
+ var map = get_container() as GLib.ActionMap;
+ if (map != null) {
+ add_actions(map);
+ }
int selected_count = get_view().get_selected_count();
int count = get_view().get_count();
init_actions(selected_count, count);
@@ -563,13 +570,12 @@ public abstract class Page : Gtk.ScrolledWindow {
}
private void init_load_ui(string ui_filename) {
- File ui_file = Resources.get_ui(ui_filename);
-
+ var ui_resource = Resources.get_ui(ui_filename);
try {
- builder.add_from_file(ui_file.get_path());
+ builder.add_from_resource(ui_resource);
} catch (Error err) {
- AppWindow.error_message("Error loading UI file %s: %s".printf(
- ui_file.get_path(), err.message));
+ AppWindow.error_message("Error loading UI resource %s: %s".printf(
+ ui_resource, err.message));
Application.get_instance().panic();
}
}