-rw-r--r-- | library/qpeapplication.cpp | 8 | ||||
-rw-r--r-- | library/qpeapplication.h | 5 |
2 files changed, 3 insertions, 10 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index f5bf0c5..7463074 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -1054,37 +1054,35 @@ void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data | |||
1054 | 1054 | ||
1055 | man-> setActive( !man-> isActive() ); | 1055 | man-> setActive( !man-> isActive() ); |
1056 | 1056 | ||
1057 | if ( !oldactive && !man-> isActive ( )) { // no menubar to toggle -> try O-Menu | 1057 | if ( !oldactive && !man-> isActive ( )) { // no menubar to toggle -> try O-Menu |
1058 | QCopEnvelope e ( "QPE/TaskBar", "toggleStartMenu()" ); | 1058 | QCopEnvelope e ( "QPE/TaskBar", "toggleStartMenu()" ); |
1059 | } | 1059 | } |
1060 | } | 1060 | } |
1061 | } | 1061 | } |
1062 | else if ( msg == "setDefaultRotation(int)" ) { | 1062 | else if ( msg == "setDefaultRotation(int)" ) { |
1063 | if ( type() == GuiServer ) { | 1063 | if ( type() == GuiServer ) { |
1064 | int r; | 1064 | int r; |
1065 | stream >> r; | 1065 | stream >> r; |
1066 | setDefaultRotation( r ); | 1066 | setDefaultRotation( r ); |
1067 | } | 1067 | } |
1068 | } | 1068 | } |
1069 | else if ( msg == "setCurrentRotation(int)" ) { | 1069 | else if ( msg == "setCurrentRotation(int)" ) { |
1070 | if ( type() == GuiServer ) { | 1070 | int r; |
1071 | int r; | 1071 | stream >> r; |
1072 | stream >> r; | 1072 | setCurrentRotation( r ); |
1073 | setCurrentRotation( r ); | ||
1074 | } | ||
1075 | } | 1073 | } |
1076 | else if ( msg == "shutdown()" ) { | 1074 | else if ( msg == "shutdown()" ) { |
1077 | if ( type() == GuiServer ) | 1075 | if ( type() == GuiServer ) |
1078 | shutdown(); | 1076 | shutdown(); |
1079 | } | 1077 | } |
1080 | else if ( msg == "quit()" ) { | 1078 | else if ( msg == "quit()" ) { |
1081 | if ( type() != GuiServer ) | 1079 | if ( type() != GuiServer ) |
1082 | tryQuit(); | 1080 | tryQuit(); |
1083 | } | 1081 | } |
1084 | else if ( msg == "forceQuit()" ) { | 1082 | else if ( msg == "forceQuit()" ) { |
1085 | if ( type() != GuiServer ) | 1083 | if ( type() != GuiServer ) |
1086 | quit(); | 1084 | quit(); |
1087 | } | 1085 | } |
1088 | else if ( msg == "restart()" ) { | 1086 | else if ( msg == "restart()" ) { |
1089 | if ( type() == GuiServer ) | 1087 | if ( type() == GuiServer ) |
1090 | restart(); | 1088 | restart(); |
diff --git a/library/qpeapplication.h b/library/qpeapplication.h index 82954d0..4c37ea6 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h | |||
@@ -152,37 +152,32 @@ inline void QPEApplication::showDialog( QDialog* d, bool nomax ) | |||
152 | } else { | 152 | } else { |
153 | d->resize(w,h); | 153 | d->resize(w,h); |
154 | d->show(); | 154 | d->show(); |
155 | } | 155 | } |
156 | } | 156 | } |
157 | 157 | ||
158 | inline int QPEApplication::execDialog( QDialog* d, bool nomax ) | 158 | inline int QPEApplication::execDialog( QDialog* d, bool nomax ) |
159 | { | 159 | { |
160 | showDialog(d,nomax); | 160 | showDialog(d,nomax); |
161 | return d->exec(); | 161 | return d->exec(); |
162 | } | 162 | } |
163 | 163 | ||
164 | enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ | 164 | enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ |
165 | 165 | ||
166 | inline void QPEApplication::setCurrentRotation( int r ) | 166 | inline void QPEApplication::setCurrentRotation( int r ) |
167 | { | 167 | { |
168 | if ( qApp->type() != GuiServer ) { | ||
169 | QCopEnvelope e( "QPE/System", "setCurrentRotation(int)" ); | ||
170 | e << r; | ||
171 | return; | ||
172 | } | ||
173 | Transformation e; | 168 | Transformation e; |
174 | 169 | ||
175 | switch (r) { | 170 | switch (r) { |
176 | case 0: | 171 | case 0: |
177 | e = Rot0; | 172 | e = Rot0; |
178 | break; | 173 | break; |
179 | case 90: | 174 | case 90: |
180 | e = Rot90; | 175 | e = Rot90; |
181 | break; | 176 | break; |
182 | case 180: | 177 | case 180: |
183 | e = Rot180; | 178 | e = Rot180; |
184 | break; | 179 | break; |
185 | case 270: | 180 | case 270: |
186 | e = Rot270; | 181 | e = Rot270; |
187 | break; | 182 | break; |
188 | default: | 183 | default: |