Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

assetremove.C

Go to the documentation of this file.
00001 #include "assetremove.h"
00002 #include "language.h"
00003 #include "mwindow.h"
00004 #include "mwindowgui.h"
00005 
00006 
00007 
00008 AssetRemoveWindow::AssetRemoveWindow(MWindow *mwindow)
00009  : BC_Window(PROGRAM_NAME ": Remove assets", 
00010                                 mwindow->gui->get_abs_cursor_x(1),
00011                                 mwindow->gui->get_abs_cursor_y(1),
00012                                 320, 
00013                                 120, 
00014                                 -1, 
00015                                 -1, 
00016                                 0,
00017                                 0, 
00018                                 1)
00019 {
00020         this->mwindow = mwindow;
00021 }
00022 void AssetRemoveWindow::create_objects()
00023 {
00024         int x = 10, y = 10;
00025         add_subwindow(new BC_Title(x, y, _("Permanently remove from disk?")));
00026         add_subwindow(new BC_OKButton(this));
00027         add_subwindow(new BC_CancelButton(this));
00028         show_window();
00029         flush();
00030 }
00031 
00032 
00033 AssetRemoveThread::AssetRemoveThread(MWindow *mwindow)
00034  : Thread()
00035 {
00036         this->mwindow = mwindow;
00037         Thread::set_synchronous(0);
00038 }
00039 void AssetRemoveThread::run()
00040 {
00041         AssetRemoveWindow *window = new AssetRemoveWindow(mwindow);
00042         window->create_objects();
00043         int result = window->run_window();
00044         delete window;
00045         
00046         if(!result)
00047         {
00048                 mwindow->remove_assets_from_disk();
00049         }
00050 }
00051 
00052 
00053 

Generated on Sun Jan 8 13:38:50 2006 for Cinelerra-svn by  doxygen 1.4.4