[Freeciv-Dev] PATCH: Another small UI patch.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
This adds the ability to double-click on a server in the metaserver list
and connect to it, which is what most people expect to happen. Once
these are committed (if?) the next patch(s) I do will be a big inclusive
one instead of a bunch of small ones, sorry for the inconvenience.
Luke Reeves, Neurotech
luke949@xxxxxxxxxxxx
http://www.submail.net/
http://www.neuro-tech.net/ Index: connectdlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/connectdlg.c,v
retrieving revision 1.19
diff -u -3 -p -r1.19 connectdlg.c
--- connectdlg.c 2000/06/23 16:39:40 1.19
+++ connectdlg.c 2000/07/19 11:42:04
@@ -109,6 +109,14 @@ void meta_list_callback(GtkWidget *w, gi
/**************************************************************************
...
+***************************************************************************/
+void meta_click_callback(GtkWidget *w, GdkEventButton *event, gpointer data)
+{
+ if (event->type==GDK_2BUTTON_PRESS) connect_callback(w, data);
+}
+
+/**************************************************************************
+...
**************************************************************************/
static gint connect_deleted_callback(GtkWidget *w, GdkEvent *ev, gpointer data)
{
@@ -216,6 +224,8 @@ void gui_server_connect(void)
gtk_signal_connect(GTK_OBJECT(list), "select_row",
GTK_SIGNAL_FUNC(meta_list_callback), NULL);
+ gtk_signal_connect(GTK_OBJECT(list), "button_press_event",
+ GTK_SIGNAL_FUNC(meta_click_callback), NULL);
gtk_signal_connect(GTK_OBJECT(update), "clicked",
GTK_SIGNAL_FUNC(meta_update_callback), (gpointer)list);
- [Freeciv-Dev] PATCH: Another small UI patch.,
Luke Reeves <=
|
|