Re: [evolution-patches] Bug 46351, Calendar:Accesskey for Time_z_one doesn't work




Carl sun wrote:

hi, *JP*
Just to inform you that attached is the final version of patch for bug 46351. I also closed the bug in bugzilla.
    Please check it!

  Carl.Sun


Look s good, I will commit them.

-York

On Fri, 2003-11-28 at 04:25, JP Rosevear wrote:

/On Thu, 2003-11-27 at 04:27, Carl sun wrote:
   This function (get_private_buttons) won't be be called from the
a11y directory,instead it is called by another function in my patch:
e_timezone_entry_mnemonic_activate (GtkWidget *widget, gboolean group_cycling). Now, I will give up this function(get_private_buttons).and Please
check my new version of this patch, and get it from the attachment!

Approved pending review by another Sun a11y hacker.

-JP/

------------------------------------------------------------------------

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1997
diff -u -r1.1997 ChangeLog
--- ChangeLog	3 Dec 2003 17:58:57 -0000	1.1997
+++ ChangeLog	6 Dec 2003 13:18:03 -0000
@@ -1,3 +1,11 @@
+2003-12-04 Carl Sun <carl sun sun com>
+
+	 Fixes #46351
+ + * gui/e-timezone-entry.c (e_timezone_entry_mnemonic_activate):
+          new function. override the  member function of GtkWidget to handle
+          mnemonic_activate signal of custom class ETimezoneEntry.
+
2003-12-03  Ettore Perazzoli  <ettore ximian com>

	* gui/tasks-control.c (tasks_control_activate): Do not call
Index: ./gui/e-timezone-entry.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-timezone-entry.c,v
retrieving revision 1.21
diff -u -r1.21 e-timezone-entry.c
--- ./gui/e-timezone-entry.c	20 Nov 2003 15:11:38 -0000	1.21
+++ ./gui/e-timezone-entry.c	6 Dec 2003 13:18:04 -0000
@@ -68,6 +68,8 @@
static void e_timezone_entry_init	(ETimezoneEntry	*tentry);
static void e_timezone_entry_destroy	(GtkObject	*object);

+static gboolean e_timezone_entry_mnemonic_activate (GtkWidget *widget,
+                                                    gboolean   group_cycling);
static void on_entry_changed		(GtkEntry	*entry,
					 ETimezoneEntry *tentry);
static void on_button_clicked		(GtkWidget	*widget,
@@ -86,11 +88,13 @@
e_timezone_entry_class_init		(ETimezoneEntryClass	*class)
{
	GtkObjectClass *object_class = (GtkObjectClass *) class;
-
+	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class) ;
+ object_class = (GtkObjectClass*) class;

	parent_class = g_type_class_peek_parent (class);

+	widget_class->mnemonic_activate = e_timezone_entry_mnemonic_activate;
	timezone_entry_signals[CHANGED] =
		gtk_signal_new ("changed",
				GTK_RUN_LAST,
@@ -157,6 +161,8 @@

	tentry = g_object_new (e_timezone_entry_get_type (), NULL);

+	GTK_WIDGET_SET_FLAGS (GTK_WIDGET(tentry), GTK_CAN_FOCUS);
+
	return GTK_WIDGET (tentry);
}

@@ -294,5 +300,21 @@
		gtk_widget_hide (priv->entry);

	g_free (name_buffer);
+}
+
+
+static gboolean
+e_timezone_entry_mnemonic_activate (GtkWidget *widget,
+                                    gboolean   group_cycling)
+{
+        GtkButton *button = NULL;
+ + if (GTK_WIDGET_CAN_FOCUS (widget)) {
+                button=((ETimezoneEntryPrivate*) ((ETimezoneEntry*) widget)->priv)->button;
+                if (button != NULL)
+                        gtk_widget_grab_focus (button);
+        }
+ + return TRUE;
}

Index: ./gui/dialogs/cal-prefs-dialog.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/cal-prefs-dialog.glade,v
retrieving revision 1.22
diff -u -r1.22 cal-prefs-dialog.glade
--- ./gui/dialogs/cal-prefs-dialog.glade	28 Apr 2003 19:06:38 -0000	1.22
+++ ./gui/dialogs/cal-prefs-dialog.glade	6 Dec 2003 13:18:08 -0000
@@ -116,6 +116,7 @@
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">timezone</property>
			</widget>
			<packing>
			  <property name="left_attach">0</property>
@@ -217,6 +218,7 @@
		      <child>
			<widget class="Custom" id="timezone">
			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
			  <property name="creation_function">make_timezone_entry</property>
			  <property name="int1">0</property>
			  <property name="int2">0</property>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]