12345678910111213141516171819202122232425262728293031323334 |
- using Gtk;
- namespace PpubViewer {
- public class PpubViewerApplication : Adw.Application {
- public PpubViewerApplication() {
- Object(application_id: "com.pcthingz.ppub.viewer", flags: GLib.ApplicationFlags.HANDLES_OPEN);
- }
- protected override void activate () {
- var window = new ViewerWindow(this);
- window.present ();
- }
- protected override void open (File[] files, string hint) {
- foreach (var file in files) {
- var window = new ViewerWindow(this);
- window.present ();
- window.load_ppub (file);
- }
- }
- }
- int main (string[] argv) {
- // Create a new application
- Gst.init (ref argv);
- var app = new PpubViewerApplication();
- return app.run (argv);
- }
-
- }
|