r1014: Enable horizontal scrolling with the mouse wheel by pressing Ctrl.
[cinelerra_cv/ct.git] / cinelerra / assetremove.C
blobfbb7961b473e88e5b81af574acdb468eec76379f
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(1),
11                                 mwindow->gui->get_abs_cursor_y(1),
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         }