[bijiben] controller: Do not try to display all notes at startup
- From: Pierre-Yves Luyten <pyluyten src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] controller: Do not try to display all notes at startup
- Date: Fri, 26 Apr 2013 22:07:15 +0000 (UTC)
commit 7519111fecb1c8a5acf41db40a200437e0aec3e5
Author: Pierre-Yves Luyten <py luyten fr>
Date: Fri Apr 26 22:32:01 2013 +0200
controller: Do not try to display all notes at startup
Wait for the book to be loaded. Rather,
new window do request all notes to be displayed directly.
src/bjb-app-menu.c | 6 ++++++
src/bjb-controller.c | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/bjb-app-menu.c b/src/bjb-app-menu.c
index 72163a5..70deb8e 100644
--- a/src/bjb-app-menu.c
+++ b/src/bjb-app-menu.c
@@ -47,8 +47,14 @@ new_activated (GSimpleAction *action,
gpointer user_data)
{
BjbWindowBase *win;
+ BjbController *control;
win = BJB_WINDOW_BASE (bjb_window_base_new());
+
+ /* Tell the controller to display all notes, */
+ control = bjb_window_base_get_controller (win);
+ bjb_controller_set_needle (control, "");
+
bjb_window_base_switch_to (win, BJB_WINDOW_BASE_MAIN_VIEW);
}
diff --git a/src/bjb-controller.c b/src/bjb-controller.c
index 8bb4801..663d95d 100644
--- a/src/bjb-controller.c
+++ b/src/bjb-controller.c
@@ -173,7 +173,7 @@ bjb_controller_set_property (GObject *object,
self->priv->window = g_value_get_object (value);
break;
case PROP_NEEDLE:
- bjb_controller_set_needle(self,g_value_get_string(value));
+ self->priv->needle = g_strdup (g_value_get_string (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]