GDK_3,
GDK_4,
GDK_5,
- GDK_6
+ GDK_6,
+ GDK_s
};
guint keys[K_NUM];
else
keys[K_SPECIAL6] = defaultkeys[K_SPECIAL6];
+ p = gconf_client_get_string (gconf_client, "/apps/gtetrinet/keys/special_self", NULL);
+ if (p)
+ {
+ keys[K_SPECIAL_SELF] = gdk_keyval_to_lower (gdk_keyval_from_name (p));
+ g_free (p);
+ }
+ else
+ keys[K_SPECIAL_SELF] = defaultkeys[K_SPECIAL_SELF];
/* Get the timestamp option. */
timestampsenable = gconf_client_get_bool (gconf_client, "/apps/gtetrinet/partyline/enable_timestamps", NULL);
keys[K_SPECIAL6] = gdk_keyval_to_lower (gdk_keyval_from_name (gconf_value_get_string (gconf_entry_get_value (entry))));
}
+void
+keys_special_self_changed (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry)
+{
+
+ client = client;
+ cnxn_id = cnxn_id;
+
+ keys[K_SPECIAL_SELF] = gdk_keyval_to_lower (gdk_keyval_from_name (gconf_value_get_string (gconf_entry_get_value (entry))));
+}
+
void
partyline_enable_timestamps_changed (GConfClient *client,
guint cnxn_id,
actions[K_SPECIAL4] = _("Special to field 4");
actions[K_SPECIAL5] = _("Special to field 5");
actions[K_SPECIAL6] = _("Special to field 6");
+ actions[K_SPECIAL_SELF] = _("Special to self");
gconf_keys[K_RIGHT] = g_strdup ("/apps/gtetrinet/keys/right");
gconf_keys[K_LEFT] = g_strdup ("/apps/gtetrinet/keys/left");
gconf_keys[K_SPECIAL4] = g_strdup ("/apps/gtetrinet/keys/special4");
gconf_keys[K_SPECIAL5] = g_strdup ("/apps/gtetrinet/keys/special5");
gconf_keys[K_SPECIAL6] = g_strdup ("/apps/gtetrinet/keys/special6");
+ gconf_keys[K_SPECIAL_SELF] = g_strdup ("/apps/gtetrinet/keys/special_self");
for (i = 0; i < K_NUM; i ++) {
gtk_list_store_append (keys_store, &iter);
guint cnxn_id,
GConfEntry *entry);
+void
+keys_special_self_changed (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry);
+
void
partyline_enable_timestamps_changed (GConfClient *client,
guint cnxn_id,
K_SPECIAL4,
K_SPECIAL5,
K_SPECIAL6,
+ K_SPECIAL_SELF,
/* not a key but the number of configurable keys */
K_NUM
} GTetrinetKeys;
(GConfClientNotifyFunc) keys_special6_changed,
NULL, NULL, NULL);
+ gconf_client_notify_add (gconf_client, "/apps/gtetrinet/keys/special_self",
+ (GConfClientNotifyFunc) keys_special_self_changed,
+ NULL, NULL, NULL);
+
gconf_client_notify_add (gconf_client, "/apps/gtetrinet/partyline/enable_timestamps",
(GConfClientNotifyFunc) partyline_enable_timestamps_changed,
NULL, NULL, NULL);
tetris_drawcurrentblock ();
return TRUE;
}
+ else if (gdk_keyval_to_lower (keyval) == keys[K_SPECIAL_SELF]) {
+ tetrinet_specialkey(playernum);
+ tetris_drawcurrentblock ();
+ return TRUE;
+ }
+ else if (gdk_keyval_to_lower (keyval) == keys[K_SPECIAL_SELF]) {
+ tetrinet_specialkey(playernum);
+ tetris_drawcurrentblock ();
+ return TRUE;
+ }
tetris_drawcurrentblock ();
return FALSE;
}