[gnome-calendar] source-dialog: Add a "Calendars" label before calendar listbox
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] source-dialog: Add a "Calendars" label before calendar listbox
- Date: Mon, 25 May 2015 16:58:58 +0000 (UTC)
commit e62d744cefa8a88c0594a28ff266c780dab7a579
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Apr 19 15:32:15 2015 -0300
source-dialog: Add a "Calendars" label before calendar listbox
Also, this commit correctly hides the calendar
label and list.
data/theme/gtk-styles.css | 9 --------
data/ui/source-dialog.ui | 47 +++++++++++++++++++++++++++++++++++---------
src/gcal-source-dialog.c | 3 +-
3 files changed, 39 insertions(+), 20 deletions(-)
---
diff --git a/data/theme/gtk-styles.css b/data/theme/gtk-styles.css
index dbfaf3d..0f6a577 100644
--- a/data/theme/gtk-styles.css
+++ b/data/theme/gtk-styles.css
@@ -225,14 +225,5 @@ GcalEventWidget.color-light:backdrop {
/* calendar popover */
.calendar-list {
- background-color: rgba(0, 0, 0, 0);
-}
-
-/* source dialog */
-.details-frame {
- background-color: rgba(0, 0, 0, 0);
-}
-
-.spinner-offscreen {
background-color: transparent;
}
diff --git a/data/ui/source-dialog.ui b/data/ui/source-dialog.ui
index 992f0d4..a606dc3 100644
--- a/data/ui/source-dialog.ui
+++ b/data/ui/source-dialog.ui
@@ -698,29 +698,56 @@
</child>
<child>
<object class="GtkRevealer" id="web_sources_revealer">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkScrolledWindow" id="web_list_scrolledwindow">
- <property name="height_request">100</property>
+ <object class="GtkBox" id="web_sources_listbox_box">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="shadow_type">etched-in</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkViewport" id="viewport">
+ <object class="GtkLabel" id="web_sources_calendar_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes">Calendars</property>
+ <property name="xalign">0</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="web_list_scrolledwindow">
+ <property name="height_request">100</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkListBox" id="web_sources_listbox">
+ <object class="GtkViewport" id="viewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="activate_on_single_click">False</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkListBox" id="web_sources_listbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="activate_on_single_click">False</property>
+ <style>
+ <class name="calendar-list" />
+ </style>
+ </object>
+ </child>
</object>
</child>
</object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
</child>
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 26f1f4b..99e6576 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -435,6 +435,7 @@ clear_pages (GcalSourceDialog *dialog)
g_list_free_full (list, (GDestroyNotify) gtk_widget_destroy);
gtk_revealer_set_reveal_child (GTK_REVEALER (priv->web_sources_revealer), FALSE);
+ gtk_widget_hide (priv->web_sources_revealer);
}
static void
@@ -1009,7 +1010,6 @@ url_entry_text_changed (GObject *object,
else
{
gtk_entry_set_progress_fraction (GTK_ENTRY (priv->calendar_address_entry), 0);
- gtk_revealer_set_reveal_child (GTK_REVEALER (priv->web_sources_revealer), FALSE);
}
}
@@ -1433,6 +1433,7 @@ discover_sources_cb (GObject *source,
// Show the list of calendars
gtk_revealer_set_reveal_child (GTK_REVEALER (priv->web_sources_revealer), TRUE);
+ gtk_widget_show (priv->web_sources_revealer);
/* TODO: show a list of calendars */
for (aux = discovered_sources; aux != NULL; aux = aux->next)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]