r136: This commit was manufactured by cvs2svn to create tag 'hv_1_1_8'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / assetremove.C
blobcc090f6b06eb2d5186641c44c0db3976a2acb141
1 #include "assetremove.h"
2 #include "language.h"
3 #include "mwindow.h"
4 #include "mwindowgui.h"
8 AssetRemoveWindow::AssetRemoveWindow(MWindow *mwindow)
9  : BC_Window(PROGRAM_NAME ": Remove assets", 
10                                 mwindow->gui->get_abs_cursor_x(),
11                                 mwindow->gui->get_abs_cursor_y(),
12                                 320, 
13                                 120, 
14                                 -1, 
15                                 -1, 
16                                 0,
17                                 0, 
18                                 1)
20         this->mwindow = mwindow;
22 void AssetRemoveWindow::create_objects()
24         int x = 10, y = 10;
25         add_subwindow(new BC_Title(x, y, _("Permanently remove from disk?")));
26         add_subwindow(new BC_OKButton(this));
27         add_subwindow(new BC_CancelButton(this));
28         show_window();
29         flush();
33 AssetRemoveThread::AssetRemoveThread(MWindow *mwindow)
34  : Thread()
36         this->mwindow = mwindow;
37         Thread::set_synchronous(0);
39 void AssetRemoveThread::run()
41         AssetRemoveWindow *window = new AssetRemoveWindow(mwindow);
42         window->create_objects();
43         int result = window->run_window();
44         delete window;
45         
46         if(!result)
47         {
48                 mwindow->remove_assets_from_disk();
49         }