cd bin && find -name '.svn' -exec rm -r {} \; -prune
rm -f bin/cutads
cp -a cinelerra/$(OBJDIR)/cutads bin/.
+ cp -a doc/manual.pdf bin/.
rm -f bin/new_db
$(MAKE) -C db/utils new_db
cp -a db/utils/new_db bin/.
$(OBJDIR)/strack.o \
$(OBJDIR)/swindow.o \
$(OBJDIR)/wwindow.o \
+ $(OBJDIR)/shbtnprefs.o \
# $(OBJDIR)/renderfarmfsclient.o \
# $(OBJDIR)/renderfarmfsserver.o \
--- /dev/null
+#ifndef SHBTN_DN_PNG_H
+#define SHBTN_DN_PNG_H
+
+static unsigned char shbtn_dn_png[] =
+{
+ 0x00, 0x00, 0x03, 0x65,
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
+ 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x19, 0x08, 0x02, 0x00, 0x00, 0x00, 0x4b, 0x8b, 0x12,
+ 0x34, 0x00, 0x00, 0x00, 0x1e, 0x74, 0x45, 0x58, 0x74, 0x44, 0x61, 0x74, 0x65, 0x00, 0x54, 0x68,
+ 0x75, 0x20, 0x41, 0x75, 0x67, 0x20, 0x20, 0x36, 0x20, 0x31, 0x34, 0x3a, 0x34, 0x31, 0x3a, 0x35,
+ 0x35, 0x20, 0x32, 0x30, 0x31, 0x35, 0x0a, 0x1b, 0xc8, 0xd9, 0x67, 0x00, 0x00, 0x03, 0x02, 0x49,
+ 0x44, 0x41, 0x54, 0x38, 0x8d, 0xad, 0x94, 0xcf, 0x6b, 0x5c, 0x55, 0x14, 0xc7, 0x3f, 0xe7, 0xdc,
+ 0xfb, 0x32, 0xf9, 0x31, 0xd1, 0x30, 0xc4, 0xd8, 0xda, 0x68, 0xc5, 0xba, 0x72, 0xe1, 0x46, 0xd2,
+ 0xa2, 0x20, 0xa2, 0x0b, 0x71, 0x63, 0x2b, 0x9a, 0x2c, 0x52, 0xa7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 0xe7, 0x85, 0xaf, 0x6e, 0x6d, 0x6d, 0xed, 0x9b, 0x3b, 0x48, 0x08, 0x90, 0x52, 0xfa,
+ 0x0b, 0x6b, 0xce, 0x33, 0x2d, 0x13, 0xac, 0xbb, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
+ 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
+#endif
--- /dev/null
+#ifndef SHBTN_HI_PNG_H
+#define SHBTN_HI_PNG_H
+
+static unsigned char shbtn_hi_png[] =
+{
+ 0x00, 0x00, 0x03, 0x59,
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
+ 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x19, 0x08, 0x02, 0x00, 0x00, 0x00, 0x4b, 0x8b, 0x12,
+ 0x34, 0x00, 0x00, 0x00, 0x1e, 0x74, 0x45, 0x58, 0x74, 0x44, 0x61, 0x74, 0x65, 0x00, 0x54, 0x68,
+ 0x75, 0x20, 0x41, 0x75, 0x67, 0x20, 0x20, 0x36, 0x20, 0x31, 0x34, 0x3a, 0x34, 0x31, 0x3a, 0x35,
+ 0x35, 0x20, 0x32, 0x30, 0x31, 0x35, 0x0a, 0x1b, 0xc8, 0xd9, 0x67, 0x00, 0x00, 0x02, 0xf6, 0x49,
+ 0x44, 0x41, 0x54, 0x38, 0x8d, 0xad, 0x94, 0xc1, 0x6b, 0x5c, 0x55, 0x14, 0xc6, 0x7f, 0xe7, 0xde,
+ 0x37, 0x13, 0x4c, 0x3b, 0x96, 0x24, 0xb8, 0x48, 0x41, 0xa4, 0x33, 0xa1, 0x05, 0x91, 0x6c, 0x6c,
+ 0x25, 0x74, 0xd5, 0x45, 0xc4, 0x60, 0x17, 0xee, 0x93, 0x42, 0x18, 0x04, 0x71, 0x1d, 0x5c, 0x04,
+ 0x61, 0xb2, 0x08, 0xe4, 0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 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
+#endif
--- /dev/null
+#ifndef SHBTN_UP_PNG_H
+#define SHBTN_UP_PNG_H
+
+static unsigned char shbtn_up_png[] =
+{
+ 0x00, 0x00, 0x03, 0x54,
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
+ 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x19, 0x08, 0x02, 0x00, 0x00, 0x00, 0x4b, 0x8b, 0x12,
+ 0x34, 0x00, 0x00, 0x00, 0x1e, 0x74, 0x45, 0x58, 0x74, 0x44, 0x61, 0x74, 0x65, 0x00, 0x54, 0x68,
+ 0x75, 0x20, 0x41, 0x75, 0x67, 0x20, 0x20, 0x36, 0x20, 0x31, 0x34, 0x3a, 0x34, 0x31, 0x3a, 0x35,
+ 0x35, 0x20, 0x32, 0x30, 0x31, 0x35, 0x0a, 0x1b, 0xc8, 0xd9, 0x67, 0x00, 0x00, 0x02, 0xf1, 0x49,
+ 0x44, 0x41, 0x54, 0x38, 0x8d, 0xad, 0x94, 0x4d, 0x6b, 0x1b, 0x57, 0x14, 0x86, 0xdf, 0x73, 0x3f,
+ 0x46, 0xa3, 0x52, 0xd7, 0x36, 0x92, 0xb5, 0x90, 0x4a, 0x37, 0x81, 0xd0, 0xd2, 0x42, 0x08, 0xc9,
+ 0x22, 0x5b, 0xa7, 0x24, 0xf9, 0x03, 0x86, 0x40, 0xfc, 0x03, 0x6a, 0xdc, 0x9d, 0x3f, 0xb4, 0xcf,
+ 0xa2, 0x8b, 0xb8, 0x7f, 0xa2, 0xa8, 0x16, 0x8e, 0xed, 0x85, 0x17, 0x21, 0x9b, 0x6c, 0x12, 0x28,
+ 0xa6, 0xd4, 0x98, 0x40, 0x36, 0x59, 0x78, 0x11, 0x43, 0x12, 0x19, 0x8a, 0x2a, 0xdb, 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a1, 0xef, 0x00, 0x01, 0x69, 0xca, 0xb9, 0x35, 0x59, 0xd9, 0xf3,
+ 0x2c, 0x90, 0x02, 0x01, 0x30, 0x2e, 0xfc, 0x0d, 0xb7, 0x9e, 0x03, 0x85, 0x1e, 0x8b, 0xd0, 0xd8,
+ 0x7a, 0xf6, 0x6d, 0xb8, 0x9d, 0x19, 0x27, 0x7c, 0xa0, 0xe8, 0x83, 0x76, 0x8f, 0xd1, 0xe9, 0x50,
+ 0xd4, 0x41, 0xb7, 0x03, 0x8e, 0xa0, 0x02, 0x22, 0x58, 0x0f, 0x1f, 0xc0, 0x07, 0xf0, 0x21, 0x82,
+ 0x00, 0x26, 0x03, 0xca, 0xa0, 0x5d, 0x3b, 0x6e, 0xef, 0x8f, 0x0f, 0x58, 0x1d, 0xb5, 0x8f, 0x5e,
+ 0x95, 0xde, 0x1c, 0xed, 0x07, 0x21, 0x29, 0x43, 0xe2, 0x21, 0xe0, 0xde, 0xb3, 0x0a, 0xc8, 0xc2,
+ 0x18, 0x18, 0x0b, 0x6b, 0x61, 0x7a, 0x83, 0x0c, 0xde, 0xbd, 0x0f, 0xfe, 0xae, 0x17, 0x8d, 0xd5,
+ 0x84, 0x45, 0xc6, 0x6e, 0xcb, 0xe5, 0xad, 0xb7, 0xa7, 0xdb, 0x73, 0x9e, 0x95, 0x9e, 0x16, 0x11,
+ 0xac, 0x4d, 0x5a, 0xeb, 0xb2, 0xd9, 0xec, 0x60, 0xfa, 0x33, 0xa4, 0x09, 0xdf, 0x18, 0xf3, 0x11,
+ 0xba, 0x5e, 0x1c, 0xa5, 0xd9, 0x76, 0x8d, 0xe2, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44,
+ 0xae, 0x42, 0x60, 0x82
+};
+
+#endif
#include "preferences.h"
#include "preferencesthread.h"
#include "interfaceprefs.h"
+#include "shbtnprefs.h"
#include "theme.h"
#if 0
InterfacePrefs::InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow)
: PreferencesDialog(mwindow, pwindow)
{
+ hms = 0;
+ hmsf = 0;
+ samples = 0;
+ frames = 0;
+ hex = 0;
+ feet = 0;
+ min_db = 0;
+ max_db = 0;
+// vu_db = 0;
+// vu_int = 0;
+ thumbnails = 0;
+ shbtn_dialog = 0;
}
+InterfacePrefs::~InterfacePrefs()
+{
+ delete hms;
+ delete hmsf;
+ delete samples;
+ delete frames;
+ delete hex;
+ delete feet;
+ delete min_db;
+ delete max_db;
+// delete vu_db;
+// delete vu_int;
+ delete thumbnails;
+ delete shbtn_dialog;
+}
+
+
void InterfacePrefs::create_objects()
{
int x, y;
add_subwindow(thumbnails = new ViewThumbnails(x, y, pwindow));
- int x2 = x + 320, y2 = y;
+ int x2 = x + 400, y2 = y;
AndroidRemote *android_remote = new AndroidRemote(pwindow, x2, y2);
add_subwindow(android_remote);
y2 += android_remote->get_h() + 10;
AndroidPIN *android_pin = new AndroidPIN(pwindow, x3, y2);
add_subwindow(android_pin);
+ y2 += title->get_h() + 30;
+ add_subwindow(new ShBtnPrefs(pwindow, this, x2, y2));
+
y += 35;
add_subwindow(new BC_Title(x, y, _("Clicking on edit boundaries does what:")));
y += 25;
return 0;
}
-InterfacePrefs::~InterfacePrefs()
-{
- delete hms;
- delete hmsf;
- delete samples;
- delete frames;
- delete hex;
- delete feet;
- delete min_db;
- delete max_db;
-// delete vu_db;
-// delete vu_int;
- delete thumbnails;
-}
-
-
return 1;
}
-
AndroidPIN::AndroidPIN(PreferencesWindow *pwindow, int x, int y)
: BC_TextBox(x, y, 240, 1, pwindow->thread->preferences->android_pin)
{
return 1;
}
+int InterfacePrefs::start_shbtn_dialog()
+{
+ if( !shbtn_dialog )
+ shbtn_dialog = new ShBtnEditDialog(pwindow);
+ shbtn_dialog->start();
+ return 1;
+}
+
+ShBtnPrefs::ShBtnPrefs(PreferencesWindow *pwindow, InterfacePrefs *iface_prefs, int x, int y)
+ : BC_GenericButton(x, y, _("Shell Commands"))
+{
+ this->pwindow = pwindow;
+ this->iface_prefs = iface_prefs;
+ set_tooltip(_("Main Menu Shell Commands"));
+}
+
+int ShBtnPrefs::handle_event()
+{
+ return iface_prefs->start_shbtn_dialog();
+}
+
#include "deleteallindexes.inc"
#include "mwindow.inc"
#include "preferencesthread.h"
+#include "shbtnprefs.inc"
class InterfacePrefs : public PreferencesDialog
// must delete each derived class
int update(int new_value);
const char* behavior_to_text(int mode);
+ int start_shbtn_dialog();
BrowseButton *ipath;
IndexSize *isize;
// MeterVUInt *vu_int;
ViewBehaviourText *button1, *button2, *button3;
ViewThumbnails *thumbnails;
+ ShBtnEditDialog *shbtn_dialog;
};
AndroidPort(PreferencesWindow *pwindow, int x, int y);
};
+class ShBtnPrefs : public BC_GenericButton
+{
+public:
+ PreferencesWindow *pwindow;
+ InterfacePrefs *iface_prefs;
+
+ int handle_event();
+ ShBtnPrefs(PreferencesWindow *pwindow, InterfacePrefs *iface_prefs, int x, int y);
+};
+
#endif
char batch_path[BCTEXTLEN];
char locale_path[BCTEXTLEN];
char exe_path[BCTEXTLEN];
+ char env_path[BCTEXTLEN];
int nice_value = 20;
int start_remote_control = 0;
config_path[0] = 0;
get_exe_path(exe_path);
+ snprintf(env_path, sizeof(env_path), "CINELERRA_PATH=%s", exe_path);
+ putenv(env_path);
sprintf(locale_path, "%s%s", exe_path, LOCALEDIR);
#include <string.h>
-MainMenu::MainMenu(MWindow *mwindow, MWindowGUI *gui)
- : BC_MenuBar(0, 0, gui->get_w())
+MainMenu::MainMenu(MWindow *mwindow, MWindowGUI *gui, int w)
+ : BC_MenuBar(0, 0, w)
{
this->gui = gui;
this->mwindow = mwindow;
class MainMenu : public BC_MenuBar
{
public:
- MainMenu(MWindow *mwindow, MWindowGUI *gui);
+ MainMenu(MWindow *mwindow, MWindowGUI *gui, int w);
~MainMenu();
void create_objects();
int load_defaults(BC_Hash *defaults);
#include "renderengine.h"
#include "resourcethread.h"
#include "samplescroll.h"
-#include "swindow.h"
+#include "shbtnprefs.h"
#include "statusbar.h"
+#include "swindow.h"
#include "theme.h"
#include "trackcanvas.h"
#include "trackscroll.h"
if(debug) printf("MWindowGUI::create_objects %d\n", __LINE__);
- add_subwindow(mainmenu = new MainMenu(mwindow, this));
+ int x = get_w() - MainShBtns::calculate_w(1);
+ add_subwindow(mainmenu = new MainMenu(mwindow, this, x));
+ add_subwindow(mainshbtns = new MainShBtns(mwindow, x, 0));
+ mainshbtns->load(mwindow->preferences);
mwindow->theme->get_mwindow_sizes(this, get_w(), get_h());
mwindow->theme->draw_mwindow_bg(this);
mainmenu->create_objects();
#include "resourcepixmap.h"
#include "resourcethread.inc"
#include "samplescroll.inc"
+#include "shbtnprefs.inc"
#include "statusbar.inc"
-#include "timelinepane.inc"
#include "swindow.inc"
+#include "timelinepane.inc"
#include "trackcanvas.inc"
#include "trackscroll.inc"
#include "transitionpopup.inc"
MainMenu *mainmenu;
+ MainShBtns *mainshbtns;
ZoomBar *zoombar;
StatusBar *statusbar;
PaneButton *pane_button;
#include "indexfile.h"
#include "mutex.h"
#include "preferences.h"
+#include "shbtnprefs.h"
#include "theme.h"
#include "videoconfig.h"
#include "videodevice.inc"
android_remote = that->android_remote;
android_port = that->android_port;
strcpy(android_pin, that->android_pin);
+ this->shbtn_prefs.remove_all_objects();
+ for( int i=0; i<that->shbtn_prefs.size(); ++i )
+ this->shbtn_prefs.append(new ShBtnPref(*that->shbtn_prefs[i]));
cache_size = that->cache_size;
force_uniprocessor = that->force_uniprocessor;
trap_sigsegv = that->trap_sigsegv;
}
}
+ shbtn_prefs.remove_all_objects();
+ int shbtns_total = defaults->get("SHBTNS_TOTAL", -1);
+ if( shbtns_total < 0 ) {
+ shbtn_prefs.append(new ShBtnPref("manual", "firefox file:///$CINELERRA_PATH/manual.pdf", 0));
+ shbtn_prefs.append(new ShBtnPref("online help", "firefox http://cinelerra.org/help.php/", 0));
+ shbtns_total = 0;
+ }
+ for( int i=0; i<shbtns_total; ++i ) {
+ char name[BCTEXTLEN], commands[BCTEXTLEN];
+ sprintf(string, "SHBTN%d_NAME", i);
+ defaults->get(string, name);
+ sprintf(string, "SHBTN%d_COMMANDS", i);
+ defaults->get(string, commands);
+ sprintf(string, "SHBTN%d_WARN", i);
+ int warn = defaults->get(string, 0);
+ shbtn_prefs.append(new ShBtnPref(name, commands, warn));
+ }
+
// Redo with the proper value of force_uniprocessor
processors = calculate_processors(0);
boundaries();
sprintf(string, "RENDERFARM_RATE%d", i);
defaults->update(string, renderfarm_rate.values[i]);
}
+ defaults->update("SHBTNS_TOTAL", shbtn_prefs.size());
+ for( int i=0; i<shbtn_prefs.size(); ++i ) {
+ ShBtnPref *pref = shbtn_prefs[i];
+ sprintf(string, "SHBTN%d_NAME", i);
+ defaults->update(string, pref->name);
+ sprintf(string, "SHBTN%d_COMMANDS", i);
+ defaults->update(string, pref->commands);
+ sprintf(string, "SHBTN%d_WARN", i);
+ defaults->update(string, pref->warn);
+ }
return 0;
}
#include "maxchannels.h"
#include "mutex.inc"
#include "preferences.inc"
+#include "shbtnprefs.inc"
#include "videoconfig.inc"
int android_remote;
int android_port;
char android_pin[BCSTRLEN];
+// shell cmd line menu ops
+ ArrayList<ShBtnPref *> shbtn_prefs;
// ====================================== Plugin Set ==============================
char plugin_dir[BCTEXTLEN];
#include "playbackprefs.h"
#include "preferences.h"
#include "recordprefs.h"
+#include "shbtnprefs.h"
#include "theme.h"
#include "trackcanvas.h"
#include "transportque.h"
mwindow->reset_android_remote();
mwindow->gui->mbuttons->ffmpeg_toggle->update(mwindow->preferences->ffmpeg_early_probe);
+ mwindow->gui->mainshbtns->load(mwindow->preferences);
//edl->session->recording_format->dump();
//mwindow->edl->session->recording_format->dump();
--- /dev/null
+#include "bcwindowbase.h"
+#include "bcdisplayinfo.h"
+#include "bcdialog.h"
+#include "language.h"
+#include "mainerror.h"
+#include "shbtnprefs.h"
+#include "preferences.h"
+#include "preferencesthread.h"
+
+#include <sys/wait.h>
+
+ShBtnRun::ShBtnRun(const char *nm, const char *cmds, int warn)
+ : Thread(0, 0, 1)
+{
+ strncpy(name, nm, sizeof(name)-1);
+ name[sizeof(name)-1] = 0;
+ strncpy(commands, cmds, sizeof(commands)-1);
+ commands[sizeof(commands)-1] = 0;
+ this->warn = warn;
+ start();
+}
+
+void ShBtnRun::run()
+{
+ pid_t pid = vfork();
+ if( pid < 0 ) {
+ perror("fork");
+ return;
+ }
+ if( pid > 0 ) {
+ int stat; waitpid(pid, &stat, 0);
+ if( warn && stat ) {
+ char msg[BCTEXTLEN];
+ sprintf(msg, "%s: error exit status %d", name, stat);
+ MainError::show_error(msg);
+ }
+ return;
+ }
+ char *const argv[4] = { (char*) "/bin/bash", (char*) "-c", commands, 0 };
+ execvp(argv[0], &argv[0]);
+}
+
+ShBtnPref::ShBtnPref(const char *nm, const char *cmds, int warn)
+{
+ strncpy(name, nm, sizeof(name));
+ strncpy(commands, cmds, sizeof(commands));
+ this->warn = warn;
+}
+
+ShBtnPref::~ShBtnPref()
+{
+}
+
+void ShBtnPref::execute()
+{
+ new ShBtnRun(name, commands, warn);
+}
+
+ShBtnEditDialog::ShBtnEditDialog(PreferencesWindow *pwindow)
+ : BC_DialogThread()
+{
+ this->pwindow = pwindow;
+}
+
+ShBtnEditDialog::~ShBtnEditDialog()
+{
+ close_window();
+}
+
+BC_Window* ShBtnEditDialog::new_gui()
+{
+ BC_DisplayInfo display_info;
+ int x = display_info.get_abs_cursor_x();
+ int y = display_info.get_abs_cursor_y();
+
+ sb_window = new ShBtnEditWindow(this, x, y);
+ sb_window->create_objects();
+ return sb_window;
+}
+
+void ShBtnEditDialog::handle_close_event(int result)
+{
+ sb_window = 0;
+}
+
+
+ShBtnEditWindow::ShBtnEditWindow(ShBtnEditDialog *shbtn_edit, int x, int y)
+ : BC_Window(_(PROGRAM_NAME ": Shell"), x, y, 300, 200, 300, 200, 0, 0, 1)
+{
+ this->shbtn_edit = shbtn_edit;
+ sb_dialog = 0;
+}
+
+ShBtnEditWindow::~ShBtnEditWindow()
+{
+ delete sb_dialog;
+}
+
+int ShBtnEditWindow::list_update()
+{
+ shbtn_items.remove_all_objects();
+ Preferences *preferences = shbtn_edit->pwindow->thread->preferences;
+ for( int i=0; i<preferences->shbtn_prefs.size(); ++i ) {
+ shbtn_items.append(new ShBtnPrefItem(preferences->shbtn_prefs[i]));
+ }
+ return op_list->update(&shbtn_items, 0, 0, 1);
+}
+
+ShBtnAddButton::ShBtnAddButton(ShBtnEditWindow *sb_window, int x, int y)
+ : BC_GenericButton(x, y, _("Add"))
+{
+ this->sb_window = sb_window;
+}
+
+ShBtnAddButton::~ShBtnAddButton()
+{
+}
+
+int ShBtnAddButton::handle_event()
+{
+
+ Preferences *preferences = sb_window->shbtn_edit->pwindow->thread->preferences;
+ ShBtnPref *pref = new ShBtnPref(_("new"), "", 0);
+ preferences->shbtn_prefs.append(pref);
+ sb_window->list_update();
+ return sb_window->start_edit(pref);
+}
+
+ShBtnDelButton::ShBtnDelButton(ShBtnEditWindow *sb_window, int x, int y)
+ : BC_GenericButton(x, y, _("Del"))
+{
+ this->sb_window = sb_window;
+}
+
+ShBtnDelButton::~ShBtnDelButton()
+{
+}
+
+int ShBtnDelButton::handle_event()
+{
+ ShBtnPrefItem *sp = (ShBtnPrefItem *)sb_window->op_list->get_selection(0,0);
+ if( !sp ) return 0;
+ Preferences *preferences = sb_window->shbtn_edit->pwindow->thread->preferences;
+ preferences->shbtn_prefs.remove(sp->pref);
+ sb_window->list_update();
+ return 1;
+}
+
+ShBtnEditButton::ShBtnEditButton(ShBtnEditWindow *sb_window, int x, int y)
+ : BC_GenericButton(x, y, _("Edit"))
+{
+ this->sb_window = sb_window;
+}
+
+ShBtnEditButton::~ShBtnEditButton()
+{
+}
+
+int ShBtnEditButton::handle_event()
+{
+ ShBtnPrefItem *sp = (ShBtnPrefItem *)sb_window->op_list->get_selection(0,0);
+ if( !sp ) return 0;
+ return sb_window->start_edit(sp->pref);
+}
+
+ShBtnTextDialog::ShBtnTextDialog(ShBtnEditWindow *sb_window)
+ : BC_DialogThread()
+{
+ this->sb_window = sb_window;
+ this->pref = 0;
+}
+
+ShBtnTextDialog::~ShBtnTextDialog()
+{
+ close_window();
+}
+
+ShBtnTextWindow::ShBtnTextWindow(ShBtnEditWindow *sb_window, int x, int y)
+ : BC_Window(_(PROGRAM_NAME ": Commands"), x, y, 640, 160, 640, 150, 0, 0, 1)
+{
+ this->sb_window = sb_window;
+ warn = sb_window->sb_dialog->pref->warn;
+}
+
+ShBtnTextWindow::~ShBtnTextWindow()
+{
+}
+
+ShBtnErrWarn::ShBtnErrWarn(ShBtnTextWindow *st_window, int x, int y)
+ : BC_CheckBox(x, y, &st_window->warn, "Warn on err exit")
+{
+ this->st_window = st_window;
+}
+
+ShBtnErrWarn::~ShBtnErrWarn()
+{
+}
+
+void ShBtnTextWindow::create_objects()
+{
+ int x = 10, y = 10;
+ int x1 = 160;
+ BC_Title *title = new BC_Title(x, y, _("Label:"));
+ add_subwindow(title);
+ title = new BC_Title(x1, y, _("Commands:"));
+ add_subwindow(title);
+ y += title->get_h() + 8;
+ ShBtnPref *pref = sb_window->sb_dialog->pref;
+ cmd_name = new BC_TextBox(x, y, 140, 1, pref->name);
+ add_subwindow(cmd_name);
+ cmd_text = new BC_ScrollTextBox(this, x1, y, get_w()-x1-20, 4, pref->commands);
+ cmd_text->create_objects();
+ y += cmd_text->get_h() + 8;
+ add_subwindow(st_err_warn = new ShBtnErrWarn(this, x1, y));
+ y = get_h() - ShBtnTextOK::calculate_h() - 10;
+ add_subwindow(new ShBtnTextOK(this, x, y));
+ show_window();
+}
+
+ShBtnTextOK::ShBtnTextOK(ShBtnTextWindow *st_window, int x, int y)
+ : BC_OKButton(x, y)
+{
+ this->st_window = st_window;
+}
+
+ShBtnTextOK::~ShBtnTextOK()
+{
+}
+
+int ShBtnTextOK::handle_event()
+{
+ ShBtnPref *pref = st_window->sb_window->sb_dialog->pref;
+ strcpy(pref->name, st_window->cmd_name->get_text());
+ strcpy(pref->commands, st_window->cmd_text->get_text());
+ pref->warn = st_window->warn;
+ return BC_OKButton::handle_event();
+}
+
+
+BC_Window *ShBtnTextDialog::new_gui()
+{
+ BC_DisplayInfo display_info;
+ int x = display_info.get_abs_cursor_x();
+ int y = display_info.get_abs_cursor_y();
+
+ st_window = new ShBtnTextWindow(sb_window, x, y);
+ st_window->create_objects();
+ return st_window;
+}
+
+void ShBtnTextDialog::handle_close_event(int result)
+{
+ if( !result ) {
+ sb_window->list_update();
+ }
+ st_window = 0;
+}
+
+int ShBtnTextDialog::start_edit(ShBtnPref *pref)
+{
+ this->pref = pref;
+ start();
+ return 1;
+}
+
+void ShBtnEditWindow::create_objects()
+{
+ Preferences *preferences = shbtn_edit->pwindow->thread->preferences;
+ for( int i=0; i<preferences->shbtn_prefs.size(); ++i ) {
+ shbtn_items.append(new ShBtnPrefItem(preferences->shbtn_prefs[i]));
+ }
+ int x = 10, y = 10;
+ add_subwindow(op_list = new ShBtnPrefList(this, x, y));
+ x = 190;
+ add_subwindow(add_button = new ShBtnAddButton(this, x, y));
+ y += add_button->get_h() + 8;
+ add_subwindow(del_button = new ShBtnDelButton(this, x, y));
+ y += del_button->get_h() + 8;
+ add_subwindow(edit_button = new ShBtnEditButton(this, x, y));
+ add_subwindow(new BC_OKButton(this));
+ show_window();
+}
+
+int ShBtnEditWindow::start_edit(ShBtnPref *pref)
+{
+ if( !sb_dialog )
+ sb_dialog = new ShBtnTextDialog(this);
+ return sb_dialog->start_edit(pref);
+}
+
+
+ShBtnPrefItem::ShBtnPrefItem(ShBtnPref *pref)
+ : BC_ListBoxItem(pref->name)
+{
+ this->pref = pref;
+}
+
+ShBtnPrefItem::~ShBtnPrefItem()
+{
+}
+
+ShBtnPrefList::ShBtnPrefList(ShBtnEditWindow *sb_window, int x, int y)
+ : BC_ListBox(x, y, 140, 100, LISTBOX_TEXT, &sb_window->shbtn_items, 0, 0)
+{
+ this->sb_window = sb_window;
+}
+
+ShBtnPrefList::~ShBtnPrefList()
+{
+}
+
+int ShBtnPrefList::handle_event()
+{
+ return 1;
+}
+
+MainShBtnItem::MainShBtnItem(MainShBtns *shbtns, ShBtnPref *pref)
+ : BC_MenuItem(pref->name)
+{
+ this->shbtns = shbtns;
+ this->pref = pref;
+}
+
+int MainShBtnItem::handle_event()
+{
+ pref->execute();
+ return 1;
+}
+
+#include "data/shbtn_up_png.h"
+#include "data/shbtn_hi_png.h"
+#include "data/shbtn_dn_png.h"
+
+static VFrame *shbtn_images[] = {
+ new VFrame(shbtn_up_png),
+ new VFrame(shbtn_hi_png),
+ new VFrame(shbtn_dn_png),
+};
+
+MainShBtns::MainShBtns(MWindow *mwindow, int x, int y)
+ : BC_PopupMenu(x, y, 32, "", 1, shbtn_images)
+{
+ this->mwindow = mwindow;
+ set_tooltip(_("shell cmds"));
+}
+
+int MainShBtns::load(Preferences *preferences)
+{
+ while( total_items() ) remove_item(get_item(0));
+ for( int i=0; i<preferences->shbtn_prefs.size(); ++i )
+ add_item(new MainShBtnItem(this, preferences->shbtn_prefs[i]));
+ return 0;
+}
+
+int MainShBtns::handle_event()
+{
+ return 1;
+}
+
--- /dev/null
+#ifndef __SHBTNPREFS_H__
+#define __SHBTNPREFS_H__
+
+#include "bcwindowbase.h"
+#include "bcbutton.h"
+#include "bcdialog.h"
+#include "bclistbox.h"
+#include "bclistboxitem.h"
+#include "preferences.inc"
+#include "preferencesthread.inc"
+#include "thread.h"
+#include "shbtnprefs.inc"
+
+
+class ShBtnRun : public Thread
+{
+public:
+ int warn;
+ char name[BCSTRLEN];
+ char commands[BCTEXTLEN];
+
+ ShBtnRun(const char *name, const char *cmds, int warn=0);
+ void run();
+};
+
+class ShBtnPref
+{
+public:
+ char name[BCSTRLEN];
+ char commands[BCTEXTLEN];
+ int warn;
+ void execute();
+
+ ShBtnPref(const char *nm, const char *cmds, int warn);
+ ~ShBtnPref();
+};
+
+class ShBtnEditDialog : public BC_DialogThread
+{
+public:
+ PreferencesWindow *pwindow;
+
+ ShBtnEditWindow *sb_window;
+ BC_Window* new_gui();
+ void handle_close_event(int result);
+
+ ShBtnEditDialog(PreferencesWindow *pwindow);
+ ~ShBtnEditDialog();
+};
+
+
+class ShBtnAddButton : public BC_GenericButton {
+public:
+ ShBtnEditWindow *sb_window;
+ int handle_event();
+
+ ShBtnAddButton(ShBtnEditWindow *sb_window, int x, int y);
+ ~ShBtnAddButton();
+};
+
+class ShBtnDelButton : public BC_GenericButton {
+public:
+ ShBtnEditWindow *sb_window;
+ int handle_event();
+
+ ShBtnDelButton(ShBtnEditWindow *sb_window, int x, int y);
+ ~ShBtnDelButton();
+};
+
+class ShBtnEditButton : public BC_GenericButton {
+public:
+ ShBtnEditWindow *sb_window;
+
+ int handle_event();
+
+ ShBtnEditButton(ShBtnEditWindow *sb_window, int x, int y);
+ ~ShBtnEditButton();
+};
+
+class ShBtnTextDialog : public BC_DialogThread
+{
+public:
+ ShBtnEditWindow *sb_window;
+ ShBtnTextWindow *st_window;
+ ShBtnPref *pref;
+
+ BC_Window* new_gui();
+ void handle_close_event(int result);
+ int start_edit(ShBtnPref *pref);
+
+ ShBtnTextDialog(ShBtnEditWindow *sb_window);
+ ~ShBtnTextDialog();
+};
+
+class ShBtnTextOK : public BC_OKButton
+{
+public:
+ ShBtnTextWindow *st_window;
+ int handle_event();
+
+ ShBtnTextOK(ShBtnTextWindow *st_window, int x, int y);
+ ~ShBtnTextOK();
+};
+
+class ShBtnErrWarn : public BC_CheckBox
+{
+public:
+ ShBtnErrWarn(ShBtnTextWindow *st_window, int x, int y);
+ ~ShBtnErrWarn();
+
+ ShBtnTextWindow *st_window;
+};
+
+class ShBtnTextWindow : public BC_Window
+{
+public:
+ BC_TextBox *cmd_name;
+ BC_ScrollTextBox *cmd_text;
+ ShBtnEditWindow *sb_window;
+ ShBtnErrWarn *st_err_warn;
+ int warn;
+
+ void create_objects();
+
+ ShBtnTextWindow(ShBtnEditWindow *sb_window, int x, int y);
+ ~ShBtnTextWindow();
+};
+
+class ShBtnPrefItem : public BC_ListBoxItem {
+public:
+ ShBtnPref *pref;
+
+ ShBtnPrefItem(ShBtnPref *item);
+ ~ShBtnPrefItem();
+};
+
+class ShBtnPrefList : public BC_ListBox
+{
+public:
+ ShBtnEditWindow *sb_window;
+ int handle_event();
+
+ ShBtnPrefList(ShBtnEditWindow *sb_window, int x, int y);
+ ~ShBtnPrefList();
+};
+
+class ShBtnEditWindow : public BC_Window
+{
+public:
+ ShBtnAddButton *add_button;
+ ShBtnDelButton *del_button;
+ ShBtnEditButton *edit_button;
+ ShBtnTextDialog *sb_dialog;
+ ArrayList<BC_ListBoxItem *> shbtn_items;
+ ShBtnPrefList *op_list;
+
+ void create_objects();
+ int list_update();
+ int start_edit(ShBtnPref *pref);
+
+ ShBtnEditWindow(ShBtnEditDialog *shbtn_edit, int x, int y);
+ ~ShBtnEditWindow();
+
+ ShBtnEditDialog *shbtn_edit;
+};
+
+class MainShBtnItem : public BC_MenuItem
+{
+public:
+ MainShBtnItem(MainShBtns *shbtns, ShBtnPref *pref);
+ int handle_event();
+
+ MainShBtns *shbtns;
+ ShBtnPref *pref;
+};
+
+class MainShBtns : public BC_PopupMenu
+{
+public:
+ MainShBtns(MWindow *mwindow, int x, int y);
+ int load(Preferences *preferences);
+ int handle_event();
+
+ MWindow *mwindow;
+};
+
+#endif
--- /dev/null
+#ifndef __CMDLNPREFS_INC__
+#define __CMDLNPREFS_INC__
+
+class ShBtnRun;
+class ShBtnPref;
+class ShBtnEditDialog;
+class ShBtnAddButton;
+class ShBtnDelButton;
+class ShBtnEditButton;
+class ShBtnTextDialog;
+class ShBtnTextOK;
+class ShBtnErrWarn;
+class ShBtnTextWindow;
+class ShBtnPrefItem;
+class ShBtnPrefList;
+class ShBtnEditWindow;
+class MainShBtnItem;
+class MainShBtns;
+
+#endif
gui->unlock_window();
}
startup_lock->unlock();
- cancel();
- join();
delete startup_lock;
delete window_lock;
gui->unlock_window();
}
unlock_window();
+ join();
}
const char *text,
int use_title,
VFrame **data)
- : BC_SubWindow(x, y, w, -1, -1)
+ : BC_SubWindow(x, y, 0, -1, -1)
{
highlighted = popup_down = 0;
menu_popup = 0;