public void Init(string path, bool create_if_missing) { bool new_db = !File.Exists(path); this.path = path; if (new_db && !create_if_missing) { throw new Exception(path + ": File not found"); } database = new QueuedSqliteDatabase(path); // Load or create the meta table meta_store = new MetaStore(Database, new_db); // Update the database schema if necessary FSpot.Database.Updater.Run(this); Database.BeginTransaction(); face_store = new FaceStore(Database, new_db); tag_store = new TagStore(Database, new_db); roll_store = new RollStore(Database, new_db); export_store = new ExportStore(Database, new_db); job_store = new JobStore(Database, new_db); photo_store = new PhotoStore(Database, new_db); Database.CommitTransaction(); empty = new_db; }
private FaceSpotDb() { uint timer = Log.DebugTimerStart (); Database.BeginTransaction (); //FIXME Decide whether to use true/false value face_store = new FaceStore (Database, false); photo_store_addon = new PhotoStoreAddOn(Database); training_data = new TrainingStore(Database); Database.CommitTransaction (); Log.DebugTimerPrint (timer, "FaceSpot Db Initialization took {0}"); }
// FIXME clicking the spinbutton too fast seems to switch the view to browse public FaceBox(Gtk.Box tb, PhotoImageView vw) : base() { m_list = new ArrayList(); face_store = Core.Database.Faces; View = vw; tag_store = FSpot.Core.Database.Tags; Gtk.Label lab = new Gtk.Label("Face det:"); lab.Show(); tb.PackStart(lab, false, true, 0); face_button = new ToolbarButton(); face_button.Add(new Gtk.Image("f-spot-sepia", IconSize.Button)); tb.PackStart(face_button, false, true, 0); face_button.Clicked += HandleFaceButtonClicked; tag_entry = new Gtk.Entry("test"); tag_entry.Show(); tag_entry.Sensitive = false; tb.PackStart(tag_entry, false, true, 0); m_newtag_button = new ToolbarButton(); m_newtag_button.Add(new Gtk.Image("f-spot-new-tag", IconSize.Button)); m_newtag_button.Show(); m_newtag_button.Sensitive = false; tb.PackStart(m_newtag_button, false, true, 0); m_newtag_button.Clicked += HandleNewTagButtonClicked; m_spin = new SpinButton(1, 1, 1); m_spin.Show(); m_spin.Sensitive = false; tb.PackStart(m_spin, false, true, 0); m_spin.Changed += HandleSpinChanged; //m.spin.ValueChanged += jesli w bazie, to pokaz jego tag //this.Add(tag_widget); }
// FIXME clicking the spinbutton too fast seems to switch the view to browse public FaceBox (Gtk.Box tb, PhotoImageView vw) : base() { m_list = new ArrayList(); face_store = Core.Database.Faces; View = vw; tag_store = FSpot.Core.Database.Tags; Gtk.Label lab = new Gtk.Label("Face det:"); lab.Show(); tb.PackStart(lab, false, true, 0); face_button = new ToolbarButton (); face_button.Add (new Gtk.Image ("f-spot-sepia", IconSize.Button)); tb.PackStart (face_button, false, true, 0); face_button.Clicked += HandleFaceButtonClicked; tag_entry = new Gtk.Entry ("test"); tag_entry.Show(); tag_entry.Sensitive = false; tb.PackStart(tag_entry, false, true, 0); m_newtag_button = new ToolbarButton (); m_newtag_button.Add (new Gtk.Image ("f-spot-new-tag", IconSize.Button)); m_newtag_button.Show(); m_newtag_button.Sensitive = false; tb.PackStart(m_newtag_button,false,true,0); m_newtag_button.Clicked += HandleNewTagButtonClicked; m_spin = new SpinButton(1,1,1); m_spin.Show(); m_spin.Sensitive = false; tb.PackStart(m_spin, false, true, 0); m_spin.Changed += HandleSpinChanged; //m.spin.ValueChanged += jesli w bazie, to pokaz jego tag //this.Add(tag_widget); }
public void Init (string path, bool create_if_missing) { bool new_db = ! File.Exists (path); this.path = path; if (new_db && ! create_if_missing) throw new Exception (path + ": File not found"); database = new QueuedSqliteDatabase(path); // Load or create the meta table meta_store = new MetaStore (Database, new_db); // Update the database schema if necessary FSpot.Database.Updater.Run (this); Database.BeginTransaction (); face_store = new FaceStore (Database, new_db); tag_store = new TagStore (Database, new_db); roll_store = new RollStore (Database, new_db); export_store = new ExportStore (Database, new_db); job_store = new JobStore (Database, new_db); photo_store = new PhotoStore (Database, new_db); Database.CommitTransaction (); empty = new_db; }