aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkarl-qdh <karl@qdh.org.uk>2011-02-21 16:05:48 +0000
committerkarl-qdh <karl@qdh.org.uk>2011-02-21 16:05:48 +0000
commitf01389981e7826d94e765665b6f6aa5f7672960e (patch)
tree49b57f29e811a06e41ae40d15d60524bfe79fcf0 /src
parent99b479df5c4af616952859e4e8cccd0b24215e5e (diff)
downloadayatana-ido-f01389981e7826d94e765665b6f6aa5f7672960e.tar.gz
ayatana-ido-f01389981e7826d94e765665b6f6aa5f7672960e.tar.bz2
ayatana-ido-f01389981e7826d94e765665b6f6aa5f7672960e.zip
Added month change signal too, slight cleanup of tabs
Diffstat (limited to 'src')
-rw-r--r--src/idocalendarmenuitem.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/idocalendarmenuitem.c b/src/idocalendarmenuitem.c
index 8208ba2..642eb66 100644
--- a/src/idocalendarmenuitem.c
+++ b/src/idocalendarmenuitem.c
@@ -76,6 +76,11 @@ ido_calendar_menu_item_class_init (IdoCalendarMenuItemClass *klass)
menu_item_class->hide_on_activate = TRUE;
g_type_class_add_private (gobject_class, sizeof (IdoCalendarMenuItemPrivate));
+
+ g_signal_new("month-changed", G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+ gtk_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
}
static void
@@ -234,6 +239,11 @@ calendar_realized_cb (GtkWidget *widget,
"key-press-event",
G_CALLBACK (ido_calendar_menu_item_key_press),
item);
+
+ g_signal_connect (priv->calendar,
+ "month-changed",
+ G_CALLBACK (calendar_month_changed_cb),
+ item);
ido_calendar_menu_item_send_focus_change (widget, TRUE);
}
@@ -250,6 +260,13 @@ calendar_move_focus_cb (GtkWidget *widget,
GTK_DIR_TAB_FORWARD);
}
+static void
+calendar_month_changed_cb (GtkWidget *widget,
+ gpointer user_data)
+{
+ g_signal_emit_by_name (item, "month-changed", NULL);
+}
+
/* Public API */
GtkWidget *
ido_calendar_menu_item_new (void)
@@ -268,23 +285,23 @@ ido_calendar_menu_item_get_calendar (IdoCalendarMenuItem *item)
gboolean
ido_calendar_menu_item_mark_day (IdoCalendarMenuItem *menuitem, guint day)
{
- return gtk_calendar_mark_day(menuitem->priv->calendar, day);
+ return gtk_calendar_mark_day(menuitem->priv->calendar, day);
}
gboolean
ido_calendar_menu_item_unmark_day (IdoCalendarMenuItem *menuitem, guint day)
{
- return gtk_calendar_unmark_day(menuitem->priv->calendar, day);
+ return gtk_calendar_unmark_day(menuitem->priv->calendar, day);
}
void
ido_calendar_menu_item_clear_marks (IdoCalendarMenuItem *menuitem)
{
- gtk_calendar_clear_marks(menuitem->priv->calendar);
+ gtk_calendar_clear_marks(menuitem->priv->calendar);
}
void
ido_calendar_menu_item_set_display_options (IdoCalendarMenuItem *menuitem, GtkCalendarDisplayOptions flags)
{
- gtk_calendar_set_display_options (menuitem->priv->calendar, flags);
+ gtk_calendar_set_display_options (menuitem->priv->calendar, flags);
}