author | llornkcor <llornkcor> | 2004-09-28 08:38:46 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-09-28 08:38:46 (UTC) |
commit | a1482c1dfd0f0859736716a7ce4a459a8e02728c (patch) (side-by-side diff) | |
tree | 53b148c95d28fb0286dfccb50462b6f673067057 | |
parent | c6daaf1849427191cb449e742681629bdaee4570 (diff) | |
download | opie-a1482c1dfd0f0859736716a7ce4a459a8e02728c.zip opie-a1482c1dfd0f0859736716a7ce4a459a8e02728c.tar.gz opie-a1482c1dfd0f0859736716a7ce4a459a8e02728c.tar.bz2 |
ugly workaround for bigscreen/smallscreen widget differences
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 30 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 20 |
2 files changed, 27 insertions, 23 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 9aa0c77..8cc5d7b 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -71,3 +71,2 @@ void AdvancedFm::cleanUp() { void AdvancedFm::tabChanged(QWidget *wd) { -// qDebug("tabChanged"); if(wd == tab) { @@ -78,2 +77,3 @@ void AdvancedFm::tabChanged(QWidget *wd) { } + else if(wd == tab_2) { @@ -86,6 +86,2 @@ void AdvancedFm::tabChanged(QWidget *wd) { QString path = CurrentDir()->canonicalPath(); -// qDebug(path); - if ( TabWidget->currentWidget() == tab) { - } else { - } @@ -268,5 +264,5 @@ void AdvancedFm::refreshCurrentTab() { void AdvancedFm::switchToLocalTab() { - TabWidget->setCurrentWidget(0); -// Local_View->setFocus(); - whichTab = 1; + TabWidget->setCurrentWidget(tab); + Local_View->setFocus(); +// whichTab = 1; } @@ -274,5 +270,5 @@ void AdvancedFm::switchToLocalTab() { void AdvancedFm::switchToRemoteTab() { - TabWidget->setCurrentWidget(1); -// Remote_View->setFocus(); - whichTab = 2; + TabWidget->setCurrentWidget(tab_2); + Remote_View->setFocus(); +// whichTab = 2; } @@ -760,5 +756,11 @@ void AdvancedFm::setDocument(const QString &file) { void AdvancedFm::slotSwitchMenu(int item) { - Q_UNUSED(item); -// qDebug( "Switch %d",item); - // viewMenu->setItemChecked(item, true); + if(item == -23) { + switchToLocalTab(); + tabChanged( tab); + } + + if(item == -24) { + switchToRemoteTab(); + tabChanged( tab_2); + } } diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 171e7c4..4802771 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -759,11 +759,13 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { } -/* if ( o->inherits( "QListView" ) ) { + if ( o->inherits( "QListView" ) ) { if ( e->type() == QEvent::FocusIn ) { -// if( o == Local_View) { //keep track of which view -// qDebug("local view"); -// whichTab = 1; -// } else { -// whichTab = 2; -// qDebug("remote view"); -// } + if( o == Local_View) { //keep track of which view + whichTab = 1; + viewMenu->setItemChecked(viewMenu->idAt(0), true); + viewMenu->setItemChecked(viewMenu->idAt(1), false); + } else { + whichTab = 2; + viewMenu->setItemChecked(viewMenu->idAt(0), false); + viewMenu->setItemChecked(viewMenu->idAt(1), true); + } } @@ -771,3 +773,3 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { } -*/ + return QWidget::eventFilter( o, e ); |