[gnome-calendar/calendar-editor] source-dialog: set the parent's display name as the headerbar subtitle
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] source-dialog: set the parent's display name as the headerbar subtitle
- Date: Tue, 10 Feb 2015 13:50:25 +0000 (UTC)
commit d2576d744ae591d883d456c29eefad485cca311d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Feb 10 11:50:16 2015 -0200
source-dialog: set the parent's display name as the headerbar subtitle
src/gcal-source-dialog.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 9f32128..aba9d7e 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -559,11 +559,12 @@ gcal_source_dialog_set_source (GcalSourceDialog *dialog,
ESource *source)
{
GcalSourceDialogPrivate *priv = dialog->priv;
- ESource *default_source;
+ ESource *default_source, *parent_source;
GdkRGBA color;
priv->source = source;
default_source = gcal_manager_get_default_source (priv->manager);
+ parent_source = gcal_manager_get_source (priv->manager, e_source_get_parent (source));
/* block signals */
g_signal_handlers_block_by_func (priv->calendar_color_button, color_set, dialog);
@@ -582,9 +583,7 @@ gcal_source_dialog_set_source (GcalSourceDialog *dialog,
/* title */
gtk_header_bar_set_title (GTK_HEADER_BAR (priv->headerbar), e_source_get_display_name (source));
-
- /* FIXME: account information on subtitle */
- gtk_header_bar_set_subtitle (GTK_HEADER_BAR (priv->headerbar), "");
+ gtk_header_bar_set_subtitle (GTK_HEADER_BAR (priv->headerbar), e_source_get_display_name (parent_source));
/* toggle the remove button */
gtk_widget_set_sensitive (priv->remove_button, e_source_get_removable (source));
@@ -594,4 +593,5 @@ gcal_source_dialog_set_source (GcalSourceDialog *dialog,
g_signal_handlers_unblock_by_func (priv->name_entry, name_entry_text_changed, dialog);
g_object_unref (default_source);
+ g_object_unref (parent_source);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]