add BC_SCALE env var for hi def monitors, cleanup theme data
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / presetsgui.C.sav1
index b3ad7ed8d856f19bedef223f9930a023e9bd9a45..43c4c39ec39ba60eb01955d5ae16c22ba877d6f2 100644 (file)
@@ -2,21 +2,21 @@
 /*
  * CINELERRA
  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- * 
+ *
  * 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
- * 
+ *
  */
 
 #if 0
@@ -102,14 +102,14 @@ void PresetsThread::start_window(Plugin *plugin)
 BC_Window* PresetsThread::new_gui()
 {
        mwindow->gui->lock_window("PresetsThread::new_gui");
-       int x = mwindow->gui->get_abs_cursor_x(0) - 
+       int x = mwindow->gui->get_abs_cursor_x(0) -
                mwindow->session->plugindialog_w / 2;
-       int y = mwindow->gui->get_abs_cursor_y(0) - 
+       int y = mwindow->gui->get_abs_cursor_y(0) -
                mwindow->session->plugindialog_h / 2;
 
-       PresetsWindow *window = new PresetsWindow(mwindow, 
-               this, 
-               x, 
+       PresetsWindow *window = new PresetsWindow(mwindow,
+               this,
+               x,
                y,
                window_title);
 
@@ -150,7 +150,7 @@ void PresetsThread::save_preset(char *title)
        EDL *edl = mwindow->edl;
        Track *track = plugin->track;
        KeyFrame *keyframe = plugin->get_prev_keyframe(
-                       track->to_units(edl->local_session->get_selectionstart(1), 0), 
+                       track->to_units(edl->local_session->get_selectionstart(1), 0),
                        PLAY_FORWARD);
 
 // Send to database
@@ -215,7 +215,7 @@ void PresetsThread::apply_preset(char *title)
                KeyFrame *keyframe = plugin->get_keyframe();
                presets_db->load_preset(plugin_title, title, keyframe);
                mwindow->save_backup();
-               mwindow->undo->update_undo_after(_("apply preset"), LOAD_AUTOMATION); 
+               mwindow->undo->update_undo_after(_("apply preset"), LOAD_AUTOMATION);
 
                mwindow->update_plugin_guis();
                mwindow->gui->canvas->draw_overlays();
@@ -235,11 +235,11 @@ PresetsList::PresetsList(PresetsThread *thread,
        PresetsWindow *window,
        int x,
        int y,
-       int w, 
+       int w,
        int h)
- : BC_ListBox(x, 
-               y, 
-               w, 
+ : BC_ListBox(x,
+               y,
+               w,
                h,
                LISTBOX_TEXT,
                thread->data)
@@ -275,10 +275,10 @@ PresetsText::PresetsText(PresetsThread *thread,
        int x,
        int y,
        int w)
- : BC_TextBox(x, 
-       y, 
-       w, 
-       1, 
+ : BC_TextBox(x,
+       y,
+       w,
+       1,
        "")
 {
        this->thread = thread;
@@ -382,7 +382,7 @@ int PresetsOK::keypress_event()
        if(get_keypress() == RETURN)
        {
 printf("PresetsOK::keypress_event %d\n", __LINE__);
-               if(thread->presets_db->preset_exists(thread->plugin_title, 
+               if(thread->presets_db->preset_exists(thread->plugin_title,
                        window->title_text->get_text()))
                {
 printf("PresetsOK::keypress_event %d\n", __LINE__);
@@ -413,16 +413,11 @@ PresetsWindow::PresetsWindow(MWindow *mwindow,
        int x,
        int y,
        char *title_string)
- : BC_Window(title_string, 
-       x,
-       y,
-       mwindow->session->presetdialog_w, 
-       mwindow->session->presetdialog_h, 
-       320, 
-       240,
-       1,
-       0,
-       1)
+ : BC_Window(title_string,
+       x, y,
+       mwindow->session->presetdialog_w,
+       mwindow->session->presetdialog_h,
+       xS(320), yS(240), 1, 0, 1)
 {
        this->mwindow = mwindow;
        this->thread = thread;
@@ -442,7 +437,7 @@ void PresetsWindow::create_objects()
                this,
                theme->presets_list_x,
                theme->presets_list_y,
-               theme->presets_list_w, 
+               theme->presets_list_w,
                theme->presets_list_h));
        add_subwindow(title2 = new BC_Title(theme->presets_text_x,
                theme->presets_text_y - BC_Title::calculate_h(this, "P") - theme->widget_border,
@@ -485,7 +480,7 @@ int PresetsWindow::resize_event(int w, int h)
                theme->presets_text_y - BC_Title::calculate_h(this, "P") - theme->widget_border);
        list->reposition_window(theme->presets_list_x,
                theme->presets_list_y,
-               theme->presets_list_w, 
+               theme->presets_list_w,
                theme->presets_list_h);
        title_text->reposition_window(theme->presets_text_x,
                theme->presets_text_y,