-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/appearance2/appearance.h | 1 | ||||
-rw-r--r-- | noncore/settings/appearance2/appearance2.pro | 8 | ||||
-rw-r--r-- | noncore/settings/appearance2/main.cpp | 12 |
4 files changed, 6 insertions, 19 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index 00128d3..9e5eede 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp | |||
@@ -543,52 +543,48 @@ void Appearance::accept ( ) | |||
543 | } else { | 543 | } else { |
544 | rot = Flip; | 544 | rot = Flip; |
545 | } | 545 | } |
546 | config. writeEntry ( "rotatedir", (int)rot ); | 546 | config. writeEntry ( "rotatedir", (int)rot ); |
547 | 547 | ||
548 | m_except-> setFocus ( ); // if the focus was on the embedded line-edit, we have to move it away first, so the contents are updated | 548 | m_except-> setFocus ( ); // if the focus was on the embedded line-edit, we have to move it away first, so the contents are updated |
549 | 549 | ||
550 | QStringList sl; | 550 | QStringList sl; |
551 | QString exceptstr; | 551 | QString exceptstr; |
552 | for ( ExceptListItem *it = (ExceptListItem *) m_except-> firstChild ( ); it; it = (ExceptListItem *) it-> nextSibling ( )) { | 552 | for ( ExceptListItem *it = (ExceptListItem *) m_except-> firstChild ( ); it; it = (ExceptListItem *) it-> nextSibling ( )) { |
553 | int fl = 0; | 553 | int fl = 0; |
554 | fl |= ( it-> noStyle ( ) ? 0x01 : 0 ); | 554 | fl |= ( it-> noStyle ( ) ? 0x01 : 0 ); |
555 | fl |= ( it-> noFont ( ) ? 0x02 : 0 ); | 555 | fl |= ( it-> noFont ( ) ? 0x02 : 0 ); |
556 | fl |= ( it-> noDeco ( ) ? 0x04 : 0 ); | 556 | fl |= ( it-> noDeco ( ) ? 0x04 : 0 ); |
557 | exceptstr = QString::number ( fl, 32 ); | 557 | exceptstr = QString::number ( fl, 32 ); |
558 | exceptstr.append( it-> pattern ( )); | 558 | exceptstr.append( it-> pattern ( )); |
559 | sl << exceptstr; | 559 | sl << exceptstr; |
560 | } | 560 | } |
561 | config. writeEntry ( "NoStyle", sl, ';' ); | 561 | config. writeEntry ( "NoStyle", sl, ';' ); |
562 | config. writeEntry ( "ForceStyle", m_force-> isChecked ( )); | 562 | config. writeEntry ( "ForceStyle", m_force-> isChecked ( )); |
563 | 563 | ||
564 | config. write ( ); // need to flush the config info first | 564 | config. write ( ); // need to flush the config info first |
565 | Global::applyStyle ( ); | 565 | Global::applyStyle ( ); |
566 | 566 | ||
567 | if ( QMessageBox::warning ( this, tr( "Restart" ), tr( "Do you want to restart %1 now?" ). arg ( ODevice::inst ( )-> system ( ) == System_Zaurus ? "Qtopia" : "Opie" ), tr( "Yes" ), tr( "No" ), 0, 0, 1 ) == 0 ) { | ||
568 | QCopEnvelope e( "QPE/System", "restart()" ); | ||
569 | } | ||
570 | |||
571 | QDialog::accept ( ); | 567 | QDialog::accept ( ); |
572 | } | 568 | } |
573 | 569 | ||
574 | void Appearance::done ( int r ) | 570 | void Appearance::done ( int r ) |
575 | { | 571 | { |
576 | QDialog::done ( r ); | 572 | QDialog::done ( r ); |
577 | close ( ); | 573 | close ( ); |
578 | } | 574 | } |
579 | 575 | ||
580 | 576 | ||
581 | void Appearance::styleClicked ( int index ) | 577 | void Appearance::styleClicked ( int index ) |
582 | { | 578 | { |
583 | StyleListItem *sli = (StyleListItem *) m_style_list-> item ( index ); | 579 | StyleListItem *sli = (StyleListItem *) m_style_list-> item ( index ); |
584 | m_style_settings-> setEnabled ( sli ? sli-> hasSettings ( ) : false ); | 580 | m_style_settings-> setEnabled ( sli ? sli-> hasSettings ( ) : false ); |
585 | 581 | ||
586 | if ( m_sample && sli && sli-> style ( )) { | 582 | if ( m_sample && sli && sli-> style ( )) { |
587 | int ci = m_color_list ? m_color_list-> currentItem ( ) : -1; | 583 | int ci = m_color_list ? m_color_list-> currentItem ( ) : -1; |
588 | 584 | ||
589 | m_sample-> setStyle2 ( sli-> style ( ), ci < 0 ? palette ( ) : ((ColorListItem *) m_color_list-> item ( ci ))-> palette ( )); | 585 | m_sample-> setStyle2 ( sli-> style ( ), ci < 0 ? palette ( ) : ((ColorListItem *) m_color_list-> item ( ci ))-> palette ( )); |
590 | } | 586 | } |
591 | 587 | ||
592 | m_style_changed |= ( index != m_original_style ); | 588 | m_style_changed |= ( index != m_original_style ); |
593 | } | 589 | } |
594 | 590 | ||
diff --git a/noncore/settings/appearance2/appearance.h b/noncore/settings/appearance2/appearance.h index da9e976..51e9636 100644 --- a/noncore/settings/appearance2/appearance.h +++ b/noncore/settings/appearance2/appearance.h | |||
@@ -34,48 +34,49 @@ | |||
34 | #include <qdialog.h> | 34 | #include <qdialog.h> |
35 | 35 | ||
36 | class QCheckBox; | 36 | class QCheckBox; |
37 | class QComboBox; | 37 | class QComboBox; |
38 | class QLabel; | 38 | class QLabel; |
39 | class QLineEdit; | 39 | class QLineEdit; |
40 | class QListBox; | 40 | class QListBox; |
41 | class QMultiLineEdit; | 41 | class QMultiLineEdit; |
42 | class QPushButton; | 42 | class QPushButton; |
43 | class QRadioButton; | 43 | class QRadioButton; |
44 | class QToolButton; | 44 | class QToolButton; |
45 | class SampleWindow; | 45 | class SampleWindow; |
46 | class OFontSelector; | 46 | class OFontSelector; |
47 | class QListView; | 47 | class QListView; |
48 | class QListViewItem; | 48 | class QListViewItem; |
49 | class Config; | 49 | class Config; |
50 | 50 | ||
51 | class Appearance : public QDialog | 51 | class Appearance : public QDialog |
52 | { | 52 | { |
53 | Q_OBJECT | 53 | Q_OBJECT |
54 | 54 | ||
55 | public: | 55 | public: |
56 | Appearance( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 56 | Appearance( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
57 | ~Appearance(); | 57 | ~Appearance(); |
58 | static QString appName() { return QString::fromLatin1("appearance"); } | ||
58 | 59 | ||
59 | protected: | 60 | protected: |
60 | virtual void accept ( ); | 61 | virtual void accept ( ); |
61 | virtual void done ( int r ); | 62 | virtual void done ( int r ); |
62 | 63 | ||
63 | protected slots: | 64 | protected slots: |
64 | void styleClicked ( int ); | 65 | void styleClicked ( int ); |
65 | void styleSettingsClicked ( ); | 66 | void styleSettingsClicked ( ); |
66 | void decoClicked ( int ); | 67 | void decoClicked ( int ); |
67 | void fontClicked ( const QFont & ); | 68 | void fontClicked ( const QFont & ); |
68 | void colorClicked ( int ); | 69 | void colorClicked ( int ); |
69 | 70 | ||
70 | void editSchemeClicked(); | 71 | void editSchemeClicked(); |
71 | void saveSchemeClicked(); | 72 | void saveSchemeClicked(); |
72 | void deleteSchemeClicked(); | 73 | void deleteSchemeClicked(); |
73 | 74 | ||
74 | void tabChanged ( QWidget * ); | 75 | void tabChanged ( QWidget * ); |
75 | 76 | ||
76 | void addExcept ( ); | 77 | void addExcept ( ); |
77 | void delExcept ( ); | 78 | void delExcept ( ); |
78 | void upExcept ( ); | 79 | void upExcept ( ); |
79 | void downExcept ( ); | 80 | void downExcept ( ); |
80 | void clickedExcept ( QListViewItem *, const QPoint &, int ); | 81 | void clickedExcept ( QListViewItem *, const QPoint &, int ); |
81 | 82 | ||
diff --git a/noncore/settings/appearance2/appearance2.pro b/noncore/settings/appearance2/appearance2.pro index e37536d..145de2f 100644 --- a/noncore/settings/appearance2/appearance2.pro +++ b/noncore/settings/appearance2/appearance2.pro | |||
@@ -1,33 +1,31 @@ | |||
1 | TEMPLATE = app | 1 | CONFIG = qt warn_on release quick-app |
2 | CONFIG = qt warn_on release | ||
3 | DESTDIR = $(OPIEDIR)/bin | ||
4 | HEADERS = appearance.h editScheme.h sample.h | 2 | HEADERS = appearance.h editScheme.h sample.h |
5 | SOURCES = appearance.cpp editScheme.cpp main.cpp sample.cpp | 3 | SOURCES = appearance.cpp editScheme.cpp main.cpp sample.cpp |
6 | INCLUDEPATH += $(OPIEDIR)/include | 4 | INCLUDEPATH += $(OPIEDIR)/include |
7 | DEPENDPATH += ../$(OPIEDIR)/include | 5 | DEPENDPATH += ../$(OPIEDIR)/include |
8 | LIBS += -lqpe -lopie | 6 | LIBS += -lqpe -lopie |
9 | TARGET = appearance | ||
10 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
11 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
12 | 9 | ||
10 | TARGET = appearance | ||
11 | |||
13 | TRANSLATIONS = ../../../i18n/de/appearance.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/appearance.ts \ |
14 | ../../../i18n/nl/appearance.ts \ | 13 | ../../../i18n/nl/appearance.ts \ |
15 | ../../../i18n/xx/appearance.ts \ | 14 | ../../../i18n/xx/appearance.ts \ |
16 | ../../../i18n/en/appearance.ts \ | 15 | ../../../i18n/en/appearance.ts \ |
17 | ../../../i18n/es/appearance.ts \ | 16 | ../../../i18n/es/appearance.ts \ |
18 | ../../../i18n/fr/appearance.ts \ | 17 | ../../../i18n/fr/appearance.ts \ |
19 | ../../../i18n/hu/appearance.ts \ | 18 | ../../../i18n/hu/appearance.ts \ |
20 | ../../../i18n/ja/appearance.ts \ | 19 | ../../../i18n/ja/appearance.ts \ |
21 | ../../../i18n/ko/appearance.ts \ | 20 | ../../../i18n/ko/appearance.ts \ |
22 | ../../../i18n/no/appearance.ts \ | 21 | ../../../i18n/no/appearance.ts \ |
23 | ../../../i18n/pl/appearance.ts \ | 22 | ../../../i18n/pl/appearance.ts \ |
24 | ../../../i18n/pt/appearance.ts \ | 23 | ../../../i18n/pt/appearance.ts \ |
25 | ../../../i18n/pt_BR/appearance.ts \ | 24 | ../../../i18n/pt_BR/appearance.ts \ |
26 | ../../../i18n/sl/appearance.ts \ | 25 | ../../../i18n/sl/appearance.ts \ |
27 | ../../../i18n/zh_CN/appearance.ts \ | 26 | ../../../i18n/zh_CN/appearance.ts \ |
28 | ../../../i18n/zh_TW/appearance.ts \ | 27 | ../../../i18n/zh_TW/appearance.ts \ |
29 | ../../../i18n/da/appearance.ts | 28 | ../../../i18n/da/appearance.ts |
30 | 29 | ||
31 | 30 | ||
32 | |||
33 | include ( $(OPIEDIR)/include.pro ) | 31 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/settings/appearance2/main.cpp b/noncore/settings/appearance2/main.cpp index ad24cf3..5595429 100644 --- a/noncore/settings/appearance2/main.cpp +++ b/noncore/settings/appearance2/main.cpp | |||
@@ -7,36 +7,28 @@ | |||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | - . .-<_> .<> Foundation; either version 2 of the License, |
10 | ._= =} : or (at your option) any later version. | 10 | ._= =} : or (at your option) any later version. |
11 | .%`+i> _;_. | 11 | .%`+i> _;_. |
12 | .i_,=:_. -<s. This file is distributed in the hope that | 12 | .i_,=:_. -<s. This file is distributed in the hope that |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
17 | ..}^=.= = ; Public License for more details. | 17 | ..}^=.= = ; Public License for more details. |
18 | ++= -. .` .: | 18 | ++= -. .` .: |
19 | : = ...= . :.=- You should have received a copy of the GNU | 19 | : = ...= . :.=- You should have received a copy of the GNU |
20 | -. .:....=;==+<; General Public License along with this file; | 20 | -. .:....=;==+<; General Public License along with this file; |
21 | -_. . . )=. = see the file COPYING. If not, write to the | 21 | -_. . . )=. = see the file COPYING. If not, write to the |
22 | -- :-=` Free Software Foundation, Inc., | 22 | -- :-=` Free Software Foundation, Inc., |
23 | 59 Temple Place - Suite 330, | 23 | 59 Temple Place - Suite 330, |
24 | Boston, MA 02111-1307, USA. | 24 | Boston, MA 02111-1307, USA. |
25 | 25 | ||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "appearance.h" | 28 | #include "appearance.h" |
29 | 29 | ||
30 | #include <qpe/qpeapplication.h> | 30 | #include <qpe/qpeapplication.h> |
31 | #include <opie/oapplicationfactory.h> | ||
31 | 32 | ||
32 | 33 | ||
33 | int main ( int argc, char **argv ) | 34 | OPIE_EXPORT_APP( OApplicationFactory<Appearance> ) |
34 | { | ||
35 | QPEApplication app ( argc, argv ); | ||
36 | |||
37 | Appearance m; | ||
38 | app. showMainDocumentWidget ( &m ); | ||
39 | |||
40 | return app. exec ( ); | ||
41 | } | ||
42 | |||