[bijiben] bjbController: keep connected.



commit 11d8b262856c980fc2587b8395d27f9ed5d5a60e
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Sat May 4 01:05:56 2013 +0200

    bjbController: keep connected.
    
    Otherwise coming back from note view to main view will make
    some items invisible.

 src/bjb-controller.c |    4 +++-
 src/bjb-controller.h |    2 --
 src/bjb-main-view.c  |    2 --
 3 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/bjb-controller.c b/src/bjb-controller.c
index e27bad2..78f56f5 100644
--- a/src/bjb-controller.c
+++ b/src/bjb-controller.c
@@ -533,7 +533,7 @@ on_book_changed (BijiNoteBook           *book,
   refresh_completion(self);
 }
 
-void
+static void
 bjb_controller_connect (BjbController *self)
 {
   BjbControllerPrivate *priv = self->priv;
@@ -561,6 +561,8 @@ static void
 bjb_controller_constructed (GObject *obj)
 {
   G_OBJECT_CLASS(bjb_controller_parent_class)->constructed(obj);
+
+  bjb_controller_connect (BJB_CONTROLLER (obj));
 }
 
 static void
diff --git a/src/bjb-controller.h b/src/bjb-controller.h
index 7cbbc9a..306fe77 100644
--- a/src/bjb-controller.h
+++ b/src/bjb-controller.h
@@ -70,8 +70,6 @@ GtkTreeModel * bjb_controller_get_model  (BjbController *self) ;
 
 GtkTreeModel * bjb_controller_get_completion(BjbController *self);
 
-void bjb_controller_connect (BjbController *self);
-
 void bjb_controller_disconnect (BjbController *self);
 
 gboolean bjb_controller_shows_item (BjbController *self);
diff --git a/src/bjb-main-view.c b/src/bjb-main-view.c
index 3ab1de4..c86e02c 100644
--- a/src/bjb-main-view.c
+++ b/src/bjb-main-view.c
@@ -471,8 +471,6 @@ bjb_main_view_connect_signals (BjbMainView *self)
 {
   BjbMainViewPriv *priv = self->priv;
 
-  bjb_controller_connect (priv->controller);
-
   if (priv->view_selection_changed == 0)
     priv->view_selection_changed = g_signal_connect_swapped
                                   (priv->view,


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