summaryrefslogtreecommitdiff
path: root/core/launcher/documentlist.cpp
authormickeyl <mickeyl>2005-07-03 22:13:00 (UTC)
committer mickeyl <mickeyl>2005-07-03 22:13:00 (UTC)
commit2cabd9ad4b49eefccdf99ad59550c76546b473c9 (patch) (side-by-side diff)
tree00bab275ac356aecc5a39b86ca22ce172d01f622 /core/launcher/documentlist.cpp
parent47011752d4457a1055894479e5bf855e100fddac (diff)
downloadopie-2cabd9ad4b49eefccdf99ad59550c76546b473c9.zip
opie-2cabd9ad4b49eefccdf99ad59550c76546b473c9.tar.gz
opie-2cabd9ad4b49eefccdf99ad59550c76546b473c9.tar.bz2
Resource -> OResource
This is a large diff and I'd appreciate some additional pairs of eyes checking it
Diffstat (limited to 'core/launcher/documentlist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/documentlist.cpp72
1 files changed, 37 insertions, 35 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index b8bf4e0..fd385d6 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -1,22 +1,30 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
+/*
+                 This file is part of the Opie Project
+ =. (C) 2000-2002 Trolltech AS
+ .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+ :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; version 2 of the License.
+     ._= =}       :
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "documentlist.h"
#include "serverinterface.h"
#include "mediadlg.h"
@@ -24,9 +32,9 @@
/* OPIE */
#include <opie2/oglobal.h>
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qtopia/config.h>
#include <qtopia/mimetype.h>
-#include <qtopia/resource.h>
#include <qtopia/private/categories.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/applnk.h>
@@ -232,22 +240,19 @@ void DocumentList::reloadAppLnks()
QPixmap pm = appLnkSet->typePixmap(*ittypes);
QPixmap bgPm = appLnkSet->typeBigPixmap(*ittypes);
- if (pm.isNull()) {
- QImage img( Resource::loadImage( "UnknownDocument" ) );
- pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
- bgPm = img.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() );
+ if (pm.isNull())
+ {
+ pm = OResource::loadImage( "UnknownDocument", OResource::SmallIcon );
+ bgPm = OResource::loadImage( "UnknownDocument", OResource::BigIcon );
}
- //odebug << "adding type " << (*ittypes) << "" << oendl;
-
- // ### our current launcher expects docs tab to be last
+ //FIXME our current launcher expects docs tab to be last
d->serverGui->typeAdded( *ittypes, name.isNull() ? (*ittypes) : name, pm, bgPm );
}
prevTypeList.remove(*ittypes);
}
}
for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) {
- //odebug << "removing type " << (*ittypes) << "" << oendl;
d->serverGui->typeRemoved(*ittypes);
}
prevTypeList = types;
@@ -357,14 +362,12 @@ void DocumentList::DiffAppLnks()
QPixmap pm = appLnkSet2->typePixmap(*ittypes);
QPixmap bgPm = appLnkSet2->typeBigPixmap(*ittypes);
- if (pm.isNull()) {
- QImage img( Resource::loadImage( "UnknownDocument" ) );
- pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
- bgPm = img.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() );
+ if (pm.isNull())
+ {
+ pm = OResource::loadImage( "UnknownDocument", OResource::SmallIcon );
+ bgPm = OResource::loadImage( "UnknownDocument", OResource::BigIcon );
}
- odebug << "adding type " << (*ittypes) << "" << oendl;
-
// ### our current launcher expects docs tab to be last
d->serverGui->typeAdded( *ittypes, name.isNull() ? (*ittypes) : name, pm, bgPm );
}
@@ -372,7 +375,6 @@ void DocumentList::DiffAppLnks()
}
}
for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) {
- odebug << "removing type " << (*ittypes) << "" << oendl;
d->serverGui->typeRemoved(*ittypes);
}
prevTypeList = types;