[bijiben] headerBar: use Untitled as default title for note view
- From: Pierre-Yves Luyten <pyluyten src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] headerBar: use Untitled as default title for note view
- Date: Wed, 30 Oct 2013 21:27:43 +0000 (UTC)
commit 26694546f7f8f5b6cbcfdff9ee68b3eed4271fee
Author: Pierre-Yves Luyten <py luyten fr>
Date: Wed Oct 30 22:26:52 2013 +0100
headerBar: use Untitled as default title for note view
See #711128
src/bjb-main-toolbar.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/bjb-main-toolbar.c b/src/bjb-main-toolbar.c
index 5535565..e2d1193 100644
--- a/src/bjb-main-toolbar.c
+++ b/src/bjb-main-toolbar.c
@@ -520,11 +520,16 @@ just_switch_to_main_view (BjbMainToolbar *self)
}
static void
-on_note_renamed (BijiNoteObj *note,
+on_note_renamed (BijiItem *note,
BjbMainToolbar *self)
{
- gtk_header_bar_set_title (GTK_HEADER_BAR (self),
- biji_item_get_title (BIJI_ITEM (note)));
+ const gchar *str;
+
+ str = biji_item_get_title (note);
+ if (str == NULL)
+ str = _("Untitled");
+
+ gtk_header_bar_set_title (GTK_HEADER_BAR (self), str);
gtk_header_bar_set_subtitle (GTK_HEADER_BAR (self), NULL);
}
@@ -707,10 +712,7 @@ populate_bar_for_note_view (BjbMainToolbar *self)
GDK_KEY_w, GDK_CONTROL_MASK, GTK_ACCEL_MASK);
/* Note Title */
-
- gtk_header_bar_set_title (bar, biji_item_get_title (item));
- gtk_header_bar_set_subtitle (bar, NULL);
-
+ on_note_renamed (item, self);
self->priv->note_renamed = g_signal_connect (priv->note,"renamed",
G_CALLBACK (on_note_renamed), self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]