-rw-r--r-- | core/pim/today/todayconfig.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index 472da50..9ff9ba6 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -55,56 +55,54 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags | |||
55 | setCaption( tr( "Today config" ) ); | 55 | setCaption( tr( "Today config" ) ); |
56 | 56 | ||
57 | QVBoxLayout *layout = new QVBoxLayout( this ); | 57 | QVBoxLayout *layout = new QVBoxLayout( this ); |
58 | TabWidget3 = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); | 58 | TabWidget3 = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); |
59 | layout->addWidget( TabWidget3 ); | 59 | layout->addWidget( TabWidget3 ); |
60 | 60 | ||
61 | tab_2 = new QWidget( TabWidget3, "tab_2" ); | 61 | tab_2 = new QWidget( TabWidget3, "tab_2" ); |
62 | QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 ); | 62 | QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 ); |
63 | QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 ); | 63 | QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 ); |
64 | tab2Layout->addWidget( l ); | 64 | tab2Layout->addWidget( l ); |
65 | QHBox *hbox1 = new QHBox( tab_2 ); | 65 | QHBox *hbox1 = new QHBox( tab_2 ); |
66 | m_appletListView = new QListView( hbox1 ); | 66 | m_appletListView = new QListView( hbox1 ); |
67 | m_appletListView->addColumn( "PluginList" ); | 67 | m_appletListView->addColumn( "PluginList" ); |
68 | m_appletListView->header()->hide(); | 68 | m_appletListView->header()->hide(); |
69 | m_appletListView->setSorting( -1 ); | 69 | m_appletListView->setSorting( -1 ); |
70 | QVBox *vbox1 = new QVBox( hbox1 ); | 70 | QVBox *vbox1 = new QVBox( hbox1 ); |
71 | new ToolButton( vbox1, tr( "Move Up" ), "opieplayer/up", this , SLOT( moveSelectedUp() ) ); | 71 | new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); |
72 | new ToolButton( vbox1, tr( "Move Down" ),"opieplayer/down", this , SLOT( moveSelectedDown() ) ); | 72 | new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); |
73 | tab2Layout->addWidget( hbox1 ); | 73 | tab2Layout->addWidget( hbox1 ); |
74 | TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); | 74 | TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); |
75 | 75 | ||
76 | tab_3 = new QWidget( TabWidget3, "tab_3" ); | 76 | tab_3 = new QWidget( TabWidget3, "tab_3" ); |
77 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); | 77 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); |
78 | tab3Layout->setMargin( 20 ); | 78 | tab3Layout->setMargin( 20 ); |
79 | QHBox *hbox_auto = new QHBox( tab_3 ); | 79 | QHBox *hbox_auto = new QHBox( tab_3 ); |
80 | TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); | 80 | TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); |
81 | TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); | 81 | TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); |
82 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); | 82 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); |
83 | QHBox *hbox_inactive = new QHBox( tab_3 ); | 83 | QHBox *hbox_inactive = new QHBox( tab_3 ); |
84 | TimeLabel = new QLabel( hbox_inactive , "TimeLabel" ); | 84 | TimeLabel = new QLabel( hbox_inactive , "TimeLabel" ); |
85 | TimeLabel->setText( tr( "minutes inactive" ) ); | 85 | TimeLabel->setText( tr( "minutes inactive" ) ); |
86 | SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" ); | 86 | SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" ); |
87 | tab3Layout->addWidget( hbox_auto ); | 87 | tab3Layout->addWidget( hbox_auto ); |
88 | tab3Layout->addWidget( hbox_inactive ); | 88 | tab3Layout->addWidget( hbox_inactive ); |
89 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); | 89 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); |
90 | 90 | ||
91 | m_applets_changed = false; | 91 | m_applets_changed = false; |
92 | 92 | ||
93 | // TabWidget3->setCurrentTab( tab_2 ); | ||
94 | |||
95 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); | 93 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); |
96 | 94 | ||
97 | readConfig(); | 95 | readConfig(); |
98 | showMaximized(); | 96 | showMaximized(); |
99 | } | 97 | } |
100 | 98 | ||
101 | 99 | ||
102 | /** | 100 | /** |
103 | * Autostart, uses the new (opie only) autostart method in the launcher code. | 101 | * Autostart, uses the new (opie only) autostart method in the launcher code. |
104 | * If registered against that today ist started on each resume. | 102 | * If registered against that today ist started on each resume. |
105 | */ | 103 | */ |
106 | void TodayConfig::setAutoStart() { | 104 | void TodayConfig::setAutoStart() { |
107 | Config cfg( "today" ); | 105 | Config cfg( "today" ); |
108 | cfg.setGroup( "Autostart" ); | 106 | cfg.setGroup( "Autostart" ); |
109 | int autostart = cfg.readNumEntry( "autostart", 1 ); | 107 | int autostart = cfg.readNumEntry( "autostart", 1 ); |
110 | if ( autostart ) { | 108 | if ( autostart ) { |
@@ -178,33 +176,33 @@ void TodayConfig::moveSelectedUp() { | |||
178 | QListViewItem *item = m_appletListView->selectedItem(); | 176 | QListViewItem *item = m_appletListView->selectedItem(); |
179 | if ( item && item->itemAbove() ) { | 177 | if ( item && item->itemAbove() ) { |
180 | item->itemAbove()->moveItem( item ); | 178 | item->itemAbove()->moveItem( item ); |
181 | } | 179 | } |
182 | } | 180 | } |
183 | 181 | ||
184 | 182 | ||
185 | void TodayConfig::moveSelectedDown() { | 183 | void TodayConfig::moveSelectedDown() { |
186 | QListViewItem *item = m_appletListView->selectedItem(); | 184 | QListViewItem *item = m_appletListView->selectedItem(); |
187 | if ( item && item->itemBelow() ) { | 185 | if ( item && item->itemBelow() ) { |
188 | item->moveItem( item->itemBelow() ); | 186 | item->moveItem( item->itemBelow() ); |
189 | } | 187 | } |
190 | } | 188 | } |
191 | 189 | ||
192 | 190 | ||
193 | /** | 191 | /** |
194 | * Set up the | 192 | * Set up the icons in the order/active tab |
195 | */ | 193 | */ |
196 | void TodayConfig::pluginManagement( QString libName, QString name, QPixmap icon ) { | 194 | void TodayConfig::pluginManagement( QString libName, QString name, QPixmap icon ) { |
197 | 195 | ||
198 | QCheckListItem *item; | 196 | QCheckListItem *item; |
199 | item = new QCheckListItem( m_appletListView, name, QCheckListItem::CheckBox ); | 197 | item = new QCheckListItem( m_appletListView, name, QCheckListItem::CheckBox ); |
200 | 198 | ||
201 | if ( !icon.isNull() ) { | 199 | if ( !icon.isNull() ) { |
202 | item->setPixmap( 0, icon ); | 200 | item->setPixmap( 0, icon ); |
203 | } | 201 | } |
204 | 202 | ||
205 | if ( m_excludeApplets.find( libName ) == m_excludeApplets.end() ) { | 203 | if ( m_excludeApplets.find( libName ) == m_excludeApplets.end() ) { |
206 | item->setOn( TRUE ); | 204 | item->setOn( TRUE ); |
207 | } | 205 | } |
208 | 206 | ||
209 | m_applets[libName] = item; | 207 | m_applets[libName] = item; |
210 | 208 | ||