Mercurial > mplayer.hg
comparison gui/dialog/fileselect.c @ 36097:64282f0366c6
Redesign on_FileSelect_key_release_event().
This will ease adding further key_release_event signals.
author | ib |
---|---|
date | Tue, 30 Apr 2013 11:52:15 +0000 |
parents | 2edbcc85bf5a |
children | b643292a330a |
comparison
equal
deleted
inserted
replaced
36096:2edbcc85bf5a | 36097:64282f0366c6 |
---|---|
530 GdkEvent *event, | 530 GdkEvent *event, |
531 gpointer user_data) | 531 gpointer user_data) |
532 { | 532 { |
533 (void)user_data; | 533 (void)user_data; |
534 | 534 |
535 if (GTK_WIDGET_TYPE(widget) == GTK_TYPE_BUTTON) { | |
536 if (event->key.keyval == GDK_Return) | |
537 gtk_button_released(GTK_BUTTON(widget)); | |
538 } else { | |
539 switch (event->key.keyval) { | 535 switch (event->key.keyval) { |
540 case GDK_Escape: | 536 case GDK_Escape: |
537 | |
538 if (GTK_IS_SCROLLED_WINDOW(widget)) | |
541 gtk_button_released(GTK_BUTTON(fsCancel)); | 539 gtk_button_released(GTK_BUTTON(fsCancel)); |
540 | |
542 break; | 541 break; |
543 | 542 |
544 case GDK_Return: | 543 case GDK_Return: |
544 | |
545 if (GTK_IS_SCROLLED_WINDOW(widget)) | |
545 gtk_button_released(GTK_BUTTON(fsOk)); | 546 gtk_button_released(GTK_BUTTON(fsOk)); |
547 else if (GTK_IS_BUTTON(widget)) | |
548 gtk_button_released(GTK_BUTTON(widget)); | |
549 | |
546 break; | 550 break; |
547 | 551 |
548 case GDK_BackSpace: | 552 case GDK_BackSpace: |
553 | |
554 if (GTK_IS_SCROLLED_WINDOW(widget)) { | |
549 gtk_button_released(GTK_BUTTON(fsUp)); | 555 gtk_button_released(GTK_BUTTON(fsUp)); |
550 gtk_widget_grab_focus(fsFNameList); | 556 gtk_widget_grab_focus(fsFNameList); |
557 } | |
558 | |
551 break; | 559 break; |
552 } | |
553 } | 560 } |
554 | 561 |
555 return FALSE; | 562 return FALSE; |
556 } | 563 } |
557 | 564 |