[gnome-photos/wip/jimmac/preview-shading: 14/15] Remove WidgetShader



commit 51ca81f324cd8af6f54ea2a68f5ec2c2b83cfd1e
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Dec 13 16:46:27 2018 +0100

    Remove WidgetShader

 src/Makefile.am                 |   2 -
 src/meson.build                 |   1 -
 src/photos-tool-filter-button.c |   7 --
 src/photos-widget-shader.c      | 220 ----------------------------------------
 src/photos-widget-shader.h      |  36 -------
 5 files changed, 266 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 744249e9..6e1969fe 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -336,8 +336,6 @@ gnome_photos_SOURCES = \
        photos-utils.h \
        photos-view-container.c \
        photos-view-container.h \
-       photos-widget-shader.c \
-       photos-widget-shader.h \
        photos-zoom-controls.c \
        photos-zoom-controls.h \
        photos-main.c \
diff --git a/src/meson.build b/src/meson.build
index 645b1d73..1ce52d06 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -219,7 +219,6 @@ sources = common_sources + files(
   'photos-update-mtime-job.c',
   'photos-utils.c',
   'photos-view-container.c',
-  'photos-widget-shader.c',
   'photos-zoom-controls.c',
   'photos-main.c',
 )
diff --git a/src/photos-tool-filter-button.c b/src/photos-tool-filter-button.c
index 11bf21bb..0aeda23f 100644
--- a/src/photos-tool-filter-button.c
+++ b/src/photos-tool-filter-button.c
@@ -26,7 +26,6 @@
 #include "photos-application.h"
 #include "photos-tool-filter-button.h"
 #include "photos-utils.h"
-#include "photos-widget-shader.h"
 
 
 struct _PhotosToolFilterButton
@@ -107,7 +106,6 @@ photos_tool_filter_button_constructed (GObject *object)
   GApplication *app;
   g_autoptr (GdkPixbuf) preview_icon = NULL;
   GtkWidget *image;
-  PhotosWidgetShader *shader;
   cairo_surface_t *preview_icon_surface = NULL; /* TODO: use g_autoptr */
   gint scale;
 
@@ -121,7 +119,6 @@ photos_tool_filter_button_constructed (GObject *object)
 
   image = gtk_image_new_from_surface (preview_icon_surface);
   gtk_container_add (GTK_CONTAINER (self->overlay), image);
-  shader = photos_widget_shader_new (image);
   gtk_widget_show (image);
 
   self->button = gtk_radio_button_new_with_label_from_widget (self->group, self->label);
@@ -131,7 +128,6 @@ photos_tool_filter_button_constructed (GObject *object)
   gtk_button_set_relief (GTK_BUTTON (self->button), GTK_RELIEF_NONE);
   gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (self->button), FALSE);
   gtk_container_add (GTK_CONTAINER (self), self->button);
-  g_object_bind_property (self->button, "active", shader, "active", G_BINDING_SYNC_CREATE);
   g_signal_connect_swapped (self->button, "toggled", G_CALLBACK (photos_tool_filter_button_toggled), self);
   photos_tool_filter_button_toggled (self);
 
@@ -303,7 +299,6 @@ photos_tool_filter_button_set_active (PhotosToolFilterButton *self, gboolean is_
 void
 photos_tool_filter_button_set_image (PhotosToolFilterButton *self, GtkWidget *image)
 {
-  PhotosWidgetShader *shader;
   GtkWidget *old_image;
 
   old_image = gtk_bin_get_child (GTK_BIN (self->overlay));
@@ -312,7 +307,5 @@ photos_tool_filter_button_set_image (PhotosToolFilterButton *self, GtkWidget *im
 
   gtk_widget_destroy (old_image);
   gtk_container_add (GTK_CONTAINER (self->overlay), image);
-  shader = photos_widget_shader_new (image);
-  g_object_bind_property (self->button, "active", shader, "active", G_BINDING_SYNC_CREATE);
   gtk_widget_show (image);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]