-rw-r--r-- | core/settings/launcher/menusettings.cpp | 5 | ||||
-rw-r--r-- | core/settings/launcher/taskbarsettings.cpp | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp index 29ce841..d63b203 100644 --- a/core/settings/launcher/menusettings.cpp +++ b/core/settings/launcher/menusettings.cpp | |||
@@ -30,12 +30,13 @@ _;:, .> :=|. This file is free software; you can | |||
30 | 30 | ||
31 | #include <qpe/config.h> | 31 | #include <qpe/config.h> |
32 | #include <qpe/qlibrary.h> | 32 | #include <qpe/qlibrary.h> |
33 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
34 | #include <qpe/menuappletinterface.h> | 34 | #include <qpe/menuappletinterface.h> |
35 | #include <qpe/qcopenvelope_qws.h> | 35 | #include <qpe/qcopenvelope_qws.h> |
36 | #include <opie2/odebug.h> | ||
36 | 37 | ||
37 | #include <qdir.h> | 38 | #include <qdir.h> |
38 | #include <qlistview.h> | 39 | #include <qlistview.h> |
39 | #include <qcheckbox.h> | 40 | #include <qcheckbox.h> |
40 | #include <qheader.h> | 41 | #include <qheader.h> |
41 | #include <qlayout.h> | 42 | #include <qlayout.h> |
@@ -91,13 +92,15 @@ void MenuSettings::init ( ) | |||
91 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { | 92 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { |
92 | QString name; | 93 | QString name; |
93 | QPixmap icon; | 94 | QPixmap icon; |
94 | MenuAppletInterface *iface = 0; | 95 | MenuAppletInterface *iface = 0; |
95 | 96 | ||
96 | QLibrary *lib = new QLibrary ( path + "/" + *it ); | 97 | QLibrary *lib = new QLibrary ( path + "/" + *it ); |
97 | lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); | 98 | QRESULT retVal = QS_OK; |
99 | if ((retVal = lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**)(&iface) )) != QS_OK ) | ||
100 | owarn << "queryInterface failed with " << retVal << oendl; | ||
98 | if ( iface ) { | 101 | if ( iface ) { |
99 | QString lang = getenv( "LANG" ); | 102 | QString lang = getenv( "LANG" ); |
100 | QTranslator *trans = new QTranslator ( qApp ); | 103 | QTranslator *trans = new QTranslator ( qApp ); |
101 | QString type = (*it). left ((*it). find (".")); | 104 | QString type = (*it). left ((*it). find (".")); |
102 | QString tfn = QPEApplication::qpeDir ( ) + "i18n/" + lang + "/" + type + ".qm"; | 105 | QString tfn = QPEApplication::qpeDir ( ) + "i18n/" + lang + "/" + type + ".qm"; |
103 | if ( trans-> load ( tfn )) | 106 | if ( trans-> load ( tfn )) |
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp index 861ff3a..c2b82b9 100644 --- a/core/settings/launcher/taskbarsettings.cpp +++ b/core/settings/launcher/taskbarsettings.cpp | |||
@@ -88,13 +88,15 @@ void TaskbarSettings::init ( ) | |||
88 | QString name; | 88 | QString name; |
89 | QPixmap icon; | 89 | QPixmap icon; |
90 | TaskbarNamedAppletInterface *iface = 0; | 90 | TaskbarNamedAppletInterface *iface = 0; |
91 | 91 | ||
92 | owarn << "Load applet: " << (*it) << "" << oendl; | 92 | owarn << "Load applet: " << (*it) << "" << oendl; |
93 | QLibrary *lib = new QLibrary ( path + "/" + *it ); | 93 | QLibrary *lib = new QLibrary ( path + "/" + *it ); |
94 | lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); | 94 | QRESULT retVal = QS_OK; |
95 | if ((retVal = lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**)(&iface) )) != QS_OK) | ||
96 | owarn << "<0>" << oendl; | ||
95 | owarn << "<1>" << oendl; | 97 | owarn << "<1>" << oendl; |
96 | if ( iface ) { | 98 | if ( iface ) { |
97 | owarn << "<2>" << oendl; | 99 | owarn << "<2>" << oendl; |
98 | QString lang = getenv( "LANG" ); | 100 | QString lang = getenv( "LANG" ); |
99 | QTranslator *trans = new QTranslator ( qApp ); | 101 | QTranslator *trans = new QTranslator ( qApp ); |
100 | QString type = (*it). left ((*it). find (".")); | 102 | QString type = (*it). left ((*it). find (".")); |
@@ -107,16 +109,17 @@ void TaskbarSettings::init ( ) | |||
107 | icon = iface-> icon ( ); | 109 | icon = iface-> icon ( ); |
108 | iface-> release ( ); | 110 | iface-> release ( ); |
109 | } | 111 | } |
110 | owarn << "<3>" << oendl; | 112 | owarn << "<3>" << oendl; |
111 | if ( !iface ) { | 113 | if ( !iface ) { |
112 | owarn << "<4>" << oendl; | 114 | owarn << "<4>" << oendl; |
113 | lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); | 115 | if ((retVal = lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**)(&iface))) != QS_OK) |
116 | owarn << "<5>" << oendl; | ||
114 | 117 | ||
115 | if ( iface ) { | 118 | if ( iface ) { |
116 | owarn << "<5>" << oendl; | 119 | owarn << "<6>" << oendl; |
117 | name = (*it). mid ( 3 ); | 120 | name = (*it). mid ( 3 ); |
118 | owarn << "Found applet: " << name << "" << oendl; | 121 | owarn << "Found applet: " << name << "" << oendl; |
119 | #ifdef Q_OS_MACX | 122 | #ifdef Q_OS_MACX |
120 | int sep = name. find( ".dylib" ); | 123 | int sep = name. find( ".dylib" ); |
121 | #else | 124 | #else |
122 | int sep = name. find( ".so" ); | 125 | int sep = name. find( ".so" ); |
@@ -127,16 +130,16 @@ void TaskbarSettings::init ( ) | |||
127 | if ( sep == (int) name.length ( ) - 6 ) | 130 | if ( sep == (int) name.length ( ) - 6 ) |
128 | name. truncate ( sep ); | 131 | name. truncate ( sep ); |
129 | name[0] = name[0]. upper ( ); | 132 | name[0] = name[0]. upper ( ); |
130 | iface-> release ( ); | 133 | iface-> release ( ); |
131 | } | 134 | } |
132 | } | 135 | } |
133 | owarn << "<6>" << oendl; | 136 | owarn << "<7>" << oendl; |
134 | 137 | ||
135 | if ( iface ) { | 138 | if ( iface ) { |
136 | owarn << "<7>" << oendl; | 139 | owarn << "<8>" << oendl; |
137 | QCheckListItem *item; | 140 | QCheckListItem *item; |
138 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); | 141 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); |
139 | if ( !icon. isNull ( )) | 142 | if ( !icon. isNull ( )) |
140 | item-> setPixmap ( 0, icon ); | 143 | item-> setPixmap ( 0, icon ); |
141 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); | 144 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); |
142 | m_applets [*it] = item; | 145 | m_applets [*it] = item; |