| Summary: | Settings dialog should remember last used tab page | ||
|---|---|---|---|
| Product: | [Applications] amarok | Reporter: | Maciej Pilichowski <bluedzins> |
| Component: | general | Assignee: | Amarok Bugs <amarok-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Maciej Pilichowski
2006-09-26 21:27:44 UTC
I agree, the settings dialog should do this. SVN commit 620490 by markey:
The settings dialog now remembers the last used tab page.
BUG: 134707
M +5 -5 app.cpp
M +1 -1 app.h
M +7 -1 configdialog.cpp
M +3 -1 configdialog.h
--- trunk/extragear/multimedia/amarok/src/app.cpp #620489:620490
@@ -1106,14 +1106,14 @@
//FIXME it seems that if the dialog is on a different desktop it gets lost
// what do to? detect and move it?
+ if ( page.isNull() )
+ dialog->showPage( AmarokConfigDialog::s_currentPage );
+ else
+ dialog->showPageByName( page );
+
dialog->show();
dialog->raise();
dialog->setActiveWindow();
-
- //so that if the engine page is needed to be shown it works
- kapp->processEvents();
-
- if ( !page.isNull() ) dialog->showPage( page );
}
void App::slotConfigShortcuts()
--- trunk/extragear/multimedia/amarok/src/app.h #620489:620490
@@ -116,7 +116,7 @@
#ifdef Q_WS_X11
Amarok::TrayIcon *m_pTray;
#endif
- MediaDeviceManager *m_pMediaDeviceManager;
+ MediaDeviceManager *m_pMediaDeviceManager;
};
#define pApp static_cast<App*>(kapp)
--- trunk/extragear/multimedia/amarok/src/configdialog.cpp #620489:620490
@@ -73,6 +73,8 @@
}
+int AmarokConfigDialog::s_currentPage = 0;
+
//////////////////////////////////////////////////////////////////////////////////////////
// PUBLIC
//////////////////////////////////////////////////////////////////////////////////////////
@@ -208,6 +210,10 @@
AmarokConfigDialog::~AmarokConfigDialog()
{
+ DEBUG_FUNC_INFO
+
+ s_currentPage = activePageIndex();
+
delete m_engineConfig;
delete m_deviceManager;
}
@@ -224,7 +230,7 @@
/** Show page by object name */
-void AmarokConfigDialog::showPage( const QCString& page )
+void AmarokConfigDialog::showPageByName( const QCString& page )
{
for( uint index = 0; index < m_pageList.count(); index++ ) {
if ( m_pageList[index]->name() == page ) {
--- trunk/extragear/multimedia/amarok/src/configdialog.h #620489:620490
@@ -42,8 +42,10 @@
void addPage( QWidget *page, const QString &itemName, const QString &pixmapName,
const QString &header=QString::null, bool manage=true);
- void showPage( const QCString& page );
+ void showPageByName( const QCString& page );
+ static int s_currentPage;
+
protected slots:
void updateButtons();
void updateSettings();
|