aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-timezone-entry.c
diff options
context:
space:
mode:
authorLi Yuan <li.yuan@sun.com>2004-10-12 14:58:11 +0800
committerHarry Lu <haip@src.gnome.org>2004-10-12 14:58:11 +0800
commitc9e20b967bb7e1b679f10cb9d388c94a95c3bf06 (patch)
tree04ecf33cae558c39fba2627470110e7ed945e08b /calendar/gui/e-timezone-entry.c
parenta7ba5c21d168b35e2a950d82b90c141dd16ca3ba (diff)
downloadgsoc2013-evolution-c9e20b967bb7e1b679f10cb9d388c94a95c3bf06.tar
gsoc2013-evolution-c9e20b967bb7e1b679f10cb9d388c94a95c3bf06.tar.gz
gsoc2013-evolution-c9e20b967bb7e1b679f10cb9d388c94a95c3bf06.tar.bz2
gsoc2013-evolution-c9e20b967bb7e1b679f10cb9d388c94a95c3bf06.tar.lz
gsoc2013-evolution-c9e20b967bb7e1b679f10cb9d388c94a95c3bf06.tar.xz
gsoc2013-evolution-c9e20b967bb7e1b679f10cb9d388c94a95c3bf06.tar.zst
gsoc2013-evolution-c9e20b967bb7e1b679f10cb9d388c94a95c3bf06.zip
When the start year and the end year are the same, the num should be
2004-10-12 Li Yuan <li.yuan@sun.com> * 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
Diffstat (limited to 'calendar/gui/e-timezone-entry.c')
-rw-r--r--calendar/gui/e-timezone-entry.c40
1 files changed, 40 insertions, 0 deletions
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 <gnome.h>
#include <gal/util/e-util.h>
#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
+#include <libgnome/gnome-i18n.h>
#include "e-timezone-entry.h"
#include <e-util/e-icon-factory.h>
@@ -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;
+}
+