Rename KIcon to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 15ef96dbfb
commit 5eff70460c

@ -40,7 +40,7 @@ bool PropertyListViewItem::different()const
void PropertyListViewItem::deleteIt() void PropertyListViewItem::deleteIt()
{ {
m_deleted = true; m_deleted = true;
setPixmap(0,TDEGlobal::iconLoader()->loadIcon("cancel",KIcon::Desktop,16)); setPixmap(0,TDEGlobal::iconLoader()->loadIcon("cancel",TDEIcon::Desktop,16));
} }
void PropertyListViewItem::unDeleteIt() void PropertyListViewItem::unDeleteIt()

@ -46,7 +46,7 @@ void OpenContextmenu::setup()
nam.setNum( id ); nam.setNum( id );
TQString actionName( (*it)->name().replace("&", "&&") ); TQString actionName( (*it)->name().replace("&", "&&") );
act = new TDEAction( actionName, (*it)->pixmap( KIcon::Small ), 0, act = new TDEAction( actionName, (*it)->pixmap( TDEIcon::Small ), 0,
TQT_TQOBJECT(this), TQT_SLOT( slotRunService() ), TQT_TQOBJECT(this), nam.prepend( "appservice_" ) ); TQT_TQOBJECT(this), TQT_SLOT( slotRunService() ), TQT_TQOBJECT(this), nam.prepend( "appservice_" ) );
act->plug(this); act->plug(this);
m_mapPopup[ id++ ] = *it; m_mapPopup[ id++ ] = *it;

@ -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);
} }
} }

@ -1555,7 +1555,7 @@ TQDragObject* tdesvnfilelist::dragObject()
bool pixmap0Invalid = !m_pressedItem->pixmap(0) || m_pressedItem->pixmap(0)->isNull(); bool pixmap0Invalid = !m_pressedItem->pixmap(0) || m_pressedItem->pixmap(0)->isNull();
if (( urls.count() > 1 ) || (pixmap0Invalid)) { if (( urls.count() > 1 ) || (pixmap0Invalid)) {
int iconSize = Kdesvnsettings::listview_icon_size();; int iconSize = Kdesvnsettings::listview_icon_size();;
iconSize = iconSize ? iconSize : tdesvnPartFactory::instance()->iconLoader()->currentSize( KIcon::Small ); // Default = small iconSize = iconSize ? iconSize : tdesvnPartFactory::instance()->iconLoader()->currentSize( TDEIcon::Small ); // Default = small
pixmap2 = DesktopIcon( "tdemultiple", iconSize ); pixmap2 = DesktopIcon( "tdemultiple", iconSize );
if ( pixmap2.isNull() ) { if ( pixmap2.isNull() ) {
kdWarning() << "Could not find multiple pixmap" << endl; kdWarning() << "Could not find multiple pixmap" << endl;

Loading…
Cancel
Save