? Makefile
? Makefile.in
? aclocal.m4
? autom4te.cache
? config.h
? config.h.in
? config.log
? config.status
? configure
? gcalctool.desktop
? intltool-extract
? intltool-extract.in
? intltool-merge
? intltool-merge.in
? intltool-update
? intltool-update.in
? stamp-h1
? gcalctool/Makefile
? gcalctool/Makefile.in
? gcalctool/gcalctool
Index: gcalctool/gtk.c
===================================================================
RCS file: /cvs/gnome/gcalctool/gcalctool/gtk.c,v
retrieving revision 1.67
diff -u -r1.67 gtk.c
--- gcalctool/gtk.c	26 Feb 2003 16:41:44 -0000	1.67
+++ gcalctool/gtk.c	27 Feb 2003 17:48:52 -0000
@@ -132,6 +132,8 @@
 static gboolean dismiss_aframe(GtkWidget *, GdkEvent *, gpointer);
 static gboolean dismiss_rframe(GtkWidget *, GdkEvent *, gpointer);
 static gboolean event_cb(GtkWidget *, GdkEvent *, gpointer);
+/* Hack fix for bug #106627. */
+static gboolean table_cb(GtkWidget *, GtkDirectionType, gpointer);
 
 static void about_cb(GtkWidget *, gpointer);
 static void add_cf_column(GtkTreeView *, gchar *, gint, gboolean);
@@ -1458,6 +1460,9 @@
         }
     }
 
+/* Hack fix for bug #106627. */
+    g_signal_connect(G_OBJECT(table), "focus", G_CALLBACK(table_cb), NULL);
+
     return(frame);
 }
 
@@ -1881,6 +1886,48 @@
     }
     gtk_window_set_focus(GTK_WINDOW(X->kframe), GTK_WIDGET(X->aframe_ch));
     gtk_widget_show(X->aframe);
+}
+
+
+/* Hack fix for bug #106627.
+ *
+ * The solution is to add a callback for the focus signal for the GtkTable
+ * was the Basic mode buttons. A check is made to see if the focus is
+ * currently with the Exch button and the focus direction is 
+ * GTK_DIR_TAB_FORWARD. If yes, then focus is explicitly set to the 
+ * appropriate next button, which is:
+ *
+ * Basic mode      - 7.
+ * Financial mode  - Ctrm
+ * Scientific mode - <
+ */
+
+static gboolean 
+table_cb(GtkWidget *table, GtkDirectionType dtype, gpointer user_data)
+{
+    GtkWidget *widget;
+
+    if (dtype == GTK_DIR_TAB_FORWARD &&
+        gtk_widget_is_focus(X->bas_buttons[(BROWS * BCOLS)-1])) {
+        switch (v->modetype) {
+            case BASIC:
+                widget = X->bas_buttons[0];
+                break;
+
+            case FINANCIAL:
+                widget = X->fin_buttons[0];
+                break;
+
+            case SCIENTIFIC:
+                widget = X->sci_buttons[0];
+                break;
+        }
+        gtk_widget_grab_focus(widget);
+
+        return(TRUE);
+    }
+
+    return(FALSE);
 }
 
 
