repair default keyframe load, tweak init default histogram threshold
[goodguy/history.git] / cinelerra-5.1 / cinelerra / channelinfo.C
index 140f3d30e509848b7cb26d7045228b6f806a68fd..177f2840447b3a87e77291d37323140bdc58847b 100644 (file)
@@ -1,3 +1,5 @@
+#ifdef HAVE_DVB
+
 #include "asset.h"
 #include "batch.h"
 #include "bctimer.h"
@@ -70,8 +72,8 @@ void ChanSearch::stop()
                if( gui ) gui->set_done(1);
                window_lock->unlock();
                Thread::cancel();
-               Thread::join();
        }
+       Thread::join();
 }
 
 void ChanSearch::run()
@@ -140,7 +142,7 @@ int ChanSearchMatchCase::handle_event()
 
 
 ChanSearchText::ChanSearchText(ChanSearchGUI *gui, int x, int y, int w)
- : BC_TextBox(x, y, w, 1, "") 
+ : BC_TextBox(x, y, w, 1, "")
 {
        this->gui = gui;
 }
@@ -257,12 +259,13 @@ int ChanSearchList::move_column_event()
 
 void ChanSearchGUI::create_objects()
 {
+       lock_window("ChanSearchGUI::create_objects");
        int pady = BC_TextBox::calculate_h(this, MEDIUMFONT, 0, 1) + 5;
        int padx = BC_Title::calculate_w(this, (char*)"X", MEDIUMFONT);
        int x = padx/2, y = pady/4;
-       text_x = x;  text_y = y;
        BC_Title *title = new BC_Title(text_x, text_y, _("Text:"), MEDIUMFONT, YELLOW);
        add_subwindow(title);  x += title->get_w();
+       text_x = x;  text_y = y;
        search_text = new ChanSearchText(this, x, y, get_w()-x-10);
        add_subwindow(search_text);
        x = padx;  y += pady + 5;
@@ -299,6 +302,7 @@ void ChanSearchGUI::create_objects()
 
        set_icon(iwindow->mwindow->theme->get_image("record_icon"));
        search_text->activate();
+       unlock_window();
 }
 
 ChanSearchGUI::ChanSearchGUI(ChanSearch *cswindow)
@@ -335,7 +339,7 @@ ChanSearchGUI::ChanSearchGUI(ChanSearch *cswindow)
        search_columns[1] = 1;
        search_columns[2] = 2;
        search_column_titles[0] = _("Source");
-       search_column_titles[1] = _("Title");
+       search_column_titles[1] = C_("Title");
        search_column_titles[2] = _("Start time");
        search_column_widths[0] = 120;
        search_column_widths[2] = 120;
@@ -344,7 +348,7 @@ ChanSearchGUI::ChanSearchGUI(ChanSearch *cswindow)
 
 ChanSearchGUI::~ChanSearchGUI()
 {
-       
+
        ChannelEvent *item = highlighted_event;
        if( item ) {
                panel->lock_window("ChanSearchGUI::~ChanSearchGUI");
@@ -560,8 +564,8 @@ void ChannelProgress::stop()
        if( Thread::running() ) {
                done = 1;
                Thread::cancel();
-               Thread::join();
        }
+       Thread::join();
 }
 
 void ChannelProgress::run()
@@ -626,7 +630,6 @@ ChannelDataItem::ChannelDataItem(ChannelPanel *panel, int x, int y, int w,
 {
        this->panel = panel;
        x0 = x;  y0 = y;
-       in_window = tooltip_done = 0;
        tip_info = 0;
        set_force_tooltip(1);
 }
@@ -636,25 +639,11 @@ ChannelDataItem::~ChannelDataItem()
        delete [] tip_info;
 }
 
-int ChannelDataItem::cursor_enter_event()
-{
-       if( is_event_win() ) { in_window = 1; tooltip_done = 0; }
-       else in_window = 0;
-       return 0;
-}
-
-int ChannelDataItem::cursor_leave_event()
-{
-       if( tooltip_done ) { hide_tooltip(); in_window = 0; }
-       return 0;
-}
-
 int ChannelDataItem::repeat_event(int64_t duration)
 {
-       if( !tooltip_done && tip_info && in_window &&
+       if( tip_info && cursor_above() &&
                duration == get_resources()->tooltip_delay ) {
                show_tooltip();
-               tooltip_done = 1;
                return 1;
        }
        return 0;
@@ -957,7 +946,7 @@ void ChannelPanel::get_xtime(int x, char *cp)
        struct tm xtm;  localtime_r(&xt,&xtm);
        cp += sprintf(cp,"%02d:%02d",xtm.tm_hour, xtm.tm_min);
        if( !xtm.tm_hour && !xtm.tm_min ) {
-               sprintf(cp,_("(%3.3s) "),&_("sunmontuewedthufrisat")[xtm.tm_wday*3]);
+               sprintf(cp,"(%3.3s) ",&_("sunmontuewedthufrisat")[xtm.tm_wday*3]);
        }
 }
 
@@ -1036,7 +1025,6 @@ int ChannelInfoFind::handle_event()
        return 1;
 }
 
-
 void ChannelThread::start()
 {
        if( !Thread::running() ) {
@@ -1050,8 +1038,8 @@ void ChannelThread::stop()
        if( Thread::running() ) {
                done = 1;
                Thread::cancel();
-               Thread::join();
        }
+       Thread::join();
 }
 
 ChannelThread::ChannelThread(ChannelInfoGUI *gui)
@@ -1060,7 +1048,7 @@ ChannelThread::ChannelThread(ChannelInfoGUI *gui)
        this->gui = gui;
        this->iwindow = gui->iwindow;
        this->panel = gui->panel;
-       
+
        fd = 0;
        done = 0;
 }
@@ -1297,6 +1285,7 @@ int ChannelInfoGUIBatches::handle_event()
 
 void ChannelInfoGUI::create_objects()
 {
+       lock_window("ChannelInfoGUI::create_objects");
        panel = new ChannelPanel(this,0,0,panel_w,panel_h);
        add_subwindow(panel);
        panel->create_objects();
@@ -1387,6 +1376,7 @@ void ChannelInfoGUI::create_objects()
 
        channel_search = new ChanSearch(iwindow);
        show_window();
+       unlock_window();
 }
 
 ChannelInfoGUI::ChannelInfoGUI(ChannelInfo *iwindow,
@@ -1655,8 +1645,8 @@ void ChannelInfo::stop()
                if( gui ) gui->stop(1);
                window_lock->unlock();
                Thread::cancel();
-               Thread::join();
        }
+       Thread::join();
 }
 
 void ChannelInfo::run()
@@ -1787,9 +1777,10 @@ void ChannelInfo::delete_batch()
 }
 
 ChannelScan::ChannelScan(MWindow *mwindow)
- : BC_MenuItem(_("Scan..."), _("Shift-S"), 'S')
+ : BC_MenuItem(_("Scan..."), _("Ctrl-Alt-s"), 's')
 {
-       set_shift();
+       set_ctrl();
+       set_alt();
        this->mwindow = mwindow;
 }
 
@@ -1946,4 +1937,5 @@ int ChannelDeleteBatch::handle_event()
        return RecordBatchesGUI::DeleteBatch::handle_event();
 }
 
+#endif