[gnome-photos] embed, main-toolbar: Remove unused code



commit 1b213584435c1473ae626cf5ff83621d657afe62
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Sep 3 01:00:29 2017 +0200

    embed, main-toolbar: Remove unused code
    
    Fallout from ad0bab7c194f21b09b4d711a0aa2d9e3a68997b2

 src/photos-embed.c        |    2 +-
 src/photos-main-toolbar.c |   38 ++------------------------------------
 src/photos-main-toolbar.h |    2 +-
 3 files changed, 4 insertions(+), 38 deletions(-)
---
diff --git a/src/photos-embed.c b/src/photos-embed.c
index 57bca3c..216ffb9 100644
--- a/src/photos-embed.c
+++ b/src/photos-embed.c
@@ -711,7 +711,7 @@ photos_embed_init (PhotosEmbed *self)
 
   self->extension_point = g_io_extension_point_lookup (PHOTOS_TRACKER_CONTROLLER_EXTENSION_POINT_NAME);
 
-  self->toolbar = photos_main_toolbar_new (GTK_OVERLAY (self->stack_overlay));
+  self->toolbar = photos_main_toolbar_new ();
   photos_main_toolbar_set_stack (PHOTOS_MAIN_TOOLBAR (self->toolbar), GTK_STACK (self->stack));
   windows = gtk_application_get_windows (GTK_APPLICATION (app));
   gtk_window_set_titlebar (GTK_WINDOW (windows->data), self->toolbar);
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index 55f4be0..10fce3f 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -50,7 +50,6 @@ struct _PhotosMainToolbar
   GSimpleAction *gear_menu;
   GtkWidget *favorite_button;
   GtkWidget *header_bar;
-  GtkWidget *overlay;
   GtkWidget *remote_display_button;
   GtkWidget *searchbar;
   GtkWidget *selection_menu;
@@ -60,12 +59,6 @@ struct _PhotosMainToolbar
   PhotosSelectionController *sel_cntrlr;
 };
 
-enum
-{
-  PROP_0,
-  PROP_OVERLAY
-};
-
 
 G_DEFINE_TYPE (PhotosMainToolbar, photos_main_toolbar, GTK_TYPE_BOX);
 
@@ -575,24 +568,6 @@ photos_main_toolbar_dispose (GObject *object)
 
 
 static void
-photos_main_toolbar_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
-  PhotosMainToolbar *self = PHOTOS_MAIN_TOOLBAR (object);
-
-  switch (prop_id)
-    {
-    case PROP_OVERLAY:
-      self->overlay = GTK_WIDGET (g_value_dup_object (value));
-      break;
-
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-
-static void
 photos_main_toolbar_share_changed_cb (PhotosMainToolbar          *self,
                                       PhotosDlnaRenderer         *renderer,
                                       PhotosBaseItem             *item,
@@ -679,15 +654,6 @@ photos_main_toolbar_class_init (PhotosMainToolbarClass *class)
 
   object_class->constructed = photos_main_toolbar_constructed;
   object_class->dispose = photos_main_toolbar_dispose;
-  object_class->set_property = photos_main_toolbar_set_property;
-
-  g_object_class_install_property (object_class,
-                                   PROP_OVERLAY,
-                                   g_param_spec_object ("overlay",
-                                                        "GtkOverlay object",
-                                                        "The stack overlay widget",
-                                                        GTK_TYPE_OVERLAY,
-                                                        G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
 
   gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Photos/main-toolbar.ui");
   gtk_widget_class_bind_template_child (widget_class, PhotosMainToolbar, header_bar);
@@ -696,9 +662,9 @@ photos_main_toolbar_class_init (PhotosMainToolbarClass *class)
 
 
 GtkWidget *
-photos_main_toolbar_new (GtkOverlay *overlay)
+photos_main_toolbar_new (void)
 {
-  return g_object_new (PHOTOS_TYPE_MAIN_TOOLBAR, "overlay", overlay, NULL);
+  return g_object_new (PHOTOS_TYPE_MAIN_TOOLBAR, NULL);
 }
 
 
diff --git a/src/photos-main-toolbar.h b/src/photos-main-toolbar.h
index f5a0319..11ce4b9 100644
--- a/src/photos-main-toolbar.h
+++ b/src/photos-main-toolbar.h
@@ -34,7 +34,7 @@ G_BEGIN_DECLS
 #define PHOTOS_TYPE_MAIN_TOOLBAR (photos_main_toolbar_get_type ())
 G_DECLARE_FINAL_TYPE (PhotosMainToolbar, photos_main_toolbar, PHOTOS, MAIN_TOOLBAR, GtkBox);
 
-GtkWidget             *photos_main_toolbar_new                    (GtkOverlay *overlay);
+GtkWidget             *photos_main_toolbar_new                    (void);
 
 PhotosSearchbar *      photos_main_toolbar_get_searchbar          (PhotosMainToolbar *self);
 


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