Mercurial > audlegacy
comparison src/audacious/ui_fileopener.c @ 4786:a28b97667415
renaming
author | mf0102 <0102@gmx.at> |
---|---|
date | Mon, 29 Sep 2008 20:58:40 +0200 |
parents | 427c607c1568 |
children | f04094af8d57 |
comparison
equal
deleted
inserted
replaced
4785:427c607c1568 | 4786:a28b97667415 |
---|---|
106 | 106 |
107 return FALSE; | 107 return FALSE; |
108 } | 108 } |
109 | 109 |
110 static void | 110 static void |
111 util_run_filebrowser_gtk2style(gboolean play_button, gboolean show) | 111 run_filebrowser_gtk2style(gboolean play_button, gboolean show) |
112 { | 112 { |
113 static GtkWidget *window = NULL; | 113 static GtkWidget *window = NULL; |
114 GtkWidget *vbox, *hbox, *bbox; | 114 GtkWidget *vbox, *hbox, *bbox; |
115 GtkWidget *chooser; | 115 GtkWidget *chooser; |
116 GtkWidget *action_button, *close_button; | 116 GtkWidget *action_button, *close_button; |
242 filebrowser_changed_classic(GTK_FILE_SELECTION(data)); | 242 filebrowser_changed_classic(GTK_FILE_SELECTION(data)); |
243 } | 243 } |
244 | 244 |
245 | 245 |
246 static gboolean | 246 static gboolean |
247 util_filebrowser_is_dir_classic(GtkFileSelection * filesel) | 247 filebrowser_is_dir_classic(GtkFileSelection * filesel) |
248 { | 248 { |
249 char *text; | 249 char *text; |
250 struct stat buf; | 250 struct stat buf; |
251 gboolean retv = FALSE; | 251 gboolean retv = FALSE; |
252 | 252 |
299 static void | 299 static void |
300 filebrowser_ok_classic(GtkWidget * w, GtkWidget * filesel) | 300 filebrowser_ok_classic(GtkWidget * w, GtkWidget * filesel) |
301 { | 301 { |
302 gchar **files; | 302 gchar **files; |
303 | 303 |
304 if (util_filebrowser_is_dir_classic(GTK_FILE_SELECTION(filesel))) | 304 if (filebrowser_is_dir_classic(GTK_FILE_SELECTION(filesel))) |
305 return; | 305 return; |
306 files = gtk_file_selection_get_selections(GTK_FILE_SELECTION(filesel)); | 306 files = gtk_file_selection_get_selections(GTK_FILE_SELECTION(filesel)); |
307 filebrowser_add_files_classic(files, GTK_FILE_SELECTION(filesel)); | 307 filebrowser_add_files_classic(files, GTK_FILE_SELECTION(filesel)); |
308 gtk_widget_destroy(filesel); | 308 gtk_widget_destroy(filesel); |
309 } | 309 } |
311 static void | 311 static void |
312 filebrowser_play_classic(GtkWidget * w, GtkWidget * filesel) | 312 filebrowser_play_classic(GtkWidget * w, GtkWidget * filesel) |
313 { | 313 { |
314 gchar **files; | 314 gchar **files; |
315 | 315 |
316 if (util_filebrowser_is_dir_classic | 316 if (filebrowser_is_dir_classic |
317 (GTK_FILE_SELECTION(GTK_FILE_SELECTION(filesel)))) | 317 (GTK_FILE_SELECTION(GTK_FILE_SELECTION(filesel)))) |
318 return; | 318 return; |
319 playlist_clear(playlist_get_active()); | 319 playlist_clear(playlist_get_active()); |
320 files = gtk_file_selection_get_selections(GTK_FILE_SELECTION(filesel)); | 320 files = gtk_file_selection_get_selections(GTK_FILE_SELECTION(filesel)); |
321 filebrowser_add_files_classic(files, GTK_FILE_SELECTION(filesel)); | 321 filebrowser_add_files_classic(files, GTK_FILE_SELECTION(filesel)); |
353 (GTK_TREE_VIEW(filesel->file_list))); | 353 (GTK_TREE_VIEW(filesel->file_list))); |
354 gtk_entry_set_text(GTK_ENTRY(filesel->selection_entry), ""); | 354 gtk_entry_set_text(GTK_ENTRY(filesel->selection_entry), ""); |
355 } | 355 } |
356 | 356 |
357 static void | 357 static void |
358 util_run_filebrowser_classic(gboolean play_button, gboolean show) | 358 run_filebrowser_classic(gboolean play_button, gboolean show) |
359 { | 359 { |
360 static GtkWidget *dialog; | 360 static GtkWidget *dialog; |
361 GtkWidget *button_add_selected, *button_add_all, *button_close, | 361 GtkWidget *button_add_selected, *button_add_all, *button_close, |
362 *button_add; | 362 *button_add; |
363 char *title; | 363 char *title; |
473 */ | 473 */ |
474 void | 474 void |
475 run_filebrowser(gboolean play_button) | 475 run_filebrowser(gboolean play_button) |
476 { | 476 { |
477 if (!cfg.use_xmms_style_fileselector) | 477 if (!cfg.use_xmms_style_fileselector) |
478 util_run_filebrowser_gtk2style(play_button, TRUE); | 478 run_filebrowser_gtk2style(play_button, TRUE); |
479 else | 479 else |
480 util_run_filebrowser_classic(play_button, TRUE); | 480 run_filebrowser_classic(play_button, TRUE); |
481 } | 481 } |
482 | 482 |
483 void | 483 void |
484 hide_filebrowser(void) | 484 hide_filebrowser(void) |
485 { | 485 { |
486 if (!cfg.use_xmms_style_fileselector) | 486 if (!cfg.use_xmms_style_fileselector) |
487 util_run_filebrowser_gtk2style(FALSE, FALSE); | 487 run_filebrowser_gtk2style(FALSE, FALSE); |
488 else | 488 else |
489 util_run_filebrowser_classic(FALSE, FALSE); | 489 run_filebrowser_classic(FALSE, FALSE); |
490 } | 490 } |