[gtk+] Bring back lost functionality
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Bring back lost functionality
- Date: Sun, 24 Oct 2010 18:44:00 +0000 (UTC)
commit bcb23945f6b0692044a91963011c4a90d807497d
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 24 07:21:37 2010 +0200
Bring back lost functionality
Double-click to mark/unmark was lost a while ago.
Also add easy RTL testing.
tests/testcalendar.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/testcalendar.c b/tests/testcalendar.c
index e490e8e..47e9a25 100644
--- a/tests/testcalendar.c
+++ b/tests/testcalendar.c
@@ -158,9 +158,17 @@ calendar_day_selected_double_click (GtkWidget *widget,
CalendarData *data)
{
char buffer[256] = "day_selected_double_click: ";
+ guint day;
calendar_date_to_string (data, buffer+27, 256-27);
calendar_set_signal_strings (buffer, data);
+ gtk_calendar_get_date (GTK_CALENDAR (data->window),
+ NULL, NULL, &day);
+
+ if (gtk_calendar_get_day_is_marked (GTK_CALENDAR (data->window), day))
+ gtk_calendar_unmark_day (GTK_CALENDAR (data->window), day);
+ else
+ gtk_calendar_mark_day (GTK_CALENDAR (data->window), day);
}
static void
@@ -664,6 +672,9 @@ int main(int argc,
{
gtk_init (&argc, &argv);
+ if (g_getenv ("GTK_RTL"))
+ gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
+
create_calendar();
gtk_main();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]