summaryrefslogtreecommitdiff
authorsandman <sandman>2002-12-23 03:24:31 (UTC)
committer sandman <sandman>2002-12-23 03:24:31 (UTC)
commite91351d2c22ab041b85f49e243e1f510edf7984e (patch) (unidiff)
treec068e1a8ad21db9995f2a3c5a2d97bb983fa04a9
parent8bd190d162b538e4226e830f442450f5a95f4434 (diff)
downloadopie-e91351d2c22ab041b85f49e243e1f510edf7984e.zip
opie-e91351d2c22ab041b85f49e243e1f510edf7984e.tar.gz
opie-e91351d2c22ab041b85f49e243e1f510edf7984e.tar.bz2
small bugfixes and speedup
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/settings/button/buttonsettings.cpp8
-rw-r--r--core/settings/button/buttonsettings.h1
-rw-r--r--core/settings/button/buttonutils.cpp10
-rw-r--r--core/settings/button/remapdlg.cpp27
-rw-r--r--core/settings/button/remapdlg.h4
5 files changed, 42 insertions, 8 deletions
diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp
index c71514c..8b0b0a8 100644
--- a/core/settings/button/buttonsettings.cpp
+++ b/core/settings/button/buttonsettings.cpp
@@ -62,2 +62,3 @@ ButtonSettings::ButtonSettings ( )
62 const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( ); 62 const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( );
63 (void) ButtonUtils::inst ( ); // initialise
63 64
@@ -135,2 +136,3 @@ ButtonSettings::ButtonSettings ( )
135 m_last_button = 0; 136 m_last_button = 0;
137 m_lock = false;
136 138
@@ -210,2 +212,6 @@ void ButtonSettings::edit ( buttoninfo *bi, bool hold )
210 212
213 if ( m_lock )
214 return;
215 m_lock = true;
216
211 RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this ); 217 RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this );
@@ -229,2 +235,4 @@ void ButtonSettings::edit ( buttoninfo *bi, bool hold )
229 delete d; 235 delete d;
236
237 m_lock = false;
230} 238}
diff --git a/core/settings/button/buttonsettings.h b/core/settings/button/buttonsettings.h
index f571825..d41a209 100644
--- a/core/settings/button/buttonsettings.h
+++ b/core/settings/button/buttonsettings.h
@@ -69,2 +69,3 @@ private:
69 QList <buttoninfo> m_infos; 69 QList <buttoninfo> m_infos;
70 bool m_lock;
70}; 71};
diff --git a/core/settings/button/buttonutils.cpp b/core/settings/button/buttonutils.cpp
index bb70047..91d2af3 100644
--- a/core/settings/button/buttonutils.cpp
+++ b/core/settings/button/buttonutils.cpp
@@ -104,3 +104,5 @@ void ButtonUtils::insertAppLnks ( QListViewItem *here )
104 QStringList types = m_apps-> types ( ); 104 QStringList types = m_apps-> types ( );
105 QListViewItem *typeitem [types. count ( )];
105 106
107 int i = 0;
106 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { 108 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
@@ -109,2 +111,5 @@ void ButtonUtils::insertAppLnks ( QListViewItem *here )
109 111
112 typeitem [i++] = item;
113 }
114
110 for ( QListIterator <AppLnk> appit ( m_apps-> children ( )); *appit; ++appit ) { 115 for ( QListIterator <AppLnk> appit ( m_apps-> children ( )); *appit; ++appit ) {
@@ -112,6 +117,9 @@ void ButtonUtils::insertAppLnks ( QListViewItem *here )
112 117
118 int i = 0;
119 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
113 if ( l-> type ( ) == *it ) { 120 if ( l-> type ( ) == *it ) {
114 QListViewItem *sub = new QListViewItem ( item, l-> name ( ), QString ( "QPE/Application/" ) + l-> exec ( ), "raise()" ); 121 QListViewItem *sub = new QListViewItem ( typeitem [i], l-> name ( ), QString ( "QPE/Application/" ) + l-> exec ( ), "raise()" );
115 sub-> setPixmap ( 0, l-> pixmap ( )); 122 sub-> setPixmap ( 0, l-> pixmap ( ));
116 } 123 }
124 i++;
117 } 125 }
diff --git a/core/settings/button/remapdlg.cpp b/core/settings/button/remapdlg.cpp
index 511d0e7..a251bd4 100644
--- a/core/settings/button/remapdlg.cpp
+++ b/core/settings/button/remapdlg.cpp
@@ -3,2 +3,3 @@
3#include <qcombobox.h> 3#include <qcombobox.h>
4#include <qtimer.h>
4 5
@@ -49,2 +50,7 @@ RemapDlg::RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget *parent, c
49 50
51 m_current = 0;
52
53 static const char * const def_channels [] = { "QPE/Application/", "QPE/Launcher", "QPE/System", "QPE/TaskBar", "QPE/", 0 };
54 w_channel-> insertStrList ((const char **) def_channels );
55
50 m_msg = hold ? b-> heldAction ( ) : b-> pressedAction ( ); 56 m_msg = hold ? b-> heldAction ( ) : b-> pressedAction ( );
@@ -61,4 +67,3 @@ RemapDlg::RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget *parent, c
61 67
62 it = new NoSortItem ( w_list, 4, tr( "Show" )); 68 m_map_show = new NoSortItem ( w_list, 4, tr( "Show" ));
63 ButtonUtils::inst ( )-> insertAppLnks ( it );
64 69
@@ -67,7 +72,3 @@ RemapDlg::RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget *parent, c
67 72
68 static const char * const def_channels [] = { 73 QTimer::singleShot ( 0, this, SLOT( delayedInit ( )));
69 "QPE/Application/", "QPE/Launcher", "QPE/System", "QPE/TaskBar", "QPE/", 0
70 };
71
72 w_channel-> insertStrList ((const char **) def_channels );
73} 74}
@@ -78,2 +79,14 @@ RemapDlg::~RemapDlg ( )
78 79
80void RemapDlg::delayedInit ( )
81{
82 bool b = w_list-> viewport ( )-> isUpdatesEnabled ( );
83 w_list-> viewport ( )-> setUpdatesEnabled ( false );
84
85 ButtonUtils::inst ( )-> insertAppLnks ( m_map_show );
86
87 w_list-> viewport ( )-> setUpdatesEnabled ( b );
88
89 m_map_show-> repaint ( );
90}
91
79void RemapDlg::itemChanged ( QListViewItem *it ) 92void RemapDlg::itemChanged ( QListViewItem *it )
diff --git a/core/settings/button/remapdlg.h b/core/settings/button/remapdlg.h
index 8c9cc02..046a22f 100644
--- a/core/settings/button/remapdlg.h
+++ b/core/settings/button/remapdlg.h
@@ -23,2 +23,5 @@ public slots:
23 23
24private slots:
25 void delayedInit ( );
26
24private: 27private:
@@ -32,2 +35,3 @@ private:
32 QListViewItem *m_map_custom; 35 QListViewItem *m_map_custom;
36 QListViewItem *m_map_show;
33}; 37};