{
mwindow->gui->lock_window("MainProgressBar::stop_progress");
progress_bar->update(0);
- mwindow->gui->statusbar->default_message();
+ mwindow->gui->default_message();
mwindow->gui->unlock_window();
}
}
{
int result = 0;
brender_lock->lock("MWindow::brender_available 1");
- if(brender)
+ if(brender && brender_active)
{
if(brender->map_valid)
{
}
restart_brender();
}
- else
+ else {
+ edl->session->brender_start = edl->session->brender_end = 0;
stop_brender();
+ }
if( update ) {
gui->update_timebar(0);
gui->draw_overlays(1);
mainclock->update(mwindow->edl->local_session->get_selectionstart(1));
}
+int MWindowGUI::cursor_enter_event()
+{
+ reset_default_message();
+ return 0;
+}
+
int MWindowGUI::focus_in_event()
{
for(int i = 0; i < TOTAL_PANES; i++)
}
-int MWindowGUI::show_message(char *message, int color)
+void MWindowGUI::show_message(const char *message, int color)
{
-// printf("MWindowGUI::show_message %d: %s 0x%08x 0x%08x\n",
-// __LINE__, message, color, mwindow->theme->message_normal);
- if(color < 0) color = mwindow->theme->message_normal;
- statusbar->status_text->set_color(color);
- statusbar->status_text->update(message);
- return 0;
+ statusbar->set_message(message, color);
+}
+void MWindowGUI::set_default_message(const char *message)
+{
+ statusbar->set_default_message(message);
+}
+void MWindowGUI::reset_default_message()
+{
+ statusbar->reset_default_message();
+}
+void MWindowGUI::default_message()
+{
+ statusbar->default_message();
}
-
// Drag motion called from other window
int MWindowGUI::drag_motion()
void set_meter_format(int mode, int min, int max);
int translation_event();
+ int cursor_enter_event();
int resize_event(int w, int h); // handle a resize event
int button_release_event();
int keypress_event();
int menu_w();
int menu_h();
// Draw on the status bar only.
- int show_message(char *message, int color = -1);
+ void show_message(const char *message, int color = -1);
+ void set_default_message(const char *message);
+ void reset_default_message();
+ void default_message();
// Pop up a box if the statusbar is taken and show an error.
void show_error(char *message, int color = BLACK);
int repeat_event(int64_t duration);
sprintf(string2, _("Rendering took %s"), string);
mwindow->gui->lock_window("");
- mwindow->gui->show_message(string2);
+ mwindow->gui->set_default_message(string2);
mwindow->gui->stop_hourglass();
mwindow->gui->unlock_window();
}
mwindow->theme->mstatus_cancel_x,
mwindow->theme->mstatus_cancel_y));
//printf("StatusBar::create_objects 1\n");
- default_message();
+ reset_default_message();
flash();
}
flash(0);
}
-void StatusBar::set_message(char *text)
+void StatusBar::set_message(const char *text, int color)
{
+ if( color < 0 ) color = mwindow->theme->message_normal;
+ status_text->set_color(color);
status_text->update(text);
}
-
+void StatusBar::set_default_message(const char *text)
+{
+ strcpy(default_msg, text);
+ default_message();
+}
+void StatusBar::reset_default_message()
+{
+ set_default_message(_("Welcome to cinelerra"));
+}
void StatusBar::default_message()
{
- status_text->set_color(mwindow->theme->message_normal);
- status_text->update(_("Welcome to Cinelerra."));
+ set_message(default_msg, mwindow->theme->message_normal);
}
-
StatusBarCancel::StatusBarCancel(MWindow *mwindow, int x, int y)
: BC_Button(x, y, mwindow->theme->statusbar_cancel_data)
{
StatusBar(MWindow *mwindow, MWindowGUI *gui);
~StatusBar();
- void set_message(char *text);
+ void set_message(const char *text, int color=-1);
+ void set_default_message(const char *text);
+ void reset_default_message();
void default_message();
+
void create_objects();
void resize_event();
BC_ProgressBar *main_progress;
StatusBarCancel *main_progress_cancel;
BC_Title *status_text;
+ char default_msg[BCTEXTLEN];
};
class StatusBarCancel : public BC_Button
{
for( int i=0; i<DRAW_MODES; ++i )
add_item(new CriKeyDrawModeItem(draw_modes[i], i));
- update(gui->plugin->config.draw_mode);
+ update(gui->plugin->config.draw_mode, 0);
}
-void CriKeyDrawMode::update(int mode)
+void CriKeyDrawMode::update(int mode, int send)
{
if( this->mode == mode ) return;
this->mode = mode;
set_text(draw_modes[mode]);
gui->plugin->config.draw_mode = mode;
- gui->plugin->send_configure_change();
+ if( send ) gui->plugin->send_configure_change();
}
int CriKeyKeyModeItem::handle_event()
{
for( int i=0; i<KEY_MODES; ++i )
add_item(new CriKeyKeyModeItem(key_modes[i], i));
- update(gui->plugin->config.key_mode);
+ update(gui->plugin->config.key_mode, 0);
}
-void CriKeyKeyMode::update(int mode)
+void CriKeyKeyMode::update(int mode, int send)
{
if( this->mode == mode ) return;
this->mode = mode;
set_text(key_modes[mode]);
gui->draw_key(mode);
- gui->plugin->send_configure_change();
+ if( send ) gui->plugin->send_configure_change();
}
CriKeyColorButton::CriKeyColorButton(CriKeyWindow *gui, int x, int y)
CriKeyDrawMode(CriKeyWindow *gui, int x, int y);
void create_objects();
- void update(int mode);
+ void update(int mode, int send=1);
CriKeyWindow *gui;
int mode;
};
CriKeyKeyMode(CriKeyWindow *gui, int x, int y);
void create_objects();
- void update(int mode);
+ void update(int mode, int send=1);
CriKeyWindow *gui;
int mode;
};