[gnome-todo] task-list-view: Remove show/hide new task row API



commit 6df5763d9907b0dd56739c1f91bec17dc3c2cd0f
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat May 8 11:19:19 2021 -0300

    task-list-view: Remove show/hide new task row API
    
    Also unused, and will get in the way for the list view port.

 src/gui/gtd-task-list-view.c | 58 --------------------------------------------
 src/gui/gtd-task-list-view.h |  5 ----
 2 files changed, 63 deletions(-)
---
diff --git a/src/gui/gtd-task-list-view.c b/src/gui/gtd-task-list-view.c
index 88debff8..d521f6f6 100644
--- a/src/gui/gtd-task-list-view.c
+++ b/src/gui/gtd-task-list-view.c
@@ -57,9 +57,6 @@
  *
  * gtd_task_list_view_set_model (view, model);
  *
- * // Hide the '+ New task' row
- * gtd_task_list_view_set_show_new_task_row (view, FALSE);
- *
  * // Date which tasks will be automatically assigned
  * gtd_task_list_view_set_default_date (view, now);
  * ]|
@@ -183,7 +180,6 @@ enum {
   PROP_0,
   PROP_SHOW_LIST_NAME,
   PROP_SHOW_DUE_DATE,
-  PROP_SHOW_NEW_TASK_ROW,
   LAST_PROP
 };
 
@@ -952,10 +948,6 @@ gtd_task_list_view_get_property (GObject    *object,
       g_value_set_boolean (value, self->priv->show_list_name);
       break;
 
-    case PROP_SHOW_NEW_TASK_ROW:
-      g_value_set_boolean (value, gtk_widget_get_visible (GTK_WIDGET (self->priv->new_task_row)));
-      break;
-
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
     }
@@ -979,10 +971,6 @@ gtd_task_list_view_set_property (GObject      *object,
       gtd_task_list_view_set_show_list_name (self, g_value_get_boolean (value));
       break;
 
-    case PROP_SHOW_NEW_TASK_ROW:
-      gtd_task_list_view_set_show_new_task_row (self, g_value_get_boolean (value));
-      break;
-
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
     }
@@ -1048,20 +1036,6 @@ gtd_task_list_view_class_init (GtdTaskListViewClass *klass)
   g_type_ensure (GTD_TYPE_TASK_ROW);
   g_type_ensure (GTD_TYPE_EMPTY_LIST_WIDGET);
 
-  /**
-   * GtdTaskListView::show-new-task-row:
-   *
-   * Whether the list shows the "New Task" row or not.
-   */
-  g_object_class_install_property (
-        object_class,
-        PROP_SHOW_NEW_TASK_ROW,
-        g_param_spec_boolean ("show-new-task-row",
-                              "Whether it shows the New Task row",
-                              "Whether the list shows the New Task row, or not",
-                              TRUE,
-                              G_PARAM_READWRITE));
-
   /**
    * GtdTaskListView::show-list-name:
    *
@@ -1153,38 +1127,6 @@ gtd_task_list_view_new (void)
   return g_object_new (GTD_TYPE_TASK_LIST_VIEW, NULL);
 }
 
-/**
- * gtd_task_list_view_get_show_new_task_row:
- * @view: a #GtdTaskListView
- *
- * Gets whether @view shows the new task row or not.
- *
- * Returns: %TRUE if @view is shows the new task row, %FALSE otherwise
- */
-gboolean
-gtd_task_list_view_get_show_new_task_row (GtdTaskListView *self)
-{
-  g_return_val_if_fail (GTD_IS_TASK_LIST_VIEW (self), FALSE);
-
-  return gtk_widget_get_visible (GTK_WIDGET (self->priv->new_task_row));
-}
-
-/**
- * gtd_task_list_view_set_show_new_task_row:
- * @view: a #GtdTaskListView
- *
- * Sets the #GtdTaskListView:show-new-task-mode property of @view.
- */
-void
-gtd_task_list_view_set_show_new_task_row (GtdTaskListView *view,
-                                          gboolean         show_new_task_row)
-{
-  g_return_if_fail (GTD_IS_TASK_LIST_VIEW (view));
-
-  gtk_widget_set_visible (GTK_WIDGET (view->priv->new_task_row), show_new_task_row);
-  g_object_notify (G_OBJECT (view), "show-new-task-row");
-}
-
 /**
  * gtd_task_list_view_get_model:
  * @view: a #GtdTaskListView
diff --git a/src/gui/gtd-task-list-view.h b/src/gui/gtd-task-list-view.h
index 6ec237ab..bb863dc8 100644
--- a/src/gui/gtd-task-list-view.h
+++ b/src/gui/gtd-task-list-view.h
@@ -63,11 +63,6 @@ void                      gtd_task_list_view_set_header_func    (GtdTaskListView
                                                                  GtdTaskListViewHeaderFunc  func,
                                                                  gpointer                   user_data);
 
-gboolean                  gtd_task_list_view_get_show_new_task_row (GtdTaskListView        *view);
-
-void                      gtd_task_list_view_set_show_new_task_row (GtdTaskListView        *view,
-                                                                    gboolean                
show_new_task_row);
-
 GDateTime*                gtd_task_list_view_get_default_date   (GtdTaskListView        *self);
 
 void                      gtd_task_list_view_set_default_date   (GtdTaskListView        *self,


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