CVS commit by mornfall: Fix the tab captions the right way (works with history as well). Also make back/forward KStdActions, so they get icons now (weee!). Update TODO and release date.
M +2 -2 TODO 1.59 M +8 -6 kapture/kapture.cpp 1.42 M +1 -0 kapture/kapture.h 1.20 M +2 -2 kapture/kaptureui.rc 1.5 M +2 -0 libkapture/celemview.h 1.12 M +1 -0 libkapture/pkgcelemview.cpp 1.18 --- kdenonbeta/kdedebian/kapture/TODO #1.58:1.59 @@ -159,5 +159,5 @@ - testing, testing! -::: 0.4 (prealfa) [release target: 25th July 2004] ::: +::: 0.4 (prealfa) [release target: 31st July 2004] ::: POLISH THE UI [done: 50%] @@ -169,5 +169,5 @@ - reorganize the details page in pkg view - make whole details page scrollable, instead of just long descr [done] - - konqueror(browser)-like tab semantics + - konqueror(browser)-like tab semantics [done] KURRENT: THE UPGRADER [done: 70%] --- kdenonbeta/kdedebian/kapture/kapture/kapture.cpp #1.41:1.42 @@ -160,4 +160,6 @@ void Kapture::newElemView (CElemPtr e) m_elemStack -> raiseWidget (m_elemTabs); elemTabChanged (v); + connect (v, SIGNAL (elemChanged (kapture::CElemView *)), + this, SLOT (elemChanged (kapture::CElemView *))); } } @@ -179,9 +181,11 @@ void Kapture::showElem (CElemPtr e) if (m_curElemView) { m_curElemView -> showElem (e); - m_elemTabs -> changeTab (m_curElemView, - m_curElemView -> caption ()); } else newElemView (e); } +void Kapture::elemChanged (CElemView *v) +{ + m_elemTabs -> changeTab (v, v -> caption ()); +} void Kapture::tryShowKonsole () { @@ -262,8 +266,6 @@ void Kapture::setupActions() new KAction (i18n ("Commit"), 0, KaptureManager::inst (), SLOT(commit ()), actionCollection(), "commit"); - new KAction (i18n ("History Forward"), 0, - this, SIGNAL(elemForward ()), actionCollection(), "elem_forward"); - new KAction (i18n ("History Back"), 0, - this, SIGNAL(elemBack ()), actionCollection(), "elem_back"); + KStdAction::forward (this, SIGNAL(elemForward ()), actionCollection(), "hist_forward"); + KStdAction::back (this, SIGNAL(elemBack ()), actionCollection(), "hist_back"); createGUI(0); } --- kdenonbeta/kdedebian/kapture/kapture/kapture.h #1.19:1.20 @@ -54,4 +54,5 @@ class Kapture : public KDockMainWindow, void showProgress (); void elemTabChanged (QWidget *); + void elemChanged (kapture::CElemView *); protected: virtual void dragEnterEvent(QDragEnterEvent *event); --- kdenonbeta/kdedebian/kapture/kapture/kaptureui.rc #1.4:1.5 @@ -10,6 +10,6 @@ </MenuBar> <ToolBar name="Blah"> - <Action name="elem_back" /> - <Action name="elem_forward" /> + <Action name="hist_back" /> + <Action name="hist_forward" /> <Separator/> <Action name="update" /> --- kdenonbeta/kdedebian/kapture/libkapture/celemview.h #1.11:1.12 @@ -48,4 +48,6 @@ namespace kapture { virtual void histForward () { capture::HistoryManager::histForward (); } virtual void histBack () { capture::HistoryManager::histBack (); } + signals: + void elemChanged (kapture::CElemView *); // virtual void changeElem (CElemPtr elem) = 0; }; --- kdenonbeta/kdedebian/kapture/libkapture/pkgcelemview.cpp #1.17:1.18 @@ -97,4 +97,5 @@ void PkgCElemView::changeElem (capture:: setCaption (m_pkg -> Name ()); setEnabled (true); + emit elemChanged (this); // return true; }