mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 22:30:22 +00:00
Fix problems with the initial focus in GtkCalendar. (#397783, Vincent
2007-01-18 Matthias Clasen <mclasen@redhat.com> * gtk/gtkcalendar.c: Fix problems with the initial focus in GtkCalendar. (#397783, Vincent Untz) svn path=/trunk/; revision=17190
This commit is contained in:
parent
f7687a8b9c
commit
170fef7ee2
@ -1,3 +1,8 @@
|
|||||||
|
2007-01-18 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkcalendar.c: Fix problems with the initial
|
||||||
|
focus in GtkCalendar. (#397783, Vincent Untz)
|
||||||
|
|
||||||
2007-01-19 Robert Ögren <gtk@roboros.com>
|
2007-01-19 Robert Ögren <gtk@roboros.com>
|
||||||
|
|
||||||
Fix for bug #143460 - missed tablet clicks on Windows
|
Fix for bug #143460 - missed tablet clicks on Windows
|
||||||
|
@ -2730,6 +2730,11 @@ move_focus (GtkCalendar *calendar,
|
|||||||
calendar->focus_col = 6;
|
calendar->focus_col = 6;
|
||||||
calendar->focus_row--;
|
calendar->focus_row--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (calendar->focus_col < 0)
|
||||||
|
calendar->focus_col = 6;
|
||||||
|
if (calendar->focus_row < 0)
|
||||||
|
calendar->focus_row = 5;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2740,6 +2745,11 @@ move_focus (GtkCalendar *calendar,
|
|||||||
calendar->focus_col = 0;
|
calendar->focus_col = 0;
|
||||||
calendar->focus_row++;
|
calendar->focus_row++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (calendar->focus_col < 0)
|
||||||
|
calendar->focus_col = 0;
|
||||||
|
if (calendar->focus_row < 0)
|
||||||
|
calendar->focus_row = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2759,6 +2769,7 @@ gtk_calendar_key_press (GtkWidget *widget,
|
|||||||
old_focus_row = calendar->focus_row;
|
old_focus_row = calendar->focus_row;
|
||||||
old_focus_col = calendar->focus_col;
|
old_focus_col = calendar->focus_col;
|
||||||
|
|
||||||
|
g_print ("focus %d %d\n", old_focus_row, old_focus_col));
|
||||||
switch (event->keyval)
|
switch (event->keyval)
|
||||||
{
|
{
|
||||||
case GDK_KP_Left:
|
case GDK_KP_Left:
|
||||||
@ -2796,6 +2807,10 @@ gtk_calendar_key_press (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
if (calendar->focus_row > 0)
|
if (calendar->focus_row > 0)
|
||||||
calendar->focus_row--;
|
calendar->focus_row--;
|
||||||
|
if (calendar->focus_row < 0)
|
||||||
|
calendar->focus_row = 5;
|
||||||
|
if (calendar->focus_col < 0)
|
||||||
|
calendar->focus_col = 6;
|
||||||
calendar_invalidate_day (calendar, old_focus_row, old_focus_col);
|
calendar_invalidate_day (calendar, old_focus_row, old_focus_col);
|
||||||
calendar_invalidate_day (calendar, calendar->focus_row,
|
calendar_invalidate_day (calendar, calendar->focus_row,
|
||||||
calendar->focus_col);
|
calendar->focus_col);
|
||||||
@ -2810,6 +2825,8 @@ gtk_calendar_key_press (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
if (calendar->focus_row < 5)
|
if (calendar->focus_row < 5)
|
||||||
calendar->focus_row++;
|
calendar->focus_row++;
|
||||||
|
if (calendar->focus_col < 0)
|
||||||
|
calendar->focus_col = 0;
|
||||||
calendar_invalidate_day (calendar, old_focus_row, old_focus_col);
|
calendar_invalidate_day (calendar, old_focus_row, old_focus_col);
|
||||||
calendar_invalidate_day (calendar, calendar->focus_row,
|
calendar_invalidate_day (calendar, calendar->focus_row,
|
||||||
calendar->focus_col);
|
calendar->focus_col);
|
||||||
|
Loading…
Reference in New Issue
Block a user