X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fswapchannels%2Fswapchannels.C;h=52ab4caf3005809fec32ba258e7f9a7f73a3d3c4;hp=cf169d26c99049b48f1dce1fa3b3a67fb6a53ae2;hb=54cc56bff09f5004b2a6cd454375f06e56acf5a0;hpb=834732af87bfd7f1d4035109f31e48db12b415fa diff --git a/cinelerra-5.1/plugins/swapchannels/swapchannels.C b/cinelerra-5.1/plugins/swapchannels/swapchannels.C index cf169d26..52ab4caf 100644 --- a/cinelerra-5.1/plugins/swapchannels/swapchannels.C +++ b/cinelerra-5.1/plugins/swapchannels/swapchannels.C @@ -47,11 +47,16 @@ REGISTER_PLUGIN(SwapMain) SwapConfig::SwapConfig() +{ + reset_Config(); +} + +void SwapConfig::reset_Config() { red = RED_SRC; green = GREEN_SRC; blue = BLUE_SRC; - alpha = ALPHA_SRC; + alpha = ALPHA_SRC; } @@ -81,9 +86,9 @@ void SwapConfig::copy_from(SwapConfig &that) SwapWindow::SwapWindow(SwapMain *plugin) : PluginClientWindow(plugin, 250, - 170, + 200, 250, - 170, + 200, 0) { this->plugin = plugin; @@ -117,6 +122,9 @@ void SwapWindow::create_objects() add_subwindow(alpha = new SwapMenu(plugin, &(plugin->config.alpha), x, y)); alpha->create_objects(); + y += 40; + add_subwindow(reset = new SwapReset(plugin, this, x, y)); + show_window(); flush(); } @@ -128,7 +136,6 @@ void SwapWindow::create_objects() - SwapMenu::SwapMenu(SwapMain *client, int *output, int x, int y) : BC_PopupMenu(x, y, 150, client->output_to_text(*output)) { @@ -171,7 +178,22 @@ int SwapItem::handle_event() - +SwapReset::SwapReset(SwapMain *plugin, SwapWindow *gui, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->plugin = plugin; + this->gui = gui; +} +SwapReset::~SwapReset() +{ +} +int SwapReset::handle_event() +{ + plugin->config.reset_Config(); + plugin->send_configure_change(); + plugin->update_gui(); + return 1; +}