]> hydra-www.ietfng.org Git - gtetrinet/commitdiff
patch from Bastien Nocera which fixes focusing of the text entry when switching to...
authorJordi Albornoz <jordi@src.gnome.org>
Fri, 28 Jun 2002 21:33:26 +0000 (21:33 +0000)
committerJordi Albornoz <jordi@src.gnome.org>
Fri, 28 Jun 2002 21:33:26 +0000 (21:33 +0000)
ChangeLog
src/gtetrinet.c
src/partyline.c
src/partyline.h
src/tetrinet.c

index 5d7905aac2ef86ddf49882d77a90a26ec718457f..a57d2b0cc2473eb2aa5f618c1dec5beb2319c703 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-06-28  Jordi Mallach  <jordi@sindominio.net>
+
+       * src/gtetrinet.c, partyline.c, partyline.h, tetrinet.c:
+       patch from Bastien Nocera which fixes focusing of the text entry
+       when switching to the partyline page.
+
 2002-06-28  Jordi Mallach  <jordi@sindominio.net>
 
        * autogen.sh: added.
index 740587d73c95be0385fcd58f934d28f1500a8640..e6a7580503c42ad3f5e76d6591a61b2dc5b8cf3d 100644 (file)
@@ -146,6 +146,11 @@ int main (int argc, char *argv[])
     gtk_widget_show (label);
     gtk_notebook_append_page (GTK_NOTEBOOK(notebook), pwinlist, label);
 
+    /* add signal to focus the text entry when switching to the partyline page*/
+    gtk_signal_connect (GTK_OBJECT (notebook), "switch_page",
+                   GTK_SIGNAL_FUNC (partyline_switch_entryfocus),
+                   NULL);
+
     gtk_widget_show (notebook);
     gtk_widget_show (app);
 
index 571329d337af19cad44b33b81a5613c03d30b1f3..0c924df8d6937cb91e932fec19f5eb9aed79c7a2 100644 (file)
@@ -197,6 +197,11 @@ void partyline_entryfocus (void)
     if (connected) gtk_widget_grab_focus (entrybox);
 }
 
+void partyline_switch_entryfocus (void)
+{
+    if (connected) gtk_widget_grab_focus (entrybox);
+}
+
 void textentry (GtkWidget *widget, gpointer data)
 {
     char *text;
index 2801381a40a9c67361a8679323da9f2c607cf223..7a39ab1ae8a43c709dd9ce9368b57c8bf29b2731 100644 (file)
@@ -6,3 +6,4 @@ extern void partyline_status (char *status);
 extern void partyline_text (char *text);
 extern void partyline_playerlist (int *numbers, char **names, char **teams, int n, char **specs, int sn);
 extern void partyline_entryfocus (void);
+void partyline_switch_entryfocus (void);
index 1d78e550dfb0532df895835129e739f1882aa01d..cd5701261218c48302814ec4f9d5159007fcc87d 100644 (file)
@@ -118,7 +118,7 @@ struct sb sbinfo[] = {
 };
 
 static void tetrinet_updatelevels (void);
-static void tetrinet_setspeciallabel (signed char sb);
+static void tetrinet_setspeciallabel (int sb);
 static void tetrinet_dospecial (int from, int to, int type);
 static void tetrinet_specialkey (int pnum);
 static void tetrinet_shiftline (int l, int d, FIELD field);
@@ -730,7 +730,7 @@ void tetrinet_redrawfields (void)
         fields_drawfield (playerfield(i), fields[i]);
 }
 
-static void tetrinet_setspeciallabel (signed char sb)
+static void tetrinet_setspeciallabel (int sb)
 {
     int sbnum;
     if (sb == -1) {