[gnome-calendar/calendar-editor] source-dialog: use the new functions
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] source-dialog: use the new functions
- Date: Wed, 8 Apr 2015 02:18:07 +0000 (UTC)
commit 79d17b2a36a91db03b50dd021784ef521cf70dfc
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Apr 7 23:16:31 2015 -0300
source-dialog: use the new functions
src/gcal-source-dialog.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 22d1b71..3b7814d 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -1111,12 +1111,14 @@ gcal_source_dialog_set_source (GcalSourceDialog *dialog,
ESource *source)
{
GcalSourceDialogPrivate *priv = dialog->priv;
- ESource *default_source, *parent_source;
+ ESource *default_source;
+ gchar *parent_name;
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));
+
+ get_source_parent_name_color (priv->manager, source, &parent_name, NULL);
/* block signals */
g_signal_handlers_block_by_func (priv->calendar_color_button, color_set, dialog);
@@ -1135,7 +1137,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));
- gtk_header_bar_set_subtitle (GTK_HEADER_BAR (priv->headerbar), e_source_get_display_name (parent_source));
+ gtk_header_bar_set_subtitle (GTK_HEADER_BAR (priv->headerbar), parent_name);
/* toggle the remove button */
gtk_widget_set_sensitive (priv->remove_button, e_source_get_removable (source));
@@ -1145,5 +1147,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);
+ g_free (parent_name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]