X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Feditpopup.C;h=e8d27b9609800942374ad2a56ae1f6138a72eebc;hb=b9f98da8f1cd8b7b31ead02fa41f299b56cac3da;hp=2f130edecf8f4f3f08db2a5dd1de3b5f810c40c1;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/editpopup.C b/cinelerra-5.1/cinelerra/editpopup.C index 2f130ede..e8d27b96 100644 --- a/cinelerra-5.1/cinelerra/editpopup.C +++ b/cinelerra-5.1/cinelerra/editpopup.C @@ -2,26 +2,35 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * */ +#include "asset.h" +#include "assets.h" +#include "awindow.h" +#include "awindowgui.h" #include "edit.h" #include "editpopup.h" +#include "edl.h" +#include "edlsession.h" +#include "file.h" #include "language.h" +#include "localsession.h" +#include "mainerror.h" #include "mainsession.h" #include "mwindow.h" #include "mwindowgui.h" @@ -31,15 +40,10 @@ #include "tracks.h" #include "trackcanvas.h" - #include EditPopup::EditPopup(MWindow *mwindow, MWindowGUI *gui) - : BC_PopupMenu(0, - 0, - 0, - "", - 0) + : BC_PopupMenu(0, 0, 0, "", 0) { this->mwindow = mwindow; this->gui = gui; @@ -58,6 +62,7 @@ void EditPopup::create_objects() add_item(new EditPopupAddTrack(mwindow, this)); // add_item(new EditPopupTitle(mwindow, this)); resize_option = 0; + matchsize_option = 0; } int EditPopup::update(Track *track, Edit *edit) @@ -73,10 +78,8 @@ int EditPopup::update(Track *track, Edit *edit) else if(track->data_type == TRACK_AUDIO && resize_option) { - remove_item(resize_option); - remove_item(matchsize_option); - resize_option = 0; - matchsize_option = 0; + del_item(resize_option); resize_option = 0; + del_item(matchsize_option); matchsize_option = 0; } return 0; } @@ -105,10 +108,8 @@ EditAttachEffect::~EditAttachEffect() int EditAttachEffect::handle_event() { dialog_thread->start_window(popup->track, - 0, - _(PROGRAM_NAME ": Attach Effect"), - 0, - popup->track->data_type); + 0, _(PROGRAM_NAME ": Attach Effect"), + 0, popup->track->data_type); return 1; } @@ -146,8 +147,6 @@ int EditMoveTrackDown::handle_event() } - - EditPopupResize::EditPopupResize(MWindow *mwindow, EditPopup *popup) : BC_MenuItem(_("Resize track...")) { @@ -167,10 +166,6 @@ int EditPopupResize::handle_event() } - - - - EditPopupMatchSize::EditPopupMatchSize(MWindow *mwindow, EditPopup *popup) : BC_MenuItem(_("Match output size")) { @@ -188,11 +183,6 @@ int EditPopupMatchSize::handle_event() } - - - - - EditPopupDeleteTrack::EditPopupDeleteTrack(MWindow *mwindow, EditPopup *popup) : BC_MenuItem(_("Delete track")) { @@ -206,10 +196,6 @@ int EditPopupDeleteTrack::handle_event() } - - - - EditPopupAddTrack::EditPopupAddTrack(MWindow *mwindow, EditPopup *popup) : BC_MenuItem(_("Add track")) { @@ -234,10 +220,6 @@ int EditPopupAddTrack::handle_event() } - - - - EditPopupTitle::EditPopupTitle(MWindow *mwindow, EditPopup *popup) : BC_MenuItem(_("User title...")) { @@ -313,6 +295,7 @@ int EditPopupTitleWindow::close_event() void EditPopupTitleWindow::create_objects() { + lock_window("EditPopupTitleWindow::create_objects"); int x = 5; int y = 10; @@ -325,10 +308,11 @@ void EditPopupTitleWindow::create_objects() show_window(); flush(); + unlock_window(); } -EditPopupTitleText::EditPopupTitleText (EditPopupTitleWindow *window, +EditPopupTitleText::EditPopupTitleText (EditPopupTitleWindow *window, MWindow *mwindow, int x, int y) : BC_TextBox(x, y, 250, 1, (char*)(window->edt ? window->edt->user_title : "")) { @@ -336,18 +320,12 @@ EditPopupTitleText::EditPopupTitleText (EditPopupTitleWindow *window, this->mwindow = mwindow; } -EditPopupTitleText::~EditPopupTitleText() -{ +EditPopupTitleText::~EditPopupTitleText() +{ } - + int EditPopupTitleText::handle_event() { return 1; } - - - - - -