maintenance: code cleanups and addition TODO: comments

This commit is contained in:
Stefan Sauer 2010-11-08 10:38:39 +02:00
parent 8c015b0207
commit abe637f399
3 changed files with 25 additions and 7 deletions

View file

@ -67,9 +67,13 @@ Duration:
== unsorted ==
- handle chapters
- if there is a "language-code" in the tags (or subtitles?) use flag icons
- tag lists
- if there is a "language-code" in the tags (or subtitles?) use flag icons
- handle album art in tag lists
- make urls clickable
- geo-tags: map-widget?, link to google-maps?
- artist: links to {last.fm,wikipedia}
= TODO for discoverer =
- get duration per stream
- this would need individual queries on the demuxer src pads

View file

@ -78,11 +78,17 @@ public class MediaInfo.App : Window
sub_menu = new Menu ();
item.set_submenu (sub_menu);
// TODO: add "open uri" item
// -> dialog with text entry
// -> discover that uri and clear selection in browser
item = new ImageMenuItem.from_stock (STOCK_QUIT, accel_group);
sub_menu.append (item);
item.activate.connect (Gtk.main_quit);
// TODO: add "help" menu with "about" item
return (menu_bar);
}

View file

@ -290,7 +290,7 @@ public class MediaInfo.Info : VBox
table.attach (label, 1, 2, row, row+1, fill_exp, 0, 3, 1);
row++;
// TODO: add named resolutions: (640x480=VGA)
// add named resolutions: (640x480=VGA)
label = new Label ("Resolution:");
label.set_alignment (1.0f, 0.5f);
table.attach (label, 0, 1, row, row+1, fill, 0, 0, 0);
@ -349,8 +349,7 @@ public class MediaInfo.Info : VBox
label = new Label ("Tags:");
label.set_alignment (1.0f, 0.0f);
table.attach (label, 0, 1, row, row+1, fill, fill, 0, 0);
str = s.to_string ();
str = str[8:-1].compress().replace(",","\n");
str = build_taglist_info (s);
label = new Label(str);
label.set_ellipsize (Pango.EllipsizeMode.END);
label.set_alignment (0.0f, 0.5f);
@ -440,8 +439,7 @@ public class MediaInfo.Info : VBox
label = new Label ("Tags:");
label.set_alignment (1.0f, 0.0f);
table.attach (label, 0, 1, row, row+1, fill, fill, 0, 0);
str = s.to_string ();
str = str[8:-1].compress().replace(",","\n");
str = build_taglist_info (s);
label = new Label(str);
label.set_ellipsize (Pango.EllipsizeMode.END);
label.set_alignment (0.0f, 0.5f);
@ -526,4 +524,14 @@ public class MediaInfo.Info : VBox
((GLib.Object)pb).set_property ("current-audio", (int)page_num);
}
}
private string build_taglist_info (Structure s)
{
// FIXME: properly loop over taglist items and serialize them
// this allows to properly newline them and to avoid the types in the result
string str = s.to_string ();
str = str[8:-1].compress().replace(",","\n");
return str;
}
}