author | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
commit | d34dc773591a2d467c68875a68a671d6a809f861 (patch) (unidiff) | |
tree | b57e5ae15c51e3d87ca95d57aedfd1ca3db57bfe /core/settings | |
parent | ce84f2d8bdd65c438821f0457cdad6bbbfa73380 (diff) | |
download | opie-d34dc773591a2d467c68875a68a671d6a809f861.zip opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.gz opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.bz2 |
Porting Opie to MacOS-X.
The base system and all platform independent applications and platforms
should work.
Please see $OPIEDIR/development/macosx for details
-rw-r--r-- | core/settings/launcher/menusettings.cpp | 4 | ||||
-rw-r--r-- | core/settings/launcher/taskbarsettings.cpp | 17 |
2 files changed, 21 insertions, 0 deletions
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp index 5a9fada..6fca621 100644 --- a/core/settings/launcher/menusettings.cpp +++ b/core/settings/launcher/menusettings.cpp | |||
@@ -79,7 +79,11 @@ void MenuSettings::init ( ) | |||
79 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); | 79 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); |
80 | 80 | ||
81 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; | 81 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; |
82 | #ifdef Q_OS_MACX | ||
83 | QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); | ||
84 | #else | ||
82 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); | 85 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); |
86 | #endif /* Q_OS_MACX */ | ||
83 | 87 | ||
84 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { | 88 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { |
85 | QString name; | 89 | QString name; |
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp index b3e302a..d03ea49 100644 --- a/core/settings/launcher/taskbarsettings.cpp +++ b/core/settings/launcher/taskbarsettings.cpp | |||
@@ -75,16 +75,23 @@ void TaskbarSettings::init ( ) | |||
75 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); | 75 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); |
76 | 76 | ||
77 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; | 77 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; |
78 | #ifdef Q_OS_MACX | ||
79 | QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); | ||
80 | #else | ||
78 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); | 81 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); |
82 | #endif /* Q_OS_MACX */ | ||
79 | 83 | ||
80 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { | 84 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { |
81 | QString name; | 85 | QString name; |
82 | QPixmap icon; | 86 | QPixmap icon; |
83 | TaskbarNamedAppletInterface *iface = 0; | 87 | TaskbarNamedAppletInterface *iface = 0; |
84 | 88 | ||
89 | qWarning("Load applet: %s", (*it).latin1() ); | ||
85 | QLibrary *lib = new QLibrary ( path + "/" + *it ); | 90 | QLibrary *lib = new QLibrary ( path + "/" + *it ); |
86 | lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); | 91 | lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); |
92 | qWarning("<1>"); | ||
87 | if ( iface ) { | 93 | if ( iface ) { |
94 | qWarning("<2>"); | ||
88 | QString lang = getenv( "LANG" ); | 95 | QString lang = getenv( "LANG" ); |
89 | QTranslator *trans = new QTranslator ( qApp ); | 96 | QTranslator *trans = new QTranslator ( qApp ); |
90 | QString type = (*it). left ((*it). find (".")); | 97 | QString type = (*it). left ((*it). find (".")); |
@@ -97,12 +104,20 @@ void TaskbarSettings::init ( ) | |||
97 | icon = iface-> icon ( ); | 104 | icon = iface-> icon ( ); |
98 | iface-> release ( ); | 105 | iface-> release ( ); |
99 | } | 106 | } |
107 | qWarning("<3>"); | ||
100 | if ( !iface ) { | 108 | if ( !iface ) { |
109 | qWarning("<4>"); | ||
101 | lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); | 110 | lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); |
102 | 111 | ||
103 | if ( iface ) { | 112 | if ( iface ) { |
113 | qWarning("<5>"); | ||
104 | name = (*it). mid ( 3 ); | 114 | name = (*it). mid ( 3 ); |
115 | qWarning("Found applet: %s", name.latin1() ); | ||
116 | #ifdef Q_OS_MACX | ||
117 | int sep = name. find( ".dylib" ); | ||
118 | #else | ||
105 | int sep = name. find( ".so" ); | 119 | int sep = name. find( ".so" ); |
120 | #endif /* Q_OS_MACX */ | ||
106 | if ( sep > 0 ) | 121 | if ( sep > 0 ) |
107 | name. truncate ( sep ); | 122 | name. truncate ( sep ); |
108 | sep = name. find ( "applet" ); | 123 | sep = name. find ( "applet" ); |
@@ -112,8 +127,10 @@ void TaskbarSettings::init ( ) | |||
112 | iface-> release ( ); | 127 | iface-> release ( ); |
113 | } | 128 | } |
114 | } | 129 | } |
130 | qWarning("<6>"); | ||
115 | 131 | ||
116 | if ( iface ) { | 132 | if ( iface ) { |
133 | qWarning("<7>"); | ||
117 | QCheckListItem *item; | 134 | QCheckListItem *item; |
118 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); | 135 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); |
119 | if ( !icon. isNull ( )) | 136 | if ( !icon. isNull ( )) |