diff options
author | waker <wakeroid@gmail.com> | 2012-09-11 21:35:14 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-09-11 21:35:14 +0200 |
commit | 41acf6572df6a38ea11196ab064e68d297d50ce1 (patch) | |
tree | df5d56f5b82dae26ad7a71c10d873e179463aa29 /plugins/gtkui/trkproperties.c | |
parent | e3784e72ffa60e2acb893e401155663560ee68d0 (diff) |
gtkui: fix key handling -- esc,ins,del work again
Diffstat (limited to 'plugins/gtkui/trkproperties.c')
-rw-r--r-- | plugins/gtkui/trkproperties.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/gtkui/trkproperties.c b/plugins/gtkui/trkproperties.c index 7d46e036..1ff8d21c 100644 --- a/plugins/gtkui/trkproperties.c +++ b/plugins/gtkui/trkproperties.c @@ -191,28 +191,29 @@ void on_add_field_activate (GtkMenuItem *menuitem, gpointer user_data); +int trkproperties_block_keyhandler = 0; + + gboolean on_trackproperties_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { -#if 0 + if (trkproperties_block_keyhandler) { + return FALSE; + } if (event->keyval == GDK_Escape) { - printf ("trkproperties esc\n"); on_trackproperties_delete_event (trackproperties, NULL, NULL); return TRUE; } else if (event->keyval == GDK_Delete) { - printf ("trkproperties del\n"); on_remove_field_activate (NULL, NULL); - return FALSE; + return TRUE; } else if (event->keyval == GDK_Insert) { - printf ("trkproperties ins\n"); on_add_field_activate (NULL, NULL); return TRUE; } -#endif return FALSE; } @@ -244,6 +245,7 @@ on_metadata_edited (GtkCellRendererText *renderer, gchar *path, gchar *new_text, gtk_list_store_set (store, &iter, 1, new_text, 3, 0, -1); trkproperties_modified = 1; } + trkproperties_block_keyhandler = 0; } // full metadata |