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