window: fixed event removed notification

Moved all this code into ui file.
Removed public API of GcalWindow. In time, if needed by some other
object it can be brought back.
This commit is contained in:
Erick Pérez Castellanos
2014-12-04 17:10:55 -05:00
parent 0856345ace
commit e0ef2892fd
3 changed files with 187 additions and 146 deletions
+82
View File
@@ -91,6 +91,88 @@
</child>
</object>
</child>
<child type="overlay">
<object class="GtkRevealer" id="notification">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="transition_duration">100</property>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">2</property>
<property name="margin_bottom">2</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="notification_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="notification_action_button">
<property name="label" translatable="yes">button</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<signal name="clicked" handler="undo_remove_event" object="GcalWindow" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
<style>
<class name="text-button"/>
</style>
</child>
<child>
<object class="GtkButton" id="notification_close_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<signal name="clicked" handler="hide_notification" object="GcalWindow" swapped="no"/>
<signal name="notify::child-revealed" handler="remove_event" object="GcalWindow" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">window-close-symbolic</property>
<property name="icon_size">2</property>
</object>
</child>
<style>
<class name="image-button"/>
</style>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
<style>
<class name="app-notification"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="titlebar">