-rw-r--r-- | core/launcher/systray.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp index 4859e48..be55791 100644 --- a/core/launcher/systray.cpp +++ b/core/launcher/systray.cpp | |||
@@ -99,55 +99,55 @@ void SysTray::addApplets() | |||
99 | int napplets=0; | 99 | int napplets=0; |
100 | TaskbarApplet* *applets = new TaskbarApplet*[list.count()]; | 100 | TaskbarApplet* *applets = new TaskbarApplet*[list.count()]; |
101 | for ( it = list.begin(); it != list.end(); ++it ) { | 101 | for ( it = list.begin(); it != list.end(); ++it ) { |
102 | if ( exclude.find( *it ) != exclude.end() ) | 102 | if ( exclude.find( *it ) != exclude.end() ) |
103 | continue; | 103 | continue; |
104 | TaskbarAppletInterface *iface = 0; | 104 | TaskbarAppletInterface *iface = 0; |
105 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 105 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
106 | if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { | 106 | if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { |
107 | TaskbarApplet *applet = new TaskbarApplet; | 107 | TaskbarApplet *applet = new TaskbarApplet; |
108 | applets[napplets++] = applet; | 108 | applets[napplets++] = applet; |
109 | applet->library = lib; | 109 | applet->library = lib; |
110 | applet->iface = iface; | 110 | applet->iface = iface; |
111 | 111 | ||
112 | QTranslator *trans = new QTranslator(qApp); | 112 | QTranslator *trans = new QTranslator(qApp); |
113 | QString type = (*it).left( (*it).find(".") ); | 113 | QString type = (*it).left( (*it).find(".") ); |
114 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; | 114 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; |
115 | if ( trans->load( tfn )) | 115 | if ( trans->load( tfn )) |
116 | qApp->installTranslator( trans ); | 116 | qApp->installTranslator( trans ); |
117 | else | 117 | else |
118 | delete trans; | 118 | delete trans; |
119 | } else { | 119 | } else { |
120 | exclude += *it; | 120 | exclude += *it; |
121 | delete lib; | 121 | delete lib; |
122 | } | 122 | } |
123 | } | 123 | } |
124 | cfg.writeEntry( "ExcludeApplets", exclude, ',' ); | 124 | cfg.writeEntry( "ExcludeApplets", exclude, ',' ); |
125 | qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions); | 125 | qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions); |
126 | while (napplets--) { | 126 | while (napplets--) { |
127 | TaskbarApplet *applet = applets[napplets]; | 127 | TaskbarApplet *applet = applets[napplets]; |
128 | applet->applet = applet->iface->applet( this ); | 128 | applet->applet = applet->iface->applet( this ); |
129 | appletList.append(*applet); | 129 | appletList.append(*applet); |
130 | } | 130 | } |
131 | delete applets; | 131 | delete [] applets; |
132 | #else | 132 | #else |
133 | TaskbarApplet applet; | 133 | TaskbarApplet applet; |
134 | applet.iface = new ClockAppletImpl(); | 134 | applet.iface = new ClockAppletImpl(); |
135 | applet.applet = applet.iface->applet( this ); | 135 | applet.applet = applet.iface->applet( this ); |
136 | appletList.append( a ); | 136 | appletList.append( a ); |
137 | #endif | 137 | #endif |
138 | show(); | 138 | show(); |
139 | 139 | ||
140 | if ( !safety_tid ) | 140 | if ( !safety_tid ) |
141 | safety_tid = startTimer(2000); // TT has 5000, but this is a PITA for a developer ;) (sandman) | 141 | safety_tid = startTimer(2000); // TT has 5000, but this is a PITA for a developer ;) (sandman) |
142 | } | 142 | } |
143 | 143 | ||
144 | void SysTray::timerEvent(QTimerEvent* e) | 144 | void SysTray::timerEvent(QTimerEvent* e) |
145 | { | 145 | { |
146 | if ( e->timerId() == safety_tid ) { | 146 | if ( e->timerId() == safety_tid ) { |
147 | Config cfg( "Taskbar" ); | 147 | Config cfg( "Taskbar" ); |
148 | cfg.setGroup( "Applets" ); | 148 | cfg.setGroup( "Applets" ); |
149 | cfg.writeEntry( "SafeMode", FALSE ); | 149 | cfg.writeEntry( "SafeMode", FALSE ); |
150 | killTimer(safety_tid); | 150 | killTimer(safety_tid); |
151 | safety_tid = 0; | 151 | safety_tid = 0; |
152 | } | 152 | } |
153 | } | 153 | } |