| Summary: | download/upload tab: open the last used tab on start | ||
|---|---|---|---|
| Product: | [Applications] ktorrent | Reporter: | Maciej Pilichowski <bluedzins> |
| Component: | general | Assignee: | Joris Guisson <joris.guisson> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Maciej Pilichowski
2007-08-22 09:28:47 UTC
SVN commit 703501 by guisson:
Make tab widget remember the current tab
BUG: 149098
M +8 -0 mainwindow.cpp
--- trunk/extragear/network/ktorrent/ideal/mainwindow.cpp #703500:703501
@@ -58,6 +58,11 @@
if (bottom)
bottom->loadState(cfg);
loadSplitterState(cfg);
+
+ KConfigGroup g = cfg->group("MainTabWidget");
+ int ct = g.readEntry("current_tab",0);
+ if (ct >= 0 && ct < tabs->count())
+ tabs->setCurrentIndex(ct);
}
void MainWindow::saveState(KSharedConfigPtr cfg)
@@ -70,6 +75,9 @@
bottom->saveState(cfg);
saveSplitterState(cfg);
+ // save the current tab
+ KConfigGroup g = cfg->group("MainTabWidget");
+ g.writeEntry("current_tab",tabs->currentIndex());
cfg->sync();
}
|