r105: This commit was manufactured by cvs2svn to create tag
[cinelerra_cv/mob.git] / hvirtual / cinelerra / assetremove.C
blobd534b94b0577556b2c8fb69549080c57f539a7bc
1 #include "assetremove.h"
2 #include "mwindow.h"
3 #include "mwindowgui.h"
5 #include <libintl.h>
6 #define _(String) gettext(String)
7 #define gettext_noop(String) String
8 #define N_(String) gettext_noop (String)
11 AssetRemoveWindow::AssetRemoveWindow(MWindow *mwindow)
12  : BC_Window(PROGRAM_NAME ": Remove assets", 
13                                 mwindow->gui->get_abs_cursor_x(),
14                                 mwindow->gui->get_abs_cursor_y(),
15                                 320, 
16                                 120, 
17                                 -1, 
18                                 -1, 
19                                 0,
20                                 0, 
21                                 1)
23         this->mwindow = mwindow;
25 void AssetRemoveWindow::create_objects()
27         int x = 10, y = 10;
28         add_subwindow(new BC_Title(x, y, _("Permanently remove from disk?")));
29         add_subwindow(new BC_OKButton(this));
30         add_subwindow(new BC_CancelButton(this));
31         show_window();
32         flush();
36 AssetRemoveThread::AssetRemoveThread(MWindow *mwindow)
37  : Thread()
39         this->mwindow = mwindow;
40         Thread::set_synchronous(0);
42 void AssetRemoveThread::run()
44         AssetRemoveWindow *window = new AssetRemoveWindow(mwindow);
45         window->create_objects();
46         int result = window->run_window();
47         delete window;
48         
49         if(!result)
50         {
51                 mwindow->remove_assets_from_disk();
52         }