|
|
@ -81,8 +81,8 @@ struct KMPLAYER_NO_EXPORT GroupPredicate {
|
|
|
|
!part->master () && !part->url ().isEmpty ()) ||
|
|
|
|
!part->master () && !part->url ().isEmpty ()) ||
|
|
|
|
(m_part->allowRedir (part->m_docbase) &&
|
|
|
|
(m_part->allowRedir (part->m_docbase) &&
|
|
|
|
(part->m_group == m_group ||
|
|
|
|
(part->m_group == m_group ||
|
|
|
|
part->m_group == TQString::tqfromLatin1("_master") ||
|
|
|
|
part->m_group == TQString::fromLatin1("_master") ||
|
|
|
|
m_group == TQString::tqfromLatin1("_master")) &&
|
|
|
|
m_group == TQString::fromLatin1("_master")) &&
|
|
|
|
(part->m_features & KMPlayerPart::Feat_Viewer) !=
|
|
|
|
(part->m_features & KMPlayerPart::Feat_Viewer) !=
|
|
|
|
(m_part->m_features & KMPlayerPart::Feat_Viewer)));
|
|
|
|
(m_part->m_features & KMPlayerPart::Feat_Viewer)));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -128,9 +128,9 @@ KDE_NO_EXPORT KParts::Part *KMPlayerFactory::createPartObject
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
static bool getBoolValue (const TQString & value) {
|
|
|
|
static bool getBoolValue (const TQString & value) {
|
|
|
|
return (value.lower() != TQString::tqfromLatin1("false") &&
|
|
|
|
return (value.lower() != TQString::fromLatin1("false") &&
|
|
|
|
value.lower() != TQString::tqfromLatin1("off") &&
|
|
|
|
value.lower() != TQString::fromLatin1("off") &&
|
|
|
|
value.lower() != TQString::tqfromLatin1("0"));
|
|
|
|
value.lower() != TQString::fromLatin1("0"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#define SET_FEAT_ON(f) { m_features |= f; turned_off_features &= ~f; }
|
|
|
|
#define SET_FEAT_ON(f) { m_features |= f; turned_off_features &= ~f; }
|
|
|
@ -184,13 +184,13 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (TQWidget * wparent, const char *
|
|
|
|
urlsource->setURL (KURL (value));
|
|
|
|
urlsource->setURL (KURL (value));
|
|
|
|
urlsource->setIdentified (false);
|
|
|
|
urlsource->setIdentified (false);
|
|
|
|
m_havehref = true;
|
|
|
|
m_havehref = true;
|
|
|
|
} else if (name == TQString::tqfromLatin1("width")) {
|
|
|
|
} else if (name == TQString::fromLatin1("width")) {
|
|
|
|
m_noresize = true;
|
|
|
|
m_noresize = true;
|
|
|
|
} else if (name == TQString::tqfromLatin1("height")) {
|
|
|
|
} else if (name == TQString::fromLatin1("height")) {
|
|
|
|
m_noresize = true;
|
|
|
|
m_noresize = true;
|
|
|
|
} else if (name == TQString::tqfromLatin1("type")) {
|
|
|
|
} else if (name == TQString::fromLatin1("type")) {
|
|
|
|
urlsource->document ()->mrl ()->mimetype = value;
|
|
|
|
urlsource->document ()->mrl ()->mimetype = value;
|
|
|
|
} else if (name == TQString::tqfromLatin1("controls")) {
|
|
|
|
} else if (name == TQString::fromLatin1("controls")) {
|
|
|
|
//http://service.real.com/help/library/guides/production8/realpgd.htm?src=noref,rnhmpg_080301,rnhmtn,nosrc
|
|
|
|
//http://service.real.com/help/library/guides/production8/realpgd.htm?src=noref,rnhmpg_080301,rnhmtn,nosrc
|
|
|
|
//http://service.real.com/help/library/guides/production8/htmfiles/control.htm
|
|
|
|
//http://service.real.com/help/library/guides/production8/htmfiles/control.htm
|
|
|
|
TQStringList sl = TQStringList::split (TQChar (','), value);
|
|
|
|
TQStringList sl = TQStringList::split (TQChar (','), value);
|
|
|
@ -198,107 +198,107 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (TQWidget * wparent, const char *
|
|
|
|
const TQStringList::const_iterator e = sl.end ();
|
|
|
|
const TQStringList::const_iterator e = sl.end ();
|
|
|
|
for (TQStringList::const_iterator i = sl.begin (); i != e; ++i) {
|
|
|
|
for (TQStringList::const_iterator i = sl.begin (); i != e; ++i) {
|
|
|
|
TQString val_lower ((*i).lower ());
|
|
|
|
TQString val_lower ((*i).lower ());
|
|
|
|
if (val_lower == TQString::tqfromLatin1("imagewindow")) {
|
|
|
|
if (val_lower == TQString::fromLatin1("imagewindow")) {
|
|
|
|
SET_FEAT_ON (Feat_ImageWindow | Feat_Viewer)
|
|
|
|
SET_FEAT_ON (Feat_ImageWindow | Feat_Viewer)
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("all")) {
|
|
|
|
} else if (val_lower == TQString::fromLatin1("all")) {
|
|
|
|
m_features = (Feat_Controls | Feat_StatusBar);
|
|
|
|
m_features = (Feat_Controls | Feat_StatusBar);
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("tacctrl")) {
|
|
|
|
} else if (val_lower == TQString::fromLatin1("tacctrl")) {
|
|
|
|
SET_FEAT_ON (Feat_Label)
|
|
|
|
SET_FEAT_ON (Feat_Label)
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("controlpanel")) {
|
|
|
|
} else if (val_lower == TQString::fromLatin1("controlpanel")) {
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("infovolumepanel")){
|
|
|
|
} else if (val_lower == TQString::fromLatin1("infovolumepanel")){
|
|
|
|
SET_FEAT_ON (Feat_Controls) // TODO
|
|
|
|
SET_FEAT_ON (Feat_Controls) // TODO
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("positionfield") ||
|
|
|
|
} else if (val_lower == TQString::fromLatin1("positionfield") ||
|
|
|
|
val_lower == TQString::tqfromLatin1("positionslider")) {
|
|
|
|
val_lower == TQString::fromLatin1("positionslider")) {
|
|
|
|
setAutoControls (false);
|
|
|
|
setAutoControls (false);
|
|
|
|
panel->positionSlider ()->show ();
|
|
|
|
panel->positionSlider ()->show ();
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
} else if ( val_lower == TQString::tqfromLatin1("homectrl")) {
|
|
|
|
} else if ( val_lower == TQString::fromLatin1("homectrl")) {
|
|
|
|
setAutoControls (false);
|
|
|
|
setAutoControls (false);
|
|
|
|
panel->button (KMPlayer::ControlPanel::button_config)->show();
|
|
|
|
panel->button (KMPlayer::ControlPanel::button_config)->show();
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("mutectrl") ||
|
|
|
|
} else if (val_lower == TQString::fromLatin1("mutectrl") ||
|
|
|
|
val_lower == TQString::tqfromLatin1("mutevolume")) {
|
|
|
|
val_lower == TQString::fromLatin1("mutevolume")) {
|
|
|
|
setAutoControls (false);
|
|
|
|
setAutoControls (false);
|
|
|
|
panel->volumeBar()->setMinimumSize (TQSize (20, panel->volumeBar()->tqminimumSize ().height ()));
|
|
|
|
panel->volumeBar()->setMinimumSize (TQSize (20, panel->volumeBar()->minimumSize ().height ()));
|
|
|
|
panel->volumeBar()->show ();
|
|
|
|
panel->volumeBar()->show ();
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("rwctrl")) {
|
|
|
|
} else if (val_lower == TQString::fromLatin1("rwctrl")) {
|
|
|
|
setAutoControls (false);
|
|
|
|
setAutoControls (false);
|
|
|
|
panel->button (KMPlayer::ControlPanel::button_back)->show (); // rewind ?
|
|
|
|
panel->button (KMPlayer::ControlPanel::button_back)->show (); // rewind ?
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
} else if ( val_lower == TQString::tqfromLatin1("ffctrl")) {
|
|
|
|
} else if ( val_lower == TQString::fromLatin1("ffctrl")) {
|
|
|
|
setAutoControls (false);
|
|
|
|
setAutoControls (false);
|
|
|
|
panel->button(KMPlayer::ControlPanel::button_forward)->show();
|
|
|
|
panel->button(KMPlayer::ControlPanel::button_forward)->show();
|
|
|
|
m_features = Feat_Controls;
|
|
|
|
m_features = Feat_Controls;
|
|
|
|
} else if ( val_lower ==TQString::tqfromLatin1("stopbutton")) {
|
|
|
|
} else if ( val_lower ==TQString::fromLatin1("stopbutton")) {
|
|
|
|
setAutoControls (false);
|
|
|
|
setAutoControls (false);
|
|
|
|
panel->button (KMPlayer::ControlPanel::button_stop)->show ();
|
|
|
|
panel->button (KMPlayer::ControlPanel::button_stop)->show ();
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("playbutton") ||
|
|
|
|
} else if (val_lower == TQString::fromLatin1("playbutton") ||
|
|
|
|
val_lower ==TQString::tqfromLatin1("playonlybutton")) {
|
|
|
|
val_lower ==TQString::fromLatin1("playonlybutton")) {
|
|
|
|
setAutoControls (false);
|
|
|
|
setAutoControls (false);
|
|
|
|
panel->button (KMPlayer::ControlPanel::button_play)->show ();
|
|
|
|
panel->button (KMPlayer::ControlPanel::button_play)->show ();
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
} else if (val_lower ==TQString::tqfromLatin1("pausebutton")) {
|
|
|
|
} else if (val_lower ==TQString::fromLatin1("pausebutton")) {
|
|
|
|
setAutoControls (false);
|
|
|
|
setAutoControls (false);
|
|
|
|
panel->button (KMPlayer::ControlPanel::button_pause)->show ();
|
|
|
|
panel->button (KMPlayer::ControlPanel::button_pause)->show ();
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
SET_FEAT_ON (Feat_Controls)
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("statusbar") ||
|
|
|
|
} else if (val_lower == TQString::fromLatin1("statusbar") ||
|
|
|
|
val_lower == TQString::tqfromLatin1("statusfield")) {
|
|
|
|
val_lower == TQString::fromLatin1("statusfield")) {
|
|
|
|
SET_FEAT_ON (Feat_StatusBar)
|
|
|
|
SET_FEAT_ON (Feat_StatusBar)
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("infopanel")) {
|
|
|
|
} else if (val_lower == TQString::fromLatin1("infopanel")) {
|
|
|
|
SET_FEAT_ON (Feat_InfoPanel)
|
|
|
|
SET_FEAT_ON (Feat_InfoPanel)
|
|
|
|
} else if (val_lower == TQString::tqfromLatin1("playlist")) {
|
|
|
|
} else if (val_lower == TQString::fromLatin1("playlist")) {
|
|
|
|
SET_FEAT_ON (Feat_PlayList)
|
|
|
|
SET_FEAT_ON (Feat_PlayList)
|
|
|
|
} else if (val_lower==TQString::tqfromLatin1("volumeslider")) {
|
|
|
|
} else if (val_lower==TQString::fromLatin1("volumeslider")) {
|
|
|
|
SET_FEAT_ON (Feat_VolumeSlider)
|
|
|
|
SET_FEAT_ON (Feat_VolumeSlider)
|
|
|
|
setAutoControls (false);
|
|
|
|
setAutoControls (false);
|
|
|
|
panel->volumeBar()->show ();
|
|
|
|
panel->volumeBar()->show ();
|
|
|
|
panel->volumeBar()->setMinimumSize (TQSize (20, panel->volumeBar()->tqminimumSize ().height ()));
|
|
|
|
panel->volumeBar()->setMinimumSize (TQSize (20, panel->volumeBar()->minimumSize ().height ()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (name == TQString::tqfromLatin1("uimode")) {
|
|
|
|
} else if (name == TQString::fromLatin1("uimode")) {
|
|
|
|
TQString val_lower (value.lower ());
|
|
|
|
TQString val_lower (value.lower ());
|
|
|
|
if (val_lower == TQString::tqfromLatin1("full"))
|
|
|
|
if (val_lower == TQString::fromLatin1("full"))
|
|
|
|
SET_FEAT_ON (Feat_All & ~(Feat_PlayList | Feat_ImageWindow))
|
|
|
|
SET_FEAT_ON (Feat_All & ~(Feat_PlayList | Feat_ImageWindow))
|
|
|
|
// TODO: invisible, none, mini
|
|
|
|
// TODO: invisible, none, mini
|
|
|
|
} else if (name == TQString::tqfromLatin1("nolabels")) {
|
|
|
|
} else if (name == TQString::fromLatin1("nolabels")) {
|
|
|
|
SET_FEAT_OFF (Feat_Label)
|
|
|
|
SET_FEAT_OFF (Feat_Label)
|
|
|
|
} else if (name == TQString::tqfromLatin1("nocontrols")) {
|
|
|
|
} else if (name == TQString::fromLatin1("nocontrols")) {
|
|
|
|
SET_FEAT_OFF (Feat_Controls | Feat_VolumeSlider)
|
|
|
|
SET_FEAT_OFF (Feat_Controls | Feat_VolumeSlider)
|
|
|
|
} else if (name == TQString::tqfromLatin1("showdisplay")) {
|
|
|
|
} else if (name == TQString::fromLatin1("showdisplay")) {
|
|
|
|
// the author name, the clip name, and the copyright information
|
|
|
|
// the author name, the clip name, and the copyright information
|
|
|
|
if (getBoolValue (value))
|
|
|
|
if (getBoolValue (value))
|
|
|
|
SET_FEAT_ON (Feat_InfoPanel)
|
|
|
|
SET_FEAT_ON (Feat_InfoPanel)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
SET_FEAT_OFF (Feat_InfoPanel)
|
|
|
|
SET_FEAT_OFF (Feat_InfoPanel)
|
|
|
|
} else if (name == TQString::tqfromLatin1("showcontrols")) {
|
|
|
|
} else if (name == TQString::fromLatin1("showcontrols")) {
|
|
|
|
if (getBoolValue (value))
|
|
|
|
if (getBoolValue (value))
|
|
|
|
SET_FEAT_ON (Feat_Viewer | Feat_Controls)
|
|
|
|
SET_FEAT_ON (Feat_Viewer | Feat_Controls)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
SET_FEAT_OFF (Feat_Controls | Feat_VolumeSlider)
|
|
|
|
SET_FEAT_OFF (Feat_Controls | Feat_VolumeSlider)
|
|
|
|
} else if (name == TQString::tqfromLatin1("showstatusbar")) {
|
|
|
|
} else if (name == TQString::fromLatin1("showstatusbar")) {
|
|
|
|
if (getBoolValue (value))
|
|
|
|
if (getBoolValue (value))
|
|
|
|
SET_FEAT_ON (Feat_Viewer | Feat_StatusBar)
|
|
|
|
SET_FEAT_ON (Feat_Viewer | Feat_StatusBar)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
SET_FEAT_OFF (Feat_StatusBar)
|
|
|
|
SET_FEAT_OFF (Feat_StatusBar)
|
|
|
|
// else showcaptioning/showgotobar/showpositioncontrols/showtracker
|
|
|
|
// else showcaptioning/showgotobar/showpositioncontrols/showtracker
|
|
|
|
} else if (name == TQString::tqfromLatin1("console")) {
|
|
|
|
} else if (name == TQString::fromLatin1("console")) {
|
|
|
|
m_group = value.isEmpty() ? TQString::tqfromLatin1("_anonymous") : value;
|
|
|
|
m_group = value.isEmpty() ? TQString::fromLatin1("_anonymous") : value;
|
|
|
|
} else if (name == TQString::tqfromLatin1("__khtml__pluginbaseurl")) {
|
|
|
|
} else if (name == TQString::fromLatin1("__khtml__pluginbaseurl")) {
|
|
|
|
m_docbase = KURL (value);
|
|
|
|
m_docbase = KURL (value);
|
|
|
|
} else if (name == TQString::tqfromLatin1("src")) {
|
|
|
|
} else if (name == TQString::fromLatin1("src")) {
|
|
|
|
m_src_url = value;
|
|
|
|
m_src_url = value;
|
|
|
|
} else if (name == TQString::tqfromLatin1("filename")) {
|
|
|
|
} else if (name == TQString::fromLatin1("filename")) {
|
|
|
|
m_file_name = value;
|
|
|
|
m_file_name = value;
|
|
|
|
} else if (name == TQString::tqfromLatin1 ("fullscreenmode")) {
|
|
|
|
} else if (name == TQString::fromLatin1 ("fullscreenmode")) {
|
|
|
|
show_fullscreen = getBoolValue (value);
|
|
|
|
show_fullscreen = getBoolValue (value);
|
|
|
|
} else if (name == TQString::tqfromLatin1 ("autostart")) {
|
|
|
|
} else if (name == TQString::fromLatin1 ("autostart")) {
|
|
|
|
urlsource->setAutoPlay (getBoolValue (value));
|
|
|
|
urlsource->setAutoPlay (getBoolValue (value));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// volume/clicktoplay/transparentatstart/animationatstart
|
|
|
|
// volume/clicktoplay/transparentatstart/animationatstart
|
|
|
|
// autorewind/displaysize/border
|
|
|
|
// autorewind/displaysize/border
|
|
|
|
if (name.startsWith (TQString::tqfromLatin1 ("__khtml__")))
|
|
|
|
if (name.startsWith (TQString::fromLatin1 ("__khtml__")))
|
|
|
|
name = name.mid (9);
|
|
|
|
name = name.mid (9);
|
|
|
|
convertNode <KMPlayer::Element> (urlsource->document ())->setAttribute (name, value);
|
|
|
|
convertNode <KMPlayer::Element> (urlsource->document ())->setAttribute (name, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -332,7 +332,7 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (TQWidget * wparent, const char *
|
|
|
|
else
|
|
|
|
else
|
|
|
|
m_view->setControlPanelMode (KMPlayer::View::CP_AutoHide);
|
|
|
|
m_view->setControlPanelMode (KMPlayer::View::CP_AutoHide);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bool group_member = !m_group.isEmpty () && m_group != TQString::tqfromLatin1("_unique") && m_features != Feat_Unknown;
|
|
|
|
bool group_member = !m_group.isEmpty () && m_group != TQString::fromLatin1("_unique") && m_features != Feat_Unknown;
|
|
|
|
if (!group_member || m_features & Feat_Viewer) {
|
|
|
|
if (!group_member || m_features & Feat_Viewer) {
|
|
|
|
// not part of a group or we're the viewer
|
|
|
|
// not part of a group or we're the viewer
|
|
|
|
setProcess ("mplayer");
|
|
|
|
setProcess ("mplayer");
|
|
|
@ -1017,8 +1017,8 @@ KDE_NO_EXPORT bool KMPlayerLiveConnectExtension::call
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case showcontrolpanel:
|
|
|
|
case showcontrolpanel:
|
|
|
|
if (args.size () &&
|
|
|
|
if (args.size () &&
|
|
|
|
(args.first () == TQString::tqfromLatin1 ("0") ||
|
|
|
|
(args.first () == TQString::fromLatin1 ("0") ||
|
|
|
|
args.first () == TQString::tqfromLatin1 ("false")))
|
|
|
|
args.first () == TQString::fromLatin1 ("false")))
|
|
|
|
static_cast <KMPlayer::View*> (player->view ())->setControlPanelMode (KMPlayer::View::CP_Hide);
|
|
|
|
static_cast <KMPlayer::View*> (player->view ())->setControlPanelMode (KMPlayer::View::CP_Hide);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
static_cast <KMPlayer::View*> (player->view ())->setControlPanelMode (KMPlayer::View::CP_Show);
|
|
|
|
static_cast <KMPlayer::View*> (player->view ())->setControlPanelMode (KMPlayer::View::CP_Show);
|
|
|
|