[gnome-photos] application, preview-view: Remove the draw action
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] application, preview-view: Remove the draw action
- Date: Tue, 24 Jan 2017 18:49:31 +0000 (UTC)
commit f48f7e1f2f1ebc64a0389441a23f20cfe2ddb667
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Jan 24 19:48:33 2017 +0100
application, preview-view: Remove the draw action
PhotosImageView can now detect changes in the output of a GeglNode.
PhotosTool sub-classes that do their own drawing are now responsible
for queuing a redraw whenever the widget needs to be updated.
Therefore, there is no need to queue redraws from disparate sections of
the code.
src/photos-application.c | 9 ---------
src/photos-preview-view.c | 19 -------------------
2 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index c69832a..43d1896 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -78,7 +78,6 @@ struct _PhotosApplication
GSimpleAction *crop_action;
GSimpleAction *delete_action;
GSimpleAction *denoise_action;
- GSimpleAction *draw_action;
GSimpleAction *edit_action;
GSimpleAction *edit_cancel_action;
GSimpleAction *edit_done_action;
@@ -397,10 +396,6 @@ photos_application_actions_update (PhotosApplication *self)
&& mode == PHOTOS_WINDOW_MODE_PREVIEW
&& photos_base_item_can_edit (item));
g_simple_action_set_enabled (self->edit_action, enable);
-
- enable = ((load_state == PHOTOS_LOAD_STATE_FINISHED && mode == PHOTOS_WINDOW_MODE_PREVIEW)
- || mode == PHOTOS_WINDOW_MODE_EDIT);
- g_simple_action_set_enabled (self->draw_action, enable);
}
@@ -1709,9 +1704,6 @@ photos_application_startup (GApplication *application)
self->denoise_action = g_simple_action_new ("denoise-current", G_VARIANT_TYPE_UINT16);
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (self->denoise_action));
- self->draw_action = g_simple_action_new ("draw-current", NULL);
- g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (self->draw_action));
-
self->edit_cancel_action = g_simple_action_new ("edit-cancel", NULL);
g_signal_connect_swapped (self->edit_cancel_action,
"activate",
@@ -1894,7 +1886,6 @@ photos_application_dispose (GObject *object)
g_clear_object (&self->crop_action);
g_clear_object (&self->delete_action);
g_clear_object (&self->denoise_action);
- g_clear_object (&self->draw_action);
g_clear_object (&self->edit_action);
g_clear_object (&self->edit_cancel_action);
g_clear_object (&self->edit_done_action);
diff --git a/src/photos-preview-view.c b/src/photos-preview-view.c
index 767ed76..ecefcbe 100644
--- a/src/photos-preview-view.c
+++ b/src/photos-preview-view.c
@@ -44,7 +44,6 @@
struct _PhotosPreviewView
{
GtkBin parent_instance;
- GAction *draw;
GCancellable *cancellable;
GeglNode *node;
GtkWidget *overlay;
@@ -397,18 +396,6 @@ photos_preview_view_denoise (PhotosPreviewView *self, GVariant *parameter)
static void
-photos_preview_view_draw (PhotosPreviewView *self)
-{
- GtkWidget *view;
- GtkWidget *view_container;
-
- view_container = gtk_stack_get_visible_child (GTK_STACK (self->stack));
- view = photos_preview_view_get_view_from_view_container (view_container);
- gtk_widget_queue_draw (view);
-}
-
-
-static void
photos_preview_view_insta (PhotosPreviewView *self, GVariant *parameter)
{
PhotosBaseItem *item;
@@ -480,8 +467,6 @@ photos_preview_view_tool_activated (PhotosTool *tool, gpointer user_data)
self->current_tool = tool;
g_object_add_weak_pointer (G_OBJECT (self->current_tool), (gpointer *) &self->current_tool);
-
- g_action_activate (self->draw, NULL);
}
@@ -502,7 +487,6 @@ photos_preview_view_tool_changed (PhotosPreviewView *self, PhotosTool *tool)
if (tool == NULL)
{
self->current_tool = NULL;
- g_action_activate (self->draw, NULL);
}
else
{
@@ -739,9 +723,6 @@ photos_preview_view_init (PhotosPreviewView *self)
action = g_action_map_lookup_action (G_ACTION_MAP (app), "denoise-current");
g_signal_connect_object (action, "activate", G_CALLBACK (photos_preview_view_denoise), self,
G_CONNECT_SWAPPED);
- self->draw = g_action_map_lookup_action (G_ACTION_MAP (app), "draw-current");
- g_signal_connect_object (self->draw, "activate", G_CALLBACK (photos_preview_view_draw), self,
G_CONNECT_SWAPPED);
-
action = g_action_map_lookup_action (G_ACTION_MAP (app), "edit-done");
g_signal_connect_object (action, "activate", G_CALLBACK (photos_preview_view_edit_done), self,
G_CONNECT_SWAPPED);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]