Mercurial > audlegacy
comparison src/audacious/input.c @ 3081:ba2143c1c6f5
unescape url encoded filename where real filename is needed.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Tue, 17 Jul 2007 00:31:43 +0900 |
parents | 84de3244aeaa |
children | 35e560fa183f |
comparison
equal
deleted
inserted
replaced
3080:5dc103115dab | 3081:ba2143c1c6f5 |
---|---|
530 GtkWidget *label, *filename_hbox, *filename_entry; | 530 GtkWidget *label, *filename_hbox, *filename_entry; |
531 GtkWidget *bbox, *cancel; | 531 GtkWidget *bbox, *cancel; |
532 | 532 |
533 gchar *title, *fileinfo, *basename, *iplugin; | 533 gchar *title, *fileinfo, *basename, *iplugin; |
534 gchar *filename_utf8; | 534 gchar *filename_utf8; |
535 gchar *realfn = NULL; | |
535 | 536 |
536 window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 537 window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
537 gtk_window_set_resizable(GTK_WINDOW(window), FALSE); | 538 gtk_window_set_resizable(GTK_WINDOW(window), FALSE); |
538 gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); | 539 gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); |
539 | 540 |
540 basename = g_path_get_basename(filename); | 541 realfn = g_filename_from_uri(filename, NULL, NULL); |
542 basename = g_path_get_basename(realfn ? realfn : filename); | |
541 fileinfo = filename_to_utf8(basename); | 543 fileinfo = filename_to_utf8(basename); |
542 title = g_strdup_printf(_("audacious: %s"), fileinfo); | 544 title = g_strdup_printf(_("audacious: %s"), fileinfo); |
543 | 545 |
544 gtk_window_set_title(GTK_WINDOW(window), title); | 546 gtk_window_set_title(GTK_WINDOW(window), title); |
545 | 547 |
557 | 559 |
558 label = gtk_label_new(_("Filename:")); | 560 label = gtk_label_new(_("Filename:")); |
559 gtk_box_pack_start(GTK_BOX(filename_hbox), label, FALSE, TRUE, 0); | 561 gtk_box_pack_start(GTK_BOX(filename_hbox), label, FALSE, TRUE, 0); |
560 | 562 |
561 filename_entry = gtk_entry_new(); | 563 filename_entry = gtk_entry_new(); |
562 filename_utf8 = filename_to_utf8(filename); | 564 filename_utf8 = filename_to_utf8(realfn ? realfn : filename); |
565 g_free(realfn); realfn = NULL; | |
563 | 566 |
564 gtk_entry_set_text(GTK_ENTRY(filename_entry), filename_utf8); | 567 gtk_entry_set_text(GTK_ENTRY(filename_entry), filename_utf8); |
565 gtk_editable_set_editable(GTK_EDITABLE(filename_entry), FALSE); | 568 gtk_editable_set_editable(GTK_EDITABLE(filename_entry), FALSE); |
566 gtk_box_pack_start(GTK_BOX(filename_hbox), filename_entry, TRUE, TRUE, 0); | 569 gtk_box_pack_start(GTK_BOX(filename_hbox), filename_entry, TRUE, TRUE, 0); |
567 | 570 |