[shotwell] Remove deprecated functions
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Remove deprecated functions
- Date: Sat, 22 Apr 2017 06:59:27 +0000 (UTC)
commit 0697b78bc32c409d49916d139e2cbb76e51da86f
Author: Jens Georg <mail jensge org>
Date: Sat Apr 22 08:47:43 2017 +0200
Remove deprecated functions
Signed-off-by: Jens Georg <mail jensge org>
src/CollectionPage.vala | 17 ++++++-----------
src/MediaPage.vala | 2 +-
src/Page.vala | 12 ------------
src/PhotoPage.vala | 2 +-
src/camera/ImportPage.vala | 4 ++--
src/events/EventPage.vala | 2 +-
src/events/EventsDirectoryPage.vala | 1 -
src/library/TrashPage.vala | 2 --
8 files changed, 11 insertions(+), 31 deletions(-)
---
diff --git a/src/CollectionPage.vala b/src/CollectionPage.vala
index 3434b13..15bab51 100644
--- a/src/CollectionPage.vala
+++ b/src/CollectionPage.vala
@@ -217,14 +217,10 @@ public abstract class CollectionPage : MediaPage {
protected override void init_actions(int selected_count, int count) {
base.init_actions(selected_count, count);
- set_action_short_label("RotateClockwise", Resources.ROTATE_CW_LABEL);
- set_action_short_label("RotateCounterclockwise", Resources.ROTATE_CCW_LABEL);
- set_action_short_label("Publish", Resources.PUBLISH_LABEL);
-
- set_action_important("RotateClockwise", true);
- set_action_important("RotateCounterclockwise", true);
- set_action_important("Enhance", true);
- set_action_important("Publish", true);
+ set_action_sensitive("RotateClockwise", true);
+ set_action_sensitive("RotateCounterclockwise", true);
+ set_action_sensitive("Enhance", true);
+ set_action_sensitive("Publish", true);
}
protected override void update_actions(int selected_count, int count) {
@@ -249,10 +245,9 @@ public abstract class CollectionPage : MediaPage {
// don't allow duplication of the selection if it contains a video -- videos are huge and
// and they're not editable anyway, so there seems to be no use case for duplicating them
set_action_sensitive("Duplicate", has_selected && (!selection_has_videos));
- set_action_visible("ExternalEdit", (!primary_is_video));
set_action_sensitive("ExternalEdit",
- one_selected && !is_string_empty(Config.Facade.get_instance().get_external_photo_app()));
- set_action_visible("ExternalEditRAW",
+ (!primary_is_video) && one_selected &&
!is_string_empty(Config.Facade.get_instance().get_external_photo_app()));
+ set_action_sensitive("ExternalEditRAW",
one_selected && (!primary_is_video)
&& ((Photo) get_view().get_selected_at(0).get_source()).get_master_file_format() ==
PhotoFileFormat.RAW
diff --git a/src/MediaPage.vala b/src/MediaPage.vala
index a2d5185..ad2adab 100644
--- a/src/MediaPage.vala
+++ b/src/MediaPage.vala
@@ -362,7 +362,7 @@ public abstract class MediaPage : CheckerboardPage {
if (DesktopIntegration.is_send_to_installed())
set_action_sensitive("SendTo", selected_count > 0);
else
- set_action_visible("SendTo", false);
+ set_action_sensitive("SendTo", false);
set_action_sensitive("Rate", selected_count > 0);
update_rating_sensitivities();
diff --git a/src/Page.vala b/src/Page.vala
index bdeee6b..cda204c 100644
--- a/src/Page.vala
+++ b/src/Page.vala
@@ -328,18 +328,6 @@ public abstract class Page : Gtk.ScrolledWindow {
action.set_enabled (sensitive);
}
- public void set_action_important(string name, bool important) {
- set_action_sensitive (name, important);
- }
-
- public void set_action_visible(string name, bool visible) {
- set_action_sensitive (name, visible);
- }
-
- public void set_action_short_label(string name, string short_label) {
- debug ("=> Set action short_label called for %s", name);
- }
-
public void set_action_details(string name, string? label, string? tooltip, bool sensitive) {
GLib.SimpleAction? action = get_action(name) as GLib.SimpleAction;
diff --git a/src/PhotoPage.vala b/src/PhotoPage.vala
index 9bed855..5c2a1de 100644
--- a/src/PhotoPage.vala
+++ b/src/PhotoPage.vala
@@ -2530,7 +2530,7 @@ public class LibraryPhotoPage : EditingHostPage {
update_flag_action();
- set_action_visible("ExternalEditRAW",
+ set_action_sensitive("ExternalEditRAW",
is_raw && Config.Facade.get_instance().get_external_raw_app() != "");
base.update_actions(selected_count, count);
diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala
index 4e055ec..f5e2b3a 100644
--- a/src/camera/ImportPage.vala
+++ b/src/camera/ImportPage.vala
@@ -917,8 +917,8 @@ public class ImportPage : CheckerboardPage {
protected override void init_actions(int selected_count, int count) {
on_view_changed();
- set_action_important("ImportSelected", true);
- set_action_important("ImportAll", true);
+ set_action_sensitive("ImportSelected", true);
+ set_action_sensitive("ImportAll", true);
base.init_actions(selected_count, count);
}
diff --git a/src/events/EventPage.vala b/src/events/EventPage.vala
index 960eee8..a482ab8 100644
--- a/src/events/EventPage.vala
+++ b/src/events/EventPage.vala
@@ -74,7 +74,7 @@ public class EventPage : CollectionPage {
set_action_sensitive("MakePrimary", selected_count == 1);
// hide this command in CollectionPage, as it does not apply here
- set_action_visible("CommonJumpToEvent", false);
+ set_action_sensitive("CommonJumpToEvent", false);
base.update_actions(selected_count, count);
diff --git a/src/events/EventsDirectoryPage.vala b/src/events/EventsDirectoryPage.vala
index 4650fd2..241abfe 100644
--- a/src/events/EventsDirectoryPage.vala
+++ b/src/events/EventsDirectoryPage.vala
@@ -139,7 +139,6 @@ public abstract class EventsDirectoryPage : CheckerboardPage {
protected override void update_actions(int selected_count, int count) {
set_action_sensitive("Merge", selected_count > 1);
- set_action_important("Merge", true);
set_action_sensitive("Rename", selected_count == 1);
set_action_sensitive("EditComment", selected_count == 1);
diff --git a/src/library/TrashPage.vala b/src/library/TrashPage.vala
index c06fbbf..35dee4e 100644
--- a/src/library/TrashPage.vala
+++ b/src/library/TrashPage.vala
@@ -73,9 +73,7 @@ public class TrashPage : CheckerboardPage {
bool has_selected = selected_count > 0;
set_action_sensitive("Delete", has_selected);
- set_action_important("Delete", true);
set_action_sensitive("Restore", has_selected);
- set_action_important("Restore", true);
set_common_action_important("CommonEmptyTrash", true);
base.update_actions(selected_count, count);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]