date-selector: turn into a entry

After making the date selector use the brand
new date chooser widget, it is now time to make
it an entry.

This commit, then turns GcalDateSelector into a
GtkEntry subclass, and add all the plumbing that
is necessary to make it work as such.

As a side effect, this commit adds rudimentary
natural language support for parsing dates.
This commit is contained in:
Georges Basile Stavracas Neto
2016-07-23 17:47:11 -03:00
parent 4ef9f75dfb
commit bdac4e4c79
3 changed files with 93 additions and 22 deletions
+6 -8
View File
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.12"/>
<template class="GcalDateSelector" parent="GtkMenuButton">
<property name="use_popover">True</property>
<property name="popover">date_selector_popover</property>
<child>
<object class="GtkLabel" id="date_label">
<property name="visible">True</property>
</object>
</child>
<template class="GcalDateSelector" parent="GtkEntry">
<property name="visible">True</property>
<property name="width-chars">16</property>
<property name="max-width-chars">16</property>
<property name="secondary-icon-name">pan-down-symbolic</property>
<signal name="icon-press" handler="icon_pressed_cb" object="GcalDateSelector" swapped="no"/>
</template>
<object class="GtkPopover" id="date_selector_popover">
<property name="position">bottom</property>