From c9e20b967bb7e1b679f10cb9d388c94a95c3bf06 Mon Sep 17 00:00:00 2001
From: Li Yuan
Date: Tue, 12 Oct 2004 06:58:11 +0000
Subject: When the start year and the end year are the same, the num should be
2004-10-12 Li Yuan
* gui/calendar-commands.c:
(calendar_get_text_for_folder_bar_label):
When the start year and the end year are the same, the num should
be displayed in start time.
* gui/dialogs/alarm-dialog.glade:
Add names to comboxes in alarm-dialog page.
* gui/dialogs/cal-prefs-dialog.glade:
Add labbled_by relation for e_date_edit.
Add names to comboxes in general tab and display tab.
Add shortcut keys to start_of_day_label and end_of_day_label.
* gui/dialogs/event-page.c: (init_widgets):
Use the default text_buffer of gtk_text_view instead of
creating one.
* gui/dialogs/event-page.glade:
Add labbled_by relation for e_date_edit.
* gui/dialogs/meeting-page.glade:
Set an atk name for organizer widget.
* gui/dialogs/task-page.c: (init_widgets):
Use the default text_buffer of gtk_text_view instead of
creating one.
* gui/dialogs/task-page.glade:
Add labbled_by relation for e_date_edit.
Add a11y names to task description and categories.
* gui/e-alarm-list.c: (e_alarm_list_iter_n_children):
Remove the iter checker. The iter can't have a valid value at this time.
* gui/e-date-time-list.c: (e_date_time_list_iter_n_children):
Remove the iter checker. The iter can't have a valid value at this time.
* gui/e-meeting-time-sel.c: (e_meeting_time_selector_construct):
Add labbled_by relation for e_date_edit.
* gui/e-timezone-entry.c: (e_timezone_entry_class_init),
(e_timezone_entry_init), (e_timezone_entry_mnemonic_activate),
(e_timezone_entry_focus):
Add a focus handler for e-timezone-entry. Set an atk name for the
button.
* gui/e-week-view.c: (e_week_view_do_cursor_key_up),
(e_week_view_do_cursor_key_down), (e_week_view_do_cursor_key_left),
(e_week_view_do_cursor_key_right), (e_month_view_do_cursor_key_up),
(e_month_view_do_cursor_key_down),
(e_month_view_do_cursor_key_left),
(e_month_view_do_cursor_key_right):
Emit the selected_time_changed signal after the selection day changed.
svn path=/trunk/; revision=27550
---
calendar/ChangeLog | 44 +++++++++++++++++++++++++++++
calendar/gui/calendar-commands.c | 8 +++---
calendar/gui/dialogs/alarm-dialog.glade | 28 ++++++++++++++++++
calendar/gui/dialogs/cal-prefs-dialog.glade | 18 ++++++++++--
calendar/gui/dialogs/event-page.c | 4 +--
calendar/gui/dialogs/event-page.glade | 13 +++++++--
calendar/gui/dialogs/meeting-page.glade | 3 ++
calendar/gui/dialogs/task-page.c | 4 +--
calendar/gui/dialogs/task-page.glade | 16 +++++++++--
calendar/gui/e-alarm-list.c | 1 -
calendar/gui/e-date-time-list.c | 1 -
calendar/gui/e-meeting-time-sel.c | 17 +++++++++++
calendar/gui/e-timezone-entry.c | 40 ++++++++++++++++++++++++++
calendar/gui/e-week-view.c | 16 +++++------
14 files changed, 187 insertions(+), 26 deletions(-)
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 58363a96b9..30338a31b0 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,47 @@
+2004-10-12 Li Yuan
+
+ * gui/calendar-commands.c:
+ (calendar_get_text_for_folder_bar_label):
+ When the start year and the end year are the same, the num should
+ be displayed in start time.
+ * gui/dialogs/alarm-dialog.glade:
+ Add names to comboxes in alarm-dialog page.
+ * gui/dialogs/cal-prefs-dialog.glade:
+ Add labbled_by relation for e_date_edit.
+ Add names to comboxes in general tab and display tab.
+ Add shortcut keys to start_of_day_label and end_of_day_label.
+ * gui/dialogs/event-page.c: (init_widgets):
+ Use the default text_buffer of gtk_text_view instead of
+ creating one.
+ * gui/dialogs/event-page.glade:
+ Add labbled_by relation for e_date_edit.
+ * gui/dialogs/meeting-page.glade:
+ Set an atk name for organizer widget.
+ * gui/dialogs/task-page.c: (init_widgets):
+ Use the default text_buffer of gtk_text_view instead of
+ creating one.
+ * gui/dialogs/task-page.glade:
+ Add labbled_by relation for e_date_edit.
+ Add a11y names to task description and categories.
+ * gui/e-alarm-list.c: (e_alarm_list_iter_n_children):
+ Remove the iter checker. The iter can't have a valid value at this time.
+ * gui/e-date-time-list.c: (e_date_time_list_iter_n_children):
+ Remove the iter checker. The iter can't have a valid value at this time.
+ * gui/e-meeting-time-sel.c: (e_meeting_time_selector_construct):
+ Add labbled_by relation for e_date_edit.
+ * gui/e-timezone-entry.c: (e_timezone_entry_class_init),
+ (e_timezone_entry_init), (e_timezone_entry_mnemonic_activate),
+ (e_timezone_entry_focus):
+ Add a focus handler for e-timezone-entry. Set an atk name for the
+ button.
+ * gui/e-week-view.c: (e_week_view_do_cursor_key_up),
+ (e_week_view_do_cursor_key_down), (e_week_view_do_cursor_key_left),
+ (e_week_view_do_cursor_key_right), (e_month_view_do_cursor_key_up),
+ (e_month_view_do_cursor_key_down),
+ (e_month_view_do_cursor_key_left),
+ (e_month_view_do_cursor_key_right):
+ Emit the selected_time_changed signal after the selection day changed.
+
2004-10-11 Not Zed
* gui/alarm-notify/alarm-queue.c (tray_icon_clicked_cb): convert
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index e3ebf3a6da..35dfa83d8d 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -434,9 +434,9 @@ calendar_get_text_for_folder_bar_label (GnomeCalendar *gcal)
_("%A %d %B %Y"), &start_tm);
} else if (start_tm.tm_year == end_tm.tm_year) {
e_utf8_strftime (buffer, sizeof (buffer),
- _("%a %d %b"), &start_tm);
+ _("%a %d %b %Y"), &start_tm);
e_utf8_strftime (end_buffer, sizeof (end_buffer),
- _("%a %d %b %Y"), &end_tm);
+ _("%a %d %b"), &end_tm);
strcat (buffer, " - ");
strcat (buffer, end_buffer);
} else {
@@ -464,9 +464,9 @@ calendar_get_text_for_folder_bar_label (GnomeCalendar *gcal)
strcat (buffer, end_buffer);
} else {
e_utf8_strftime (buffer, sizeof (buffer),
- _("%d %B"), &start_tm);
+ _("%d %B %Y"), &start_tm);
e_utf8_strftime (end_buffer, sizeof (end_buffer),
- _("%d %B %Y"), &end_tm);
+ _("%d %B"), &end_tm);
strcat (buffer, " - ");
strcat (buffer, end_buffer);
}
diff --git a/calendar/gui/dialogs/alarm-dialog.glade b/calendar/gui/dialogs/alarm-dialog.glade
index 28898692ea..45617ea52f 100644
--- a/calendar/gui/dialogs/alarm-dialog.glade
+++ b/calendar/gui/dialogs/alarm-dialog.glade
@@ -13,6 +13,11 @@
True
True
False
+ True
+ False
+ False
+ GDK_WINDOW_TYPE_HINT_DIALOG
+ GDK_GRAVITY_NORTH_WEST
True
@@ -34,6 +39,7 @@
gtk-cancel
True
GTK_RELIEF_NORMAL
+ True
-6
@@ -46,6 +52,7 @@
gtk-ok
True
GTK_RELIEF_NORMAL
+ True
-5
@@ -117,6 +124,9 @@
True
True
0
+
+ option menu to choose alarm action
+
1
@@ -522,7 +531,7 @@
-
+
True
_Start time:
True
@@ -547,7 +556,7 @@
-
+
True
_End time:
True
diff --git a/calendar/gui/dialogs/meeting-page.glade b/calendar/gui/dialogs/meeting-page.glade
index ed347b2432..51f7399b5f 100644
--- a/calendar/gui/dialogs/meeting-page.glade
+++ b/calendar/gui/dialogs/meeting-page.glade
@@ -65,6 +65,9 @@
False
True
False
+
+ Organizer
+
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index f3bdf10519..2779c0f2a2 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -865,9 +865,7 @@ init_widgets (TaskPage *tpage)
G_CALLBACK (summary_changed_cb), tpage);
/* Description */
- text_buffer = gtk_text_buffer_new (NULL);
- gtk_text_view_set_buffer (GTK_TEXT_VIEW (priv->description), text_buffer);
- g_object_unref (text_buffer);
+ text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description));
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (priv->description), GTK_WRAP_WORD);
diff --git a/calendar/gui/dialogs/task-page.glade b/calendar/gui/dialogs/task-page.glade
index 1b688fe1ab..c66ceb1932 100644
--- a/calendar/gui/dialogs/task-page.glade
+++ b/calendar/gui/dialogs/task-page.glade
@@ -276,6 +276,9 @@
True
*
False
+
+ Categories
+
1
@@ -311,6 +314,9 @@
0
0
+
+ Task Description
+
@@ -421,7 +427,7 @@
12
-
+
True
_Due date:
True
@@ -446,7 +452,7 @@
-
+
True
Sta_rt date:
True
@@ -498,6 +504,9 @@
0
0
Tue, 19 Jun 2001 04:43:54 GMT
+
+
+
0
@@ -544,6 +553,9 @@
0
0
Tue, 19 Jun 2001 04:43:46 GMT
+
+
+
0
diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c
index 8ebba1783b..ff23cbeb2d 100644
--- a/calendar/gui/e-alarm-list.c
+++ b/calendar/gui/e-alarm-list.c
@@ -625,7 +625,6 @@ e_alarm_list_iter_n_children (GtkTreeModel *tree_model,
EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), -1);
- g_return_val_if_fail (IS_VALID_ITER (alarm_list, iter), -1);
if (iter == NULL)
return g_list_length (alarm_list->list);
diff --git a/calendar/gui/e-date-time-list.c b/calendar/gui/e-date-time-list.c
index 1a1fbbd783..4ba4a4fcc4 100644
--- a/calendar/gui/e-date-time-list.c
+++ b/calendar/gui/e-date-time-list.c
@@ -518,7 +518,6 @@ e_date_time_list_iter_n_children (GtkTreeModel *tree_model,
EDateTimeList *date_time_list = E_DATE_TIME_LIST (tree_model);
g_return_val_if_fail (E_IS_DATE_TIME_LIST (tree_model), -1);
- g_return_val_if_fail (IS_VALID_ITER (date_time_list, iter), -1);
if (iter == NULL)
return g_list_length (date_time_list->list);
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 5335fca5d3..6acd0cd8e6 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -277,6 +277,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
guchar stipple_bits[] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
};
+ AtkObject *a11y_label, *a11y_date_edit;
/* The default meeting time is the nearest half-hour interval in the
future, in working hours. */
@@ -591,6 +592,14 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
gtk_widget_show (table);
mts->start_date_edit = e_date_edit_new ();
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), mts->start_date_edit);
+ a11y_label = gtk_widget_get_accessible (label);
+ a11y_date_edit = gtk_widget_get_accessible (mts->start_date_edit);
+ if (a11y_label != NULL && a11y_date_edit != NULL) {
+ atk_object_add_relationship (a11y_date_edit,
+ ATK_RELATION_LABELLED_BY,
+ a11y_label);
+ }
e_date_edit_set_show_time (E_DATE_EDIT (mts->start_date_edit), TRUE);
e_date_edit_set_use_24_hour_format (E_DATE_EDIT (mts->start_date_edit),
calendar_config_get_24_hour_format ());
@@ -610,6 +619,14 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
gtk_widget_show (label);
mts->end_date_edit = e_date_edit_new ();
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), mts->end_date_edit);
+ a11y_label = gtk_widget_get_accessible (label);
+ a11y_date_edit = gtk_widget_get_accessible (mts->end_date_edit);
+ if (a11y_label != NULL && a11y_date_edit != NULL) {
+ atk_object_add_relationship (a11y_date_edit,
+ ATK_RELATION_LABELLED_BY,
+ a11y_label);
+ }
e_date_edit_set_show_time (E_DATE_EDIT (mts->end_date_edit), TRUE);
e_date_edit_set_use_24_hour_format (E_DATE_EDIT (mts->end_date_edit),
calendar_config_get_24_hour_format ());
diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c
index fc95d83a74..0c2c795bf3 100644
--- a/calendar/gui/e-timezone-entry.c
+++ b/calendar/gui/e-timezone-entry.c
@@ -36,6 +36,7 @@
#include
#include
#include
+#include
#include "e-timezone-entry.h"
#include
@@ -68,6 +69,8 @@ static void e_timezone_entry_destroy (GtkObject *object);
static gboolean e_timezone_entry_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling);
+static gboolean e_timezone_entry_focus (GtkWidget *widget,
+ GtkDirectionType direction);
static void on_entry_changed (GtkEntry *entry,
ETimezoneEntry *tentry);
static void on_button_clicked (GtkWidget *widget,
@@ -93,6 +96,7 @@ e_timezone_entry_class_init (ETimezoneEntryClass *class)
parent_class = g_type_class_peek_parent (class);
widget_class->mnemonic_activate = e_timezone_entry_mnemonic_activate;
+ widget_class->focus = e_timezone_entry_focus;
timezone_entry_signals[CHANGED] =
gtk_signal_new ("changed",
GTK_RUN_LAST,
@@ -115,6 +119,7 @@ e_timezone_entry_init (ETimezoneEntry *tentry)
ETimezoneEntryPrivate *priv;
GtkWidget *gtk_image;
GdkPixbuf *gdk_pixbuf;
+ AtkObject *a11y;
tentry->priv = priv = g_new0 (ETimezoneEntryPrivate, 1);
@@ -132,6 +137,10 @@ e_timezone_entry_init (ETimezoneEntry *tentry)
g_signal_connect (priv->button, "clicked", G_CALLBACK (on_button_clicked), tentry);
gtk_box_pack_start (GTK_BOX (tentry), priv->button, FALSE, FALSE, 6);
gtk_widget_show (priv->button);
+ a11y = gtk_widget_get_accessible (priv->button);
+ if (a11y != NULL) {
+ atk_object_set_name (a11y, _("Timezone Button"));
+ }
gdk_pixbuf = e_icon_factory_get_icon ("stock_timezone", E_ICON_SIZE_BUTTON);
gtk_image = gtk_image_new_from_pixbuf (gdk_pixbuf);
@@ -314,3 +323,34 @@ e_timezone_entry_mnemonic_activate (GtkWidget *widget,
return TRUE;
}
+static gboolean
+e_timezone_entry_focus (GtkWidget *widget, GtkDirectionType direction)
+{
+ ETimezoneEntry *tentry;
+
+ tentry = E_TIMEZONE_ENTRY (widget);
+
+ if (direction == GTK_DIR_TAB_FORWARD) {
+ if (GTK_WIDGET_HAS_FOCUS (tentry->priv->entry))
+ gtk_widget_grab_focus (tentry->priv->button);
+ else if (GTK_WIDGET_HAS_FOCUS (tentry->priv->button))
+ return FALSE;
+ else if (GTK_WIDGET_VISIBLE (tentry->priv->entry))
+ gtk_widget_grab_focus (tentry->priv->entry);
+ else
+ gtk_widget_grab_focus (tentry->priv->button);
+ } else if (direction == GTK_DIR_TAB_BACKWARD) {
+ if (GTK_WIDGET_HAS_FOCUS (tentry->priv->entry))
+ return FALSE;
+ else if (GTK_WIDGET_HAS_FOCUS (tentry->priv->button)) {
+ if (GTK_WIDGET_VISIBLE (tentry->priv->entry))
+ gtk_widget_grab_focus (tentry->priv->entry);
+ else
+ return FALSE;
+ } else
+ gtk_widget_grab_focus (tentry->priv->button);
+ } else
+ return FALSE;
+ return TRUE;
+}
+
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 7802fa5da1..27d9eb28c8 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3499,9 +3499,9 @@ e_week_view_do_cursor_key_up (EWeekView *week_view)
if (week_view->selection_start_day <= 0)
return;
- g_signal_emit_by_name (week_view, "selected_time_changed");
week_view->selection_start_day--;
week_view->selection_end_day = week_view->selection_start_day;
+ g_signal_emit_by_name (week_view, "selected_time_changed");
gtk_widget_queue_draw (week_view->main_canvas);
}
@@ -3512,9 +3512,9 @@ e_week_view_do_cursor_key_down (EWeekView *week_view)
week_view->selection_start_day >= 6)
return;
- g_signal_emit_by_name (week_view, "selected_time_changed");
week_view->selection_start_day++;
week_view->selection_end_day = week_view->selection_start_day;
+ g_signal_emit_by_name (week_view, "selected_time_changed");
gtk_widget_queue_draw (week_view->main_canvas);
}
@@ -3524,9 +3524,9 @@ e_week_view_do_cursor_key_left (EWeekView *week_view)
if (week_view->selection_start_day == -1)
return;
- g_signal_emit_by_name (week_view, "selected_time_changed");
week_view->selection_start_day = map_left[week_view->selection_start_day];
week_view->selection_end_day = week_view->selection_start_day;
+ g_signal_emit_by_name (week_view, "selected_time_changed");
gtk_widget_queue_draw (week_view->main_canvas);
}
@@ -3536,9 +3536,9 @@ e_week_view_do_cursor_key_right (EWeekView *week_view)
if (week_view->selection_start_day == -1)
return;
- g_signal_emit_by_name (week_view, "selected_time_changed");
week_view->selection_start_day = map_right[week_view->selection_start_day];
week_view->selection_end_day = week_view->selection_start_day;
+ g_signal_emit_by_name (week_view, "selected_time_changed");
gtk_widget_queue_draw (week_view->main_canvas);
}
@@ -3548,9 +3548,9 @@ e_month_view_do_cursor_key_up (EWeekView *week_view)
if (week_view->selection_start_day < 7)
return;
- g_signal_emit_by_name (week_view, "selected_time_changed");
week_view->selection_start_day -= 7;
week_view->selection_end_day = week_view->selection_start_day;
+ g_signal_emit_by_name (week_view, "selected_time_changed");
gtk_widget_queue_draw (week_view->main_canvas);
}
@@ -3563,9 +3563,9 @@ e_month_view_do_cursor_key_down (EWeekView *week_view)
week_view->selection_start_day >= (weeks_shown - 1) * 7)
return;
- g_signal_emit_by_name (week_view, "selected_time_changed");
week_view->selection_start_day += 7;
week_view->selection_end_day = week_view->selection_start_day;
+ g_signal_emit_by_name (week_view, "selected_time_changed");
gtk_widget_queue_draw (week_view->main_canvas);
}
@@ -3575,9 +3575,9 @@ e_month_view_do_cursor_key_left (EWeekView *week_view)
if (week_view->selection_start_day <= 0)
return;
- g_signal_emit_by_name (week_view, "selected_time_changed");
week_view->selection_start_day--;
week_view->selection_end_day = week_view->selection_start_day;
+ g_signal_emit_by_name (week_view, "selected_time_changed");
gtk_widget_queue_draw (week_view->main_canvas);
}
@@ -3590,9 +3590,9 @@ e_month_view_do_cursor_key_right (EWeekView *week_view)
week_view->selection_start_day >= weeks_shown * 7 - 1)
return;
- g_signal_emit_by_name (week_view, "selected_time_changed");
week_view->selection_start_day++;
week_view->selection_end_day = week_view->selection_start_day;
+ g_signal_emit_by_name (week_view, "selected_time_changed");
gtk_widget_queue_draw (week_view->main_canvas);
}
--
cgit v1.2.3