window: code cleanup

Remove the unneeded code to manage search bar visibility,
since it is correctly hidden now. Also, clean up some UI
code.
This commit is contained in:
Georges Basile Stavracas Neto
2015-07-15 20:57:12 -03:00
parent 0c1df74735
commit b1540e3f41
2 changed files with 15 additions and 68 deletions
+13 -27
View File
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.1 -->
<interface>
<requires lib="gtk+" version="3.14"/>
<template class="GcalWindow" parent="GtkApplicationWindow">
@@ -15,41 +14,32 @@
<object class="GtkOverlay" id="views_overlay">
<property name="visible">True</property>
<child>
<object class="GtkGrid" id="main_box">
<object class="GtkBox" id="main_box">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkSearchBar" id="search_bar">
<property name="app_paintable">True</property>
<property name="no_show_all">True</property>
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="show_close_button">True</property>
<property name="search-mode-enabled" bind-source="search_button" bind-property="active" bind-flags="bidirectional"/>
<signal name="notify::search-mode-enabled" handler="search_toggled" object="GcalWindow" swapped="no"/>
<child>
<object class="GtkBox" id="search_entry_box">
<object class="GtkSearchEntry" id="search_entry">
<property name="width_request">500</property>
<property name="visible">True</property>
<child>
<object class="GtkSearchEntry" id="search_entry">
<property name="width_request">500</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">center</property>
<property name="hexpand">True</property>
<property name="primary_icon_name">edit-find-symbolic</property>
<property name="primary_icon_activatable">False</property>
<property name="primary_icon_sensitive">False</property>
<signal name="search-changed" handler="search_changed" object="GcalWindow" swapped="no"/>
</object>
</child>
<property name="can_focus">True</property>
<property name="halign">center</property>
<property name="hexpand">True</property>
<property name="primary_icon_name">edit-find-symbolic</property>
<property name="primary_icon_activatable">False</property>
<property name="primary_icon_sensitive">False</property>
<signal name="search-changed" handler="search_changed" object="GcalWindow" swapped="no"/>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkStack" id="views_stack">
@@ -90,10 +80,6 @@
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
</child>
@@ -295,7 +281,7 @@
</style>
</template>
<object class="GcalSearchView" id="search_view">
<property name="visible">False</property>
<property name="visible" bind-source="search_bar" bind-property="search-mode-enabled" bind-flags="default | sync-create" />
<property name="relative_to">search_entry</property>
<property name="position">bottom</property>
<signal name="event-activated" handler="search_event_selected" object="GcalWindow" swapped="no"/>