[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    PATCH KPilot icons
From:       Adriaan de Groot <adridg () sci ! kun ! nl>
Date:       2001-02-04 23:16:30
[Download RAW message or body]

Since I haven't been able to get KPilot's icon loading in order *and* I've 
had bugreports [from Thomas Z. mostly] of KPilot crashing when trying to load 
icons which don't exist, I'd like to apply this patch that uses hardcoded 
xpms for all the toolbar icons in KPilot. As a consequence the patch deletes 
a bunch of code, which is why the patch is longer than 3 lines. If no-one 
objects I'd like to apply this tomorrow (monday) evening GMT +1.

-- 
[ade] at home: adridg@sci.kun.nl
Probably hacking at KDE2.
["kpilot-icons.diff" (text/x-c)]

Index: kpilot/kpilot.cc
===================================================================
RCS file: /home/kde/kdepim/kpilot/kpilot/kpilot.cc,v
retrieving revision 1.30
diff -u -3 -p -r1.30 kpilot.cc
--- kpilot/kpilot.cc	2001/01/19 22:18:43	1.30
+++ kpilot/kpilot.cc	2001/02/04 22:48:24
@@ -221,60 +221,8 @@ void KPilotInstaller::initIcons()
 {
 	FUNCTIONSETUP;
 
-	DEBUGKPILOT << fname
-		<< ": Getting Icon Loader"
-		<< endl;
-
 	KIconLoader *il = KGlobal::iconLoader();
 
-	DEBUGKPILOT << fname
-		<< ": Got Icon Loader @"
-		<< (int) il
-		<< endl;
-
-	il->addAppDir("kpilot");
-
-	DEBUGKPILOT << fname
-		<< ": Added apps dir to Icon Loader"
-		<< endl;
-
-	icon_hotsync = il->loadIcon("hotsync",
-		KIcon::Toolbar,0,KIcon::DefaultState,0, true);
-
-	DEBUGKPILOT << fname
-		<< ": Got first icon."
-		<< endl;
-
-	if (icon_hotsync.isNull())
-	{
-		kdWarning() << __FUNCTION__ << ": Hot-Sync icon not found." << endl;
-		icon_hotsync=QPixmap((const char **)hotsync_icon);
-	}
-
-	icon_backup = il->loadIcon("backup",
-		KIcon::Toolbar,0,KIcon::DefaultState,0, true);
-	if (icon_backup.isNull())
-	{
-		kdWarning() << __FUNCTION__ << ": Backup icon not found." << endl;
-		icon_backup =QPixmap((const char **)toolbar_backup);
-	}
-
-	icon_fastsync = il->loadIcon("fastsync",
-		KIcon::Toolbar,0,KIcon::DefaultState,0, true);
-	if (icon_fastsync.isNull())
-	{
-		kdWarning() << __FUNCTION__ << ": Fast-Sync icon not found." << endl;
-		icon_fastsync = QPixmap((const char **)fastsync_xpm);
-	}
-
-	icon_restore = il->loadIcon("restore",
-		KIcon::Toolbar,0,KIcon::DefaultState,0, true);
-	if (icon_restore.isNull())
-	{
-		kdWarning() << __FUNCTION__ << ": Restore icon not found." << endl;
-		icon_restore = QPixmap((const char **)toolbar_restore);
-	}
-
 	icon_quit = il->loadIcon("exit",
 		KIcon::Toolbar,0,KIcon::DefaultState,0,true);
 
@@ -282,6 +230,11 @@ void KPilotInstaller::initIcons()
 	{
 		kdWarning() << __FUNCTION__ << ": Quit icon not found." << endl;
 	}
+
+	icon_fastsync = QPixmap((const char **)fastsync_xpm);
+	icon_hotsync = QPixmap((const char **)hotsync_icon);
+	icon_backup = QPixmap((const char **)toolbar_backup);
+	icon_restore = QPixmap((const char **)toolbar_restore);
 }
 
 

>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic