diff options
author | TingPing <tingping@tingping.se> | 2013-08-31 15:31:22 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2013-08-31 15:31:22 -0400 |
commit | 755932c3bc976d9a95e0b1b330efed31f7e48d9b (patch) | |
tree | 46168e7629f6a4cb772474d67ef60d2f781940d7 /src/fe-gtk/setup.c | |
parent | 4c406bce171db7086e394f69ae3cddd3b4dc8a87 (diff) |
Use mimetypes for audio and images
Diffstat (limited to 'src/fe-gtk/setup.c')
-rw-r--r-- | src/fe-gtk/setup.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 9923f654..f86c1eaa 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -1061,7 +1061,7 @@ setup_browsefile_cb (GtkWidget *button, GtkWidget *entry) { /* used for background image only */ gtkutil_file_req (_("Select an Image File"), setup_filereq_cb, - entry, NULL, "*.jpg;*.png;*.tif;*.gif", FRF_EXTENSIONS|FRF_RECENTLYUSED); + entry, NULL, "image/*", FRF_MIMETYPES|FRF_RECENTLYUSED); } static void @@ -1661,12 +1661,18 @@ static void setup_snd_browse_cb (GtkWidget *button, GtkEntry *entry) { char *sounds_dir = g_build_filename (get_xdir (), HEXCHAT_SOUND_DIR, NULL); - char *extensions = NULL; + char *filter = NULL; + int filter_type; #ifdef WIN32 /* win32 only supports wav, others could support anything */ - extensions = "*.wav"; + filter = "*.wav"; + filter_type = FRF_EXTENSIONS; +#else + filter = "audio/*"; + filter_type = FRF_MIMETYPES; #endif - gtkutil_file_req (_("Select a sound file"), setup_snd_filereq_cb, entry, sounds_dir, extensions, FRF_FILTERISINITIAL|FRF_EXTENSIONS); + gtkutil_file_req (_("Select a sound file"), setup_snd_filereq_cb, entry, + sounds_dir, filter, FRF_FILTERISINITIAL|filter_type); g_free (sounds_dir); } |