|
|
|
@ -241,23 +241,23 @@ TQPixmap SvnItem::getPixmap(const TQPixmap&_p,int size,bool overlay)
|
|
|
|
|
if (p_Item->m_Stat->textStatus()==svn_wc_status_conflicted) {
|
|
|
|
|
m_bgColor = CONFLICT;
|
|
|
|
|
if (overlay)
|
|
|
|
|
p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnconflicted",KIcon::Desktop,size);
|
|
|
|
|
p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnconflicted",TDEIcon::Desktop,size);
|
|
|
|
|
} else if (p_Item->m_Stat->textStatus ()==svn_wc_status_missing) {
|
|
|
|
|
m_bgColor = MISSING;
|
|
|
|
|
} else if (isLocked()||wrap->checkReposLockCache(fullName())) {
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnlocked",KIcon::Desktop,size);
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnlocked",TDEIcon::Desktop,size);
|
|
|
|
|
m_bgColor = LOCKED;
|
|
|
|
|
} else if (Kdesvnsettings::check_needslock() && !isRemoteAdded() && wrap->isLockNeeded(this,svn::Revision::UNDEFINED) ) {
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnneedlock",KIcon::Desktop,size);
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnneedlock",TDEIcon::Desktop,size);
|
|
|
|
|
m_bgColor = NEEDLOCK;
|
|
|
|
|
} else if (wrap->isUpdated(p_Item->m_Stat->path())) {
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnupdates",KIcon::Desktop,size);
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnupdates",TDEIcon::Desktop,size);
|
|
|
|
|
m_bgColor = UPDATES;
|
|
|
|
|
} else if (p_Item->m_Stat->textStatus()==svn_wc_status_deleted) {
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvndeleted",KIcon::Desktop,size);
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvndeleted",TDEIcon::Desktop,size);
|
|
|
|
|
m_bgColor = DELETED;
|
|
|
|
|
} else if (p_Item->m_Stat->textStatus()==svn_wc_status_added ) {
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnadded",KIcon::Desktop,size);
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnadded",TDEIcon::Desktop,size);
|
|
|
|
|
m_bgColor = ADDED;
|
|
|
|
|
} else if (isModified()) {
|
|
|
|
|
mod = true;
|
|
|
|
@ -265,19 +265,19 @@ TQPixmap SvnItem::getPixmap(const TQPixmap&_p,int size,bool overlay)
|
|
|
|
|
svn::StatusEntries dlist;
|
|
|
|
|
svn::StatusEntries::const_iterator it;
|
|
|
|
|
if (isRemoteAdded() || wrap->checkUpdateCache(fullName())) {
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnupdates",KIcon::Desktop,size);
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnupdates",TDEIcon::Desktop,size);
|
|
|
|
|
m_bgColor = UPDATES;
|
|
|
|
|
} else if (wrap->checkConflictedCache(fullName())) {
|
|
|
|
|
m_bgColor = CONFLICT;
|
|
|
|
|
if (overlay)
|
|
|
|
|
p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnconflicted",KIcon::Desktop,size);
|
|
|
|
|
p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnconflicted",TDEIcon::Desktop,size);
|
|
|
|
|
} else {
|
|
|
|
|
mod = wrap->checkModifiedCache(fullName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (mod) {
|
|
|
|
|
m_bgColor = MODIFIED;
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnmodified",KIcon::Desktop,size);
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnmodified",TDEIcon::Desktop,size);
|
|
|
|
|
}
|
|
|
|
|
if (!p2.isNull()) {
|
|
|
|
|
TQPixmap p;
|
|
|
|
@ -290,7 +290,7 @@ TQPixmap SvnItem::getPixmap(const TQPixmap&_p,int size,bool overlay)
|
|
|
|
|
TQImage i1; i1 = p;
|
|
|
|
|
TQImage i2;i2 = p2;
|
|
|
|
|
|
|
|
|
|
KIconEffect::overlay(i1,i2);
|
|
|
|
|
TDEIconEffect::overlay(i1,i2);
|
|
|
|
|
p = i1;
|
|
|
|
|
return p;
|
|
|
|
|
}
|
|
|
|
@ -308,29 +308,29 @@ TQPixmap SvnItem::getPixmap(int size,bool overlay)
|
|
|
|
|
*/
|
|
|
|
|
if (svn::Url::isValid(p_Item->m_Stat->path())) {
|
|
|
|
|
/* remote access */
|
|
|
|
|
p = p_Item->mimeType(isDir())->pixmap(KIcon::Desktop,size,KIcon::DefaultState);
|
|
|
|
|
p = p_Item->mimeType(isDir())->pixmap(TDEIcon::Desktop,size,TDEIcon::DefaultState);
|
|
|
|
|
if (isLocked()) {
|
|
|
|
|
m_bgColor = LOCKED;
|
|
|
|
|
TQPixmap p2;
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnlocked",KIcon::Desktop,size);
|
|
|
|
|
if (overlay) p2 = tdesvnPartFactory::instance()->iconLoader()->loadIcon("tdesvnlocked",TDEIcon::Desktop,size);
|
|
|
|
|
if (!p2.isNull()) {
|
|
|
|
|
TQImage i1; i1 = p;
|
|
|
|
|
TQImage i2; i2 = p2;
|
|
|
|
|
KIconEffect::overlay(i1,i2);
|
|
|
|
|
TDEIconEffect::overlay(i1,i2);
|
|
|
|
|
p = i1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (isRemoteAdded()) {
|
|
|
|
|
if (isDir()) {
|
|
|
|
|
p = tdesvnPartFactory::instance()->iconLoader()->loadIcon("folder",KIcon::Desktop,size);
|
|
|
|
|
p = tdesvnPartFactory::instance()->iconLoader()->loadIcon("folder",TDEIcon::Desktop,size);
|
|
|
|
|
} else {
|
|
|
|
|
p = tdesvnPartFactory::instance()->iconLoader()->loadIcon("unknown",KIcon::Desktop,size);
|
|
|
|
|
p = tdesvnPartFactory::instance()->iconLoader()->loadIcon("unknown",TDEIcon::Desktop,size);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
KURL uri;
|
|
|
|
|
uri.setPath(fullName());
|
|
|
|
|
p = KMimeType::pixmapForURL(uri,0,KIcon::Desktop,size);
|
|
|
|
|
p = KMimeType::pixmapForURL(uri,0,TDEIcon::Desktop,size);
|
|
|
|
|
p = getPixmap(p,size,overlay);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|