changeset 2432:4a1d1c324685 trunk

[svn] - restore shortcut key (esc) to close gtk2 fileopener.
author yaz
date Sun, 28 Jan 2007 01:54:28 -0800
parents 3ec22a11c83e
children 6cdccf094e51
files ChangeLog src/audacious/ui_fileopener.c
diffstat 2 files changed, 36 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Jan 27 12:10:21 2007 -0800
+++ b/ChangeLog	Sun Jan 28 01:54:28 2007 -0800
@@ -1,3 +1,21 @@
+2007-01-27 20:10:21 +0000  Michael Farber <01mf02@gmail.com>
+  revision [3872]
+  - moved titlestring.* and xconvert.* from libaudacious to audacious
+  
+  
+  trunk/src/audacious/Makefile         |    8 
+  trunk/src/audacious/titlestring.c    |  449 ++++++++++++++++++
+  trunk/src/audacious/titlestring.h    |   63 ++
+  trunk/src/audacious/xconvert.c       |  849 +++++++++++++++++++++++++++++++++++
+  trunk/src/audacious/xconvert.h       |   34 +
+  trunk/src/libaudacious/Makefile      |   22 
+  trunk/src/libaudacious/titlestring.c |  449 ------------------
+  trunk/src/libaudacious/titlestring.h |  120 ----
+  trunk/src/libaudacious/xconvert.c    |  849 -----------------------------------
+  trunk/src/libaudacious/xconvert.h    |   34 -
+  10 files changed, 1396 insertions(+), 1481 deletions(-)
+
+
 2007-01-27 19:40:05 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [3870]
   - make vfs_buffered_file_new_from_uri declaration const
--- a/src/audacious/ui_fileopener.c	Sat Jan 27 12:10:21 2007 -0800
+++ b/src/audacious/ui_fileopener.c	Sun Jan 28 01:54:28 2007 -0800
@@ -19,6 +19,7 @@
 
 #include <glib/gi18n.h>
 #include <string.h>
+#include <gdk/gdkkeysyms.h>
 
 #include "input.h"
 #include "main.h"
@@ -103,6 +104,19 @@
     gtk_widget_destroy(GTK_WIDGET(data));
 }
 
+static gboolean
+filebrowser_on_keypress(GtkWidget * browser,
+                        GdkEventKey * event,
+                        gpointer data)
+{
+    if (event->keyval == GDK_Escape) {
+	gtk_widget_destroy(browser);
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
 void
 util_run_filebrowser_gtk2style(gboolean play_button)
 {
@@ -168,6 +182,10 @@
     g_signal_connect(window, "destroy",
                      G_CALLBACK(gtk_widget_destroyed), &window);
 
+    g_signal_connect(window, "key_press_event",
+		     G_CALLBACK(filebrowser_on_keypress),
+		     NULL);
+
     gtk_widget_show_all(window);
 }