source-dialog: Add a "Calendars" label before calendar listbox

Also, this commit correctly hides the calendar
label and list.
This commit is contained in:
Georges Basile Stavracas Neto
2015-05-25 12:35:55 -04:00
committed by Erick Pérez Castellanos
parent dcd1fbe6d9
commit e62d744cef
3 changed files with 39 additions and 20 deletions
-9
View File
@@ -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;
}
+37 -10
View File
@@ -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>
+2 -1
View File
@@ -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)