[gnome-notes] window-base: Remove unused code



commit 7d3d53e7e3e7b161e012e9d10e5d11bf4925ea4c
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Mon May 17 21:42:24 2021 +0530

    window-base: Remove unused code

 src/bjb-window-base.c | 60 +--------------------------------------------------
 src/bjb-window-base.h | 32 ---------------------------
 2 files changed, 1 insertion(+), 91 deletions(-)
---
diff --git a/src/bjb-window-base.c b/src/bjb-window-base.c
index 524a1c4..b404aa6 100644
--- a/src/bjb-window-base.c
+++ b/src/bjb-window-base.c
@@ -43,7 +43,6 @@ struct _BjbWindowBase
 
   BjbSettings          *settings;
   BjbController        *controller;
-  gchar                *entry; // FIXME, remove this
 
   gulong                display_notebooks_changed;
   gulong                note_deleted;
@@ -58,7 +57,6 @@ struct _BjbWindowBase
 
   /* when a note is opened */
   BijiNoteObj          *note;
-  gboolean              detached; // detached note
 
   /* window geometry */
   gint                  width;
@@ -674,13 +672,10 @@ bjb_window_base_constructed (GObject *obj)
   else if (self->pos_x >= 0)
     gtk_window_move (GTK_WINDOW (self), self->pos_x, self->pos_y);
 
-  /*  We probably want to offer a no entry window at first (startup) */
-  self->entry = NULL;
-
   self->controller = bjb_controller_new
     (bijiben_get_manager (BJB_APPLICATION(g_application_get_default())),
      GTK_WINDOW (obj),
-     self->entry );
+     NULL);
 
   self->note_list = bjb_list_view_new ();
   bjb_list_view_setup (self->note_list, self->controller);
@@ -733,7 +728,6 @@ bjb_window_base_constructed (GObject *obj)
    * This is a specific type of window not associated with any view */
   if (self->note != NULL)
   {
-    self->detached = TRUE;
     bjb_window_base_load_note_item (self, BIJI_ITEM (self->note));
   }
 }
@@ -819,13 +813,6 @@ bjb_window_base_new                    (BijiNoteObj *note)
                        NULL);
 }
 
-
-BjbController *
-bjb_window_base_get_controller (BjbWindowBase *self)
-{
-  return self->controller;
-}
-
 BijiNoteObj *
 bjb_window_base_get_note (BjbWindowBase *self)
 {
@@ -993,44 +980,6 @@ bjb_window_base_get_manager(GtkWidget * win)
   return bijiben_get_manager (BJB_APPLICATION (g_application_get_default()));
 }
 
-void
-bjb_window_base_set_entry(GtkWidget *win, gchar *search_entry)
-{
-  BjbWindowBase *self;
-
-  g_return_if_fail (BJB_IS_WINDOW_BASE (win));
-
-  self = BJB_WINDOW_BASE (win);
-  self->entry = search_entry;
-}
-
-
-gchar *
-bjb_window_base_get_entry(GtkWidget *win)
-{
-  BjbWindowBase *self = BJB_WINDOW_BASE(win);
-  return self->entry;
-}
-
-GtkWidget *
-bjb_window_base_get_search_bar (BjbWindowBase *self)
-{
-  return GTK_WIDGET (self->search_bar);
-}
-
-gboolean
-bjb_window_base_get_show_search_bar (BjbWindowBase *self)
-{
-
-  /* There is no search bar at startup,
-   * when main toolbar is first built... */
-  if (!self->search_bar)
-    return FALSE;
-
-  return gtk_search_bar_get_search_mode (
-            GTK_SEARCH_BAR (self->search_bar));
-}
-
 void
 bjb_window_base_set_active (BjbWindowBase *self, gboolean active)
 {
@@ -1046,10 +995,3 @@ bjb_window_base_set_active (BjbWindowBase *self, gboolean active)
                    available);
   }
 }
-
-
-gboolean
-bjb_window_base_is_detached (BjbWindowBase *self)
-{
-  return self->detached;
-}
diff --git a/src/bjb-window-base.h b/src/bjb-window-base.h
index aa3262e..ce096ca 100644
--- a/src/bjb-window-base.h
+++ b/src/bjb-window-base.h
@@ -23,12 +23,6 @@ typedef enum {
 
 
 GtkWindow             *bjb_window_base_new                (BijiNoteObj *note);
-
-
-BjbController         *bjb_window_base_get_controller     (BjbWindowBase *window ) ;
-
-void                   bjb_window_base_go_back            (BjbWindowBase *self);
-
 void                   bjb_window_base_switch_to          (BjbWindowBase *bwb, BjbWindowViewType type);
 
 
@@ -39,31 +33,5 @@ BjbWindowViewType      bjb_window_base_get_view_type      (BjbWindowBase *win);
 
 
 BijiManager           *bjb_window_base_get_manager        (GtkWidget * win);
-
-
-void                   bjb_window_base_set_entry(GtkWidget *win, gchar *search_entry) ;
-
-
-gchar                 *bjb_window_base_get_entry(GtkWidget *win) ;
-
-
-gpointer               bjb_window_base_get_main_view (BjbWindowBase *self);
-
-
 BijiNoteObj           *bjb_window_base_get_note (BjbWindowBase *self);
-
-
-gboolean               switch_window_fullscreen (void);
-
-
-GtkWidget             *bjb_window_base_get_search_bar (BjbWindowBase *self);
-
-
-gboolean               bjb_window_base_get_show_search_bar (BjbWindowBase *self);
-
-
 void                   bjb_window_base_set_active (BjbWindowBase *self, gboolean active);
-
-
-
-gboolean               bjb_window_base_is_detached (BjbWindowBase *self);


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