2 #include "awindowgui.h"
3 #include "awindowmenu.h"
5 #include "edlsession.h"
13 AssetListMenu::AssetListMenu(MWindow *mwindow, AWindowGUI *gui)
20 this->mwindow = mwindow;
24 AssetListMenu::~AssetListMenu()
28 void AssetListMenu::create_objects()
30 add_item(format = new AssetListFormat(mwindow));
31 add_item(new AssetListSort(mwindow));
35 void AssetListMenu::update_titles()
47 AssetListFormat::AssetListFormat(MWindow *mwindow)
50 this->mwindow = mwindow;
53 void AssetListFormat::update()
55 set_text(mwindow->edl->session->assetlist_format == ASSETS_TEXT ?
56 (char*)_("Display icons") : (char*)_("Display text"));
59 int AssetListFormat::handle_event()
61 switch(mwindow->edl->session->assetlist_format)
64 mwindow->edl->session->assetlist_format = ASSETS_ICONS;
67 mwindow->edl->session->assetlist_format = ASSETS_TEXT;
72 if (!mwindow->awindow->gui->allow_iconlisting) {
73 mwindow->edl->session->assetlist_format = ASSETS_TEXT;
76 mwindow->awindow->gui->asset_list->update_format(
77 mwindow->edl->session->assetlist_format,
86 AssetListSort::AssetListSort(MWindow *mwindow)
87 : BC_MenuItem(_("Sort items"))
89 this->mwindow = mwindow;
92 int AssetListSort::handle_event()
94 mwindow->awindow->gui->sort_assets();
101 FolderListMenu::FolderListMenu(MWindow *mwindow, AWindowGUI *gui)
108 this->mwindow = mwindow;
112 FolderListMenu::~FolderListMenu()
116 void FolderListMenu::create_objects()
118 add_item(format = new FolderListFormat(mwindow, this));
124 void FolderListMenu::update_titles()
126 format->set_text(mwindow->edl->session->folderlist_format == FOLDERS_TEXT ?
127 (char*)_("Display icons") : (char*)_("Display text"));
136 FolderListFormat::FolderListFormat(MWindow *mwindow, FolderListMenu *menu)
139 this->mwindow = mwindow;
142 int FolderListFormat::handle_event()
144 switch(mwindow->edl->session->folderlist_format)
147 mwindow->edl->session->folderlist_format = ASSETS_ICONS;
150 mwindow->edl->session->folderlist_format = ASSETS_TEXT;
154 mwindow->awindow->gui->folder_list->update_format(mwindow->edl->session->folderlist_format, 1);
155 menu->update_titles();