year-view: add event handling to navigator

This commit is contained in:
Erick Pérez Castellanos
2015-01-20 13:11:58 -05:00
parent e49418a26d
commit 0770a12ea9
3 changed files with 268 additions and 42 deletions
+5 -1
View File
@@ -100,13 +100,17 @@
font: 6;
}
/* this is supposed be changed in sync with .calendar-view.current */
/* these two are supposed be changed in sync with .calendar-view */
.year-navigator.current {
background-color: @theme_fg_color;
border-radius: 2px;
color: white;
font: bold;
}
.year-navigator:selected {
color: @theme_selected_bg_color;
font-weight: bold;
}
GcalEventWidget {
border-radius: 6px;
+4 -1
View File
@@ -6,11 +6,14 @@
<object class="GtkDrawingArea" id="navigator">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="events">GDK_POINTER_MOTION_MASK|GDK_BUTTON_MOTION_MASK|GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK|GDK_STRUCTURE_MASK</property>
<signal name="draw" handler="draw_navigator" object="GcalYearView" swapped="yes" />
<signal name="button-press-event" handler="navigator_button_press_cb" object="GcalYearView" swapped="yes" />
<signal name="button-release-event" handler="navigator_button_release_cb" object="GcalYearView" swapped="yes" />
<signal name="motion-notify-event" handler="navigator_motion_notify_cb" object="GcalYearView" swapped="yes" />
<style>
<class name="year-navigator" />
</style>
<!-- FIXME: add some other signals handlers -->
</object>
<packing>
<property name="position">0</property>