[gedit] view-frame: remove useless property



commit a4b47d1349436f24e9cca6e55dd34354ef0794b7
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jun 26 13:55:20 2015 +0200

    view-frame: remove useless property
    
    The property wasn't used. The property was just readable. The getter
    function is used instead.
    
    Creating a property makes sense when we need to set its value at
    object construction time. Or when we need to listen to the notify
    signal. Here the property was not really useful.

 gedit/gedit-view-frame.c |   35 -----------------------------------
 1 files changed, 0 insertions(+), 35 deletions(-)
---
diff --git a/gedit/gedit-view-frame.c b/gedit/gedit-view-frame.c
index 3f64e61..91340ba 100644
--- a/gedit/gedit-view-frame.c
+++ b/gedit/gedit-view-frame.c
@@ -100,12 +100,6 @@ struct _GeditViewFrame
        gchar *old_search_text;
 };
 
-enum
-{
-       PROP_0,
-       PROP_VIEW
-};
-
 G_DEFINE_TYPE (GeditViewFrame, gedit_view_frame, GTK_TYPE_OVERLAY)
 
 static GeditDocument *
@@ -175,26 +169,6 @@ gedit_view_frame_finalize (GObject *object)
 }
 
 static void
-gedit_view_frame_get_property (GObject    *object,
-                               guint       prop_id,
-                               GValue     *value,
-                               GParamSpec *pspec)
-{
-       GeditViewFrame *frame = GEDIT_VIEW_FRAME (object);
-
-       switch (prop_id)
-       {
-               case PROP_VIEW:
-                       g_value_set_object (value, gedit_view_frame_get_view (frame));
-                       break;
-
-               default:
-                       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-                       break;
-       }
-}
-
-static void
 hide_search_widget (GeditViewFrame *frame,
                     gboolean        cancel)
 {
@@ -1442,15 +1416,6 @@ gedit_view_frame_class_init (GeditViewFrameClass *klass)
 
        object_class->dispose = gedit_view_frame_dispose;
        object_class->finalize = gedit_view_frame_finalize;
-       object_class->get_property = gedit_view_frame_get_property;
-
-       g_object_class_install_property (object_class, PROP_VIEW,
-                                        g_param_spec_object ("view",
-                                                             "View",
-                                                             "The View",
-                                                             GEDIT_TYPE_VIEW,
-                                                             G_PARAM_READABLE |
-                                                             G_PARAM_STATIC_STRINGS));
 
        /* Bind class to template */
        gtk_widget_class_set_template_from_resource (widget_class,


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