app: add about dialog

This commit is contained in:
Stefan Sauer 2011-01-13 12:21:46 +02:00
parent 82c8e8be59
commit 0265bc834f

View file

@ -105,7 +105,16 @@ public class MediaInfo.App : Window
sub_menu.append (citem); sub_menu.append (citem);
citem.toggled.connect (on_fullscreen_toggled); citem.toggled.connect (on_fullscreen_toggled);
// TODO: add "help" menu with "about" item // add "help" menu with "about" item
item = new MenuItem.with_label (_("Help"));
menu_bar.append (item);
sub_menu = new Menu ();
item.set_submenu (sub_menu);
item = new ImageMenuItem.from_stock (STOCK_ABOUT, accel_group);
sub_menu.append (item);
item.activate.connect (on_about_clicked);
return (menu_bar); return (menu_bar);
} }
@ -131,5 +140,17 @@ public class MediaInfo.App : Window
unfullscreen(); unfullscreen();
} }
} }
private void on_about_clicked (MenuItem item)
{
AboutDialog dlg = new AboutDialog ();
dlg.set_version(Config.PACKAGE_VERSION);
dlg.set_program_name("GStreamer Media Info");
dlg.set_comments(_("Quickly browse, play and analyze media files."));
dlg.set_copyright("Stefan Sauer <ensonic@users.sf.net>");
dlg.run();
dlg.hide();
}
} }