~ubuntu-branches/ubuntu/maverick/crossfire-client/maverick

« back to all changes in this revision

Viewing changes to gtk/keys.c

  • Committer: Bazaar Package Importer
  • Author(s): Kari Pahula
  • Date: 2007-04-13 21:15:44 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070413211544-vjo6zesj6g0wgmwf
Tags: 1.10.0-1
* New upstream release
* Install the README, README-dev and TODO files specific to the GTK2
  client to the corresponding package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
const char *rcsid_gtk_keys_c =
2
 
    "$Id: keys.c,v 1.23 2006/03/14 18:08:45 ryo_saeba Exp $";
 
2
    "$Id: keys.c 4963 2006-09-21 05:50:22Z mwedel $";
3
3
/*
4
4
    Crossfire client, a client program for the crossfire program.
5
5
 
983
983
    sprintf(buf,"Removed binding: %3d %s", count, get_key_info(key,0));
984
984
 
985
985
    draw_info(buf,NDI_BLACK);
986
 
    if (key->command) free(key->command);
 
986
    free(key->command);
987
987
    free(key);
988
988
    save_keys();
989
989
}
1193
1193
}
1194
1194
 
1195
1195
void ckeyunbind (GtkWidget *gtklist, GdkEventButton *event) {
1196
 
  gchar *buf;
1197
 
  GList *node;
1198
 
  node =  GTK_CLIST(cclist)->selection;
1199
 
  if (node) {
1200
 
    gtk_clist_get_text (GTK_CLIST(cclist), (gint)node->data, 0, &buf);
1201
 
 
1202
 
    unbind_key(buf);
1203
 
    draw_keybindings (cclist);
1204
 
 
1205
 
  }
 
1196
    gchar *buf;
 
1197
    GList *node;
 
1198
    node =  GTK_CLIST(cclist)->selection;
 
1199
 
 
1200
    if (node) {
 
1201
        /* this line generates an warning about mismatched pointer sizes.  Not sure
 
1202
         * if there is any good fix for it.
 
1203
         * In addition, this appears to be using unsupported logic -
 
1204
         * proper programming logic should not be accessing the clist->selection
 
1205
         * data directly.  Better approach would probably be to catch the selection
 
1206
         * in the clist, then store away what as selected.
 
1207
         */
 
1208
        gtk_clist_get_text (GTK_CLIST(cclist), (gint)node->data, 0, &buf);
 
1209
        unbind_key(buf);
 
1210
        draw_keybindings (cclist);
 
1211
    }
1206
1212
}
1207
1213
 
1208
1214
void ckeyentry_callback (GtkWidget *widget, GdkEventKey *event, GtkWidget *window) {