Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CF: why invlock and mark (with mouse) did not work in GTK client
- To: crossfire (at) ifi.uio.no
- Subject: CF: why invlock and mark (with mouse) did not work in GTK client
- From: Maciej Kalisiak <>
- Date: Thu, 3 Dec 1998 16:20:11 -0500 (EST)
- Reply-To: Maciej Kalisiak <>
- Sender:
In GTK client these two things cannot be done with the mouse. Looking
at the code I see why: they were not yet implemented :)
Here is the patch that implents that, as well as a quick hack to get
rid of another annoying problem of losing "Run" and "Fire" key
bindings during the game (I've spoken with David about this and
this is the quick hack he recommends for now; he will be fixing this
more permanently some time in the future):
--- gx11.c.orig Thu Dec 3 12:25:28 1998
+++ gx11.c Thu Dec 3 16:10:31 1998
@@ -394,7 +394,7 @@
static GtkWidget *history_list = NULL;
static GtkWidget *gtkwin_config = NULL;
-static char last_str[MAX_BUF];
+static char last_str[2000];
static int pickup_mode = 0;
@@ -3340,7 +3340,10 @@
node = GTK_CLIST(gtklist)->selection;
tmp = gtk_clist_get_row_data (GTK_CLIST(gtklist), (gint)node->data);
gtk_clist_unselect_row (GTK_CLIST(gtklist), (gint)node->data, 0);
- client_send_examine (tmp->tag);
+ if (event->state == ShiftMask)
+ toggle_locked(tmp);
+ else
+ client_send_examine (tmp->tag);
}
}
if (event->type==GDK_BUTTON_PRESS && event->button==2) {
@@ -3349,7 +3352,10 @@
tmp = gtk_clist_get_row_data (GTK_CLIST(gtklist), (gint)node->data);
gtk_clist_unselect_row (GTK_CLIST(gtklist), (gint)node->data, 0);
- client_send_apply (tmp->tag);
+ if (event->state == ShiftMask)
+ send_mark_obj(tmp);
+ else
+ client_send_apply (tmp->tag);
}
}
if (event->type==GDK_BUTTON_PRESS && event->button==3) {
--
"Thinking of running your critical apps Maciej Kalisiak
on NT? Isn't there enough world
suffering?"
www.eecg.utoronto.ca/~mac