[shotwell/wip/dedeprecate: 37/38] WIP
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/wip/dedeprecate: 37/38] WIP
- Date: Wed, 2 Nov 2016 19:59:41 +0000 (UTC)
commit f1ba07a4f77bd74d0de039103c7f6c775e98eddf
Author: Jens Georg <mail jensge org>
Date: Tue Nov 1 21:47:54 2016 +0100
WIP
src/AppWindow.vala | 2 ++
src/library/LibraryWindow.vala | 10 ++++++++++
ui/direct.ui | 12 ++++++------
ui/events_directory.ui | 12 ++++++------
ui/import.ui | 10 +++++-----
ui/import_queue.ui | 6 +++---
ui/media.ui | 10 +++++-----
ui/offline.ui | 10 +++++-----
ui/photo.ui | 12 ++++++------
ui/trash.ui | 10 +++++-----
10 files changed, 53 insertions(+), 41 deletions(-)
---
diff --git a/src/AppWindow.vala b/src/AppWindow.vala
index 5b2d844..4cc5c41 100644
--- a/src/AppWindow.vala
+++ b/src/AppWindow.vala
@@ -449,6 +449,8 @@ public abstract class AppWindow : PageWindow {
// UIManager. In order to activate those accelerators, we need to create a dummy UI string
// that lists all the common actions. We build it on-the-fly from the actions associated
// with each ActionGroup while we're adding the groups to the UIManager.
+
+ add_actions ();
#if 0
common_action_groups = create_common_action_groups();
foreach (Gtk.ActionGroup group in common_action_groups)
diff --git a/src/library/LibraryWindow.vala b/src/library/LibraryWindow.vala
index e87be64..0dcca0a 100644
--- a/src/library/LibraryWindow.vala
+++ b/src/library/LibraryWindow.vala
@@ -277,6 +277,16 @@ public class LibraryWindow : AppWindow {
monitor.auto_import_preparing.disconnect(on_library_monitor_auto_import_preparing);
monitor.auto_import_progress.disconnect(on_library_monitor_auto_import_progress);
}
+
+ private const GLib.ActionEntry[] common_actions {
+ { "CommonFileImport", on_file_import },
+ { "ExternalLibraryImport", on_external_library_import },
+ { "CommonPreferences", on_preferences },
+ { "CommonEmptyTrash", on_empty_trash },
+ { "CommonJumpToEvent", on_jump_to_event },
+ { "CommonFind", on_find },
+ { "CommonNewSearch", on_new_search },
+ };
private Gtk.ActionEntry[] create_common_actions() {
Gtk.ActionEntry[] actions = new Gtk.ActionEntry[0];
diff --git a/ui/direct.ui b/ui/direct.ui
index d0bdaf8..b7a1c07 100644
--- a/ui/direct.ui
+++ b/ui/direct.ui
@@ -46,12 +46,12 @@
<item>
<attribute name="label" translatable="yes">_Undo</attribute>
<attribute name="accel"><Primary>z</attribute>
- <attribute name="action">CommonUndo</attribute>
+ <attribute name="action">win.CommonUndo</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Redo</attribute>
<attribute name="accel"><Primary><Shift>z</attribute>
- <attribute name="action">CommonRedo</attribute>
+ <attribute name="action">win.CommonRedo</attribute>
</item>
</section>
</submenu>
@@ -61,7 +61,7 @@
<item>
<attribute name="label" translatable="yes">Fulls_creen</attribute>
<attribute name="accel">F11</attribute>
- <attribute name="action">CommonFullscreen</attribute>
+ <attribute name="action">win.CommonFullscreen</attribute>
</item>
</section>
<section>
@@ -175,15 +175,15 @@
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="accel">F1</attribute>
- <attribute name="action">CommonHelpContents</attribute>
+ <attribute name="action">win.CommonHelpContents</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Frequently Asked Questions</attribute>
- <attribute name="action">CommonHelpFAQ</attribute>
+ <attribute name="action">win.CommonHelpFAQ</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Report a Problem…</attribute>
- <attribute name="action">CommonHelpReportProblem</attribute>
+ <attribute name="action">win.CommonHelpReportProblem</attribute>
</item>
</section>
<section>
diff --git a/ui/events_directory.ui b/ui/events_directory.ui
index 68ccb91..ff05238 100644
--- a/ui/events_directory.ui
+++ b/ui/events_directory.ui
@@ -34,12 +34,12 @@
<item>
<attribute name="label" translatable="yes">_Undo</attribute>
<attribute name="accel"><Primary>z</attribute>
- <attribute name="action">CommonUndo</attribute>
+ <attribute name="action">win.CommonUndo</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Redo</attribute>
<attribute name="accel"><Primary><Shift>z</attribute>
- <attribute name="action">CommonRedo</attribute>
+ <attribute name="action">win.CommonRedo</attribute>
</item>
</section>
<section>
@@ -122,7 +122,7 @@
<item>
<attribute name="label" translatable="yes">Fulls_creen</attribute>
<attribute name="accel">F11</attribute>
- <attribute name="action">CommonFullscreen</attribute>
+ <attribute name="action">win.CommonFullscreen</attribute>
</item>
</section>
</submenu>
@@ -150,15 +150,15 @@
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="accel">F1</attribute>
- <attribute name="action">CommonHelpContents</attribute>
+ <attribute name="action">win.CommonHelpContents</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Frequently Asked Questions</attribute>
- <attribute name="action">CommonHelpFAQ</attribute>
+ <attribute name="action">win.CommonHelpFAQ</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Report a Problem…</attribute>
- <attribute name="action">CommonHelpReportProblem</attribute>
+ <attribute name="action">win.CommonHelpReportProblem</attribute>
</item>
</section>
<section>
diff --git a/ui/import.ui b/ui/import.ui
index fc63675..9a67910 100644
--- a/ui/import.ui
+++ b/ui/import.ui
@@ -42,12 +42,12 @@
<item>
<attribute name="label" translatable="yes">_Undo</attribute>
<attribute name="accel"><Primary>z</attribute>
- <attribute name="action">CommonUndo</attribute>
+ <attribute name="action">win.CommonUndo</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Redo</attribute>
<attribute name="accel"><Primary><Shift>z</attribute>
- <attribute name="action">CommonRedo</attribute>
+ <attribute name="action">win.CommonRedo</attribute>
</item>
</section>
<section>
@@ -183,15 +183,15 @@
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="accel">F1</attribute>
- <attribute name="action">CommonHelpContents</attribute>
+ <attribute name="action">win.CommonHelpContents</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Frequently Asked Questions</attribute>
- <attribute name="action">CommonHelpFAQ</attribute>
+ <attribute name="action">win.CommonHelpFAQ</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Report a Problem…</attribute>
- <attribute name="action">CommonHelpReportProblem</attribute>
+ <attribute name="action">win.CommonHelpReportProblem</attribute>
</item>
</section>
<section>
diff --git a/ui/import_queue.ui b/ui/import_queue.ui
index af093f5..ce096da 100644
--- a/ui/import_queue.ui
+++ b/ui/import_queue.ui
@@ -65,15 +65,15 @@
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="accel">F1</attribute>
- <attribute name="action">CommonHelpContents</attribute>
+ <attribute name="action">win.CommonHelpContents</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Frequently Asked Questions</attribute>
- <attribute name="action">CommonHelpFAQ</attribute>
+ <attribute name="action">win.CommonHelpFAQ</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Report a Problem…</attribute>
- <attribute name="action">CommonHelpReportProblem</attribute>
+ <attribute name="action">win.CommonHelpReportProblem</attribute>
</item>
</section>
<section>
diff --git a/ui/media.ui b/ui/media.ui
index afdb665..1348936 100644
--- a/ui/media.ui
+++ b/ui/media.ui
@@ -49,12 +49,12 @@
<item>
<attribute name="label" translatable="yes">_Undo</attribute>
<attribute name="accel"><Primary>z</attribute>
- <attribute name="action">CommonUndo</attribute>
+ <attribute name="action">win.CommonUndo</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Redo</attribute>
<attribute name="accel"><Primary><Shift>z</attribute>
- <attribute name="action">CommonRedo</attribute>
+ <attribute name="action">win.CommonRedo</attribute>
</item>
</section>
<section>
@@ -393,15 +393,15 @@
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="accel">F1</attribute>
- <attribute name="action">CommonHelpContents</attribute>
+ <attribute name="action">win.CommonHelpContents</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Frequently Asked Questions</attribute>
- <attribute name="action">CommonHelpFAQ</attribute>
+ <attribute name="action">win.CommonHelpFAQ</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Report a Problem…</attribute>
- <attribute name="action">CommonHelpReportProblem</attribute>
+ <attribute name="action">win.CommonHelpReportProblem</attribute>
</item>
</section>
<section>
diff --git a/ui/offline.ui b/ui/offline.ui
index 719c37f..1ea5a4b 100644
--- a/ui/offline.ui
+++ b/ui/offline.ui
@@ -34,12 +34,12 @@
<item>
<attribute name="label" translatable="yes">_Undo</attribute>
<attribute name="accel"><Primary>z</attribute>
- <attribute name="action">CommonUndo</attribute>
+ <attribute name="action">win.CommonUndo</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Redo</attribute>
<attribute name="accel"><Primary><Shift>z</attribute>
- <attribute name="action">CommonRedo</attribute>
+ <attribute name="action">win.CommonRedo</attribute>
</item>
</section>
<section>
@@ -180,15 +180,15 @@
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="accel">F1</attribute>
- <attribute name="action">CommonHelpContents</attribute>
+ <attribute name="action">win.CommonHelpContents</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Frequently Asked Questions</attribute>
- <attribute name="action">CommonHelpFAQ</attribute>
+ <attribute name="action">win.CommonHelpFAQ</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Report a Problem…</attribute>
- <attribute name="action">CommonHelpReportProblem</attribute>
+ <attribute name="action">win.CommonHelpReportProblem</attribute>
</item>
</section>
<section>
diff --git a/ui/photo.ui b/ui/photo.ui
index 19b2026..4e9ec9e 100644
--- a/ui/photo.ui
+++ b/ui/photo.ui
@@ -57,12 +57,12 @@
<item>
<attribute name="label" translatable="yes">_Undo</attribute>
<attribute name="accel"><Primary>z</attribute>
- <attribute name="action">CommonUndo</attribute>
+ <attribute name="action">win.CommonUndo</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Redo</attribute>
<attribute name="accel"><Primary><Shift>z</attribute>
- <attribute name="action">CommonRedo</attribute>
+ <attribute name="action">win.CommonRedo</attribute>
</item>
</section>
<section>
@@ -170,7 +170,7 @@
<item>
<attribute name="label" translatable="yes">Fulls_creen</attribute>
<attribute name="accel">F11</attribute>
- <attribute name="action">CommonFullscreen</attribute>
+ <attribute name="action">win.CommonFullscreen</attribute>
</item>
</section>
<section>
@@ -382,15 +382,15 @@
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="accel">F1</attribute>
- <attribute name="action">CommonHelpContents</attribute>
+ <attribute name="action">win.CommonHelpContents</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Frequently Asked Questions</attribute>
- <attribute name="action">CommonHelpFAQ</attribute>
+ <attribute name="action">win.CommonHelpFAQ</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Report a Problem…</attribute>
- <attribute name="action">CommonHelpReportProblem</attribute>
+ <attribute name="action">win.CommonHelpReportProblem</attribute>
</item>
</section>
<section>
diff --git a/ui/trash.ui b/ui/trash.ui
index 21a2462..0ed7880 100644
--- a/ui/trash.ui
+++ b/ui/trash.ui
@@ -39,12 +39,12 @@
<item>
<attribute name="label" translatable="yes">_Undo</attribute>
<attribute name="accel"><Primary>z</attribute>
- <attribute name="action">CommonUndo</attribute>
+ <attribute name="action">win.CommonUndo</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Redo</attribute>
<attribute name="accel"><Primary><Shift>z</attribute>
- <attribute name="action">CommonRedo</attribute>
+ <attribute name="action">win.CommonRedo</attribute>
</item>
</section>
<section>
@@ -189,15 +189,15 @@
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="accel">F1</attribute>
- <attribute name="action">CommonHelpContents</attribute>
+ <attribute name="action">win.CommonHelpContents</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Frequently Asked Questions</attribute>
- <attribute name="action">CommonHelpFAQ</attribute>
+ <attribute name="action">win.CommonHelpFAQ</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Report a Problem…</attribute>
- <attribute name="action">CommonHelpReportProblem</attribute>
+ <attribute name="action">win.CommonHelpReportProblem</attribute>
</item>
</section>
<section>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]