Exemplo n.º 1
0
    public unsafe MphotoToplevel(IImageRepository _repo, string[] args, params object[] props)
        : base("Mphoto", "0.0", Modules.UI, args, props)
    {
        cwh = new Glade.XMLCustomWidgetHandler(GladeCustomWidgetHandler);
        Glade.XML.SetCustomHandler(cwh);
        gxml = new Glade.XML(null, "mphoto.glade", null, null);

        Console.WriteLine("Autoconnect");
        gxml.Autoconnect(this);

//        CreateCustomWidget ("browser_icon_list");
//        CreateCustomWidget ("collections_tree_view");
//        CreateCustomWidget ("imageinfo_tree_view");
//        CreateCustomWidget ("eog_image_view");
//        CreateCustomWidget ("keywords_widget");

        this.leftside_notebook  = (Gtk.Notebook)gxml["browser_left_notebook"];
        this.top_level_notebook = (Gtk.Notebook)gxml["top_level_notebook"];

        this.toplevel         = gxml["mphoto_browser"];
        this.label_zoom_value = (Gtk.Label)gxml["label_zoom_value"];
        this.search_dialog    = (Gtk.Window)gxml["search_dialog"];

        this.Repository = _repo;

        // initialize the tree views to the side
        imageinfo_tree_view.IconList = icon_list;
        keywords_widget.IconList     = icon_list;

        collections_tree_view.RowActivated += new RowActivatedHandler(CollectionsTreeViewActivateHandler);
        icon_list.Activated += new EventHandler(IconlistActivated);

        GlobalMphotoToplevel = this;
    }
Exemplo n.º 2
0
    static int Main(string [] args)
    {
        Application.Init();
//		string dbname = "mphoto";
        string dbname;
        string dirtoimport;
        string mphotodir = System.Environment.GetEnvironmentVariable("HOME") + "/.mphoto";

        dbname = "URI=file:" + mphotodir + "/" + "mphoto.db";

        IImageRepository repo;

        System.IO.DirectoryInfo dinfo = new System.IO.DirectoryInfo(mphotodir);
        dinfo.Create();

        // turn on sqlite debugging
//                int fd = open ("/tmp/sqlite.debug", 576, 420);
//                sqliteParserTrace (fdopen (fd, "rw"), ">");

        if (args.Length != 0)
        {
            repo = new DirImageRepository(args);
        }
        else
        {
            repo = new DbImageRepository(dbname);
        }

        MphotoToplevel tl = new MphotoToplevel(repo, args);

        tl.Toplevel.Show();

        try {
            Application.Run();
        } catch (TargetInvocationException e) {
            Console.WriteLine("TIE: " + e.InnerException);
        } finally {
            // yuck
            DbProvider.CloseProviders();
            Thumbnailer.KillThreads();
        }

        return(0);
    }
Exemplo n.º 3
0
	static int Main (string [] args)
	{
		Application.Init ();
//		string dbname = "mphoto";
                string dbname;
                string dirtoimport;
                string mphotodir = System.Environment.GetEnvironmentVariable ("HOME") + "/.mphoto";

                dbname = "URI=file:" + mphotodir + "/" + "mphoto.db";

                IImageRepository repo;

                System.IO.DirectoryInfo dinfo = new System.IO.DirectoryInfo (mphotodir);
                dinfo.Create ();

                // turn on sqlite debugging
//                int fd = open ("/tmp/sqlite.debug", 576, 420);
//                sqliteParserTrace (fdopen (fd, "rw"), ">");

		if (args.Length != 0) {
                    repo = new DirImageRepository (args);
                } else {
                    repo = new DbImageRepository (dbname);
                }

                MphotoToplevel tl = new MphotoToplevel (repo, args);
                tl.Toplevel.Show ();

		try {
			Application.Run ();
		} catch (TargetInvocationException e) {
			Console.WriteLine ("TIE: " + e.InnerException);
		} finally {
                        // yuck
                        DbProvider.CloseProviders ();
                        Thumbnailer.KillThreads ();
		}
		
		return 0;
	}
Exemplo n.º 4
0
	public unsafe MphotoToplevel (IImageRepository _repo, string[] args, params object[] props)
		: base ("Mphoto", "0.0", Modules.UI, args, props)
	{
		cwh = new Glade.XMLCustomWidgetHandler (GladeCustomWidgetHandler);
		Glade.XML.SetCustomHandler (cwh);
		gxml = new Glade.XML (null, "mphoto.glade", null, null);

		Console.WriteLine ("Autoconnect");
		gxml.Autoconnect (this);

//        CreateCustomWidget ("browser_icon_list");
//        CreateCustomWidget ("collections_tree_view");
//        CreateCustomWidget ("imageinfo_tree_view");
//        CreateCustomWidget ("eog_image_view");
//        CreateCustomWidget ("keywords_widget");

		this.leftside_notebook = (Gtk.Notebook) gxml["browser_left_notebook"];
		this.top_level_notebook = (Gtk.Notebook) gxml["top_level_notebook"];

		this.toplevel = gxml["mphoto_browser"];
		this.label_zoom_value = (Gtk.Label) gxml["label_zoom_value"];
		this.search_dialog = (Gtk.Window) gxml["search_dialog"];

		this.Repository = _repo;

		// initialize the tree views to the side
		imageinfo_tree_view.IconList = icon_list;
		keywords_widget.IconList = icon_list;

		collections_tree_view.RowActivated += new RowActivatedHandler (CollectionsTreeViewActivateHandler);
		icon_list.Activated += new EventHandler (IconlistActivated);

		GlobalMphotoToplevel = this;
	}