[rkward-cvs] SF.net SVN: rkward: [1590] trunk/rkward/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Mar 15 19:52:56 UTC 2007
Revision: 1590
http://svn.sourceforge.net/rkward/?rev=1590&view=rev
Author: tfry
Date: 2007-03-15 12:52:55 -0700 (Thu, 15 Mar 2007)
Log Message:
-----------
Show full path for command editor windows in the title bar
Modified Paths:
--------------
trunk/rkward/rkward/rkward.cpp
trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
trunk/rkward/rkward/windows/rkcommandeditorwindow.h
trunk/rkward/rkward/windows/rkworkplaceview.cpp
trunk/rkward/rkward/windows/rkworkplaceview.h
Modified: trunk/rkward/rkward/rkward.cpp
===================================================================
--- trunk/rkward/rkward/rkward.cpp 2007-03-15 19:38:27 UTC (rev 1589)
+++ trunk/rkward/rkward/rkward.cpp 2007-03-15 19:52:55 UTC (rev 1590)
@@ -837,7 +837,8 @@
QString wcaption = RObjectList::getObjectList ()->getWorkspaceURL ().fileName ();
if (wcaption.isEmpty ()) wcaption = RObjectList::getObjectList ()->getWorkspaceURL ().prettyURL ();
if (wcaption.isEmpty ()) wcaption = i18n ("[Unnamed Workspace]");
- wcaption.append (" - " + RKWorkplace::mainWorkplace ()->view ()->activeCaption ());
+ RKMDIWindow *window = RKWorkplace::mainWorkplace ()->activeAttachedWindow ();
+ if (window) wcaption.append (" - " + window->fullCaption ());
KMdiMainFrm::setCaption (wcaption);
}
Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp 2007-03-15 19:38:27 UTC (rev 1589)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp 2007-03-15 19:52:55 UTC (rev 1590)
@@ -120,6 +120,18 @@
setPopupMenu ();
}
+QString RKCommandEditorWindow::fullCaption () {
+ RK_TRACE (COMMANDEDITOR);
+
+ if (m_doc->url ().isEmpty ()) {
+ return (shortCaption ());
+ } else {
+ QString cap = m_doc->url ().url ();
+ if (isModified ()) cap.append (i18n (" [modified]"));
+ return (cap);
+ }
+}
+
QString RKCommandEditorWindow::getDescription () {
RK_TRACE (COMMANDEDITOR);
Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.h
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.h 2007-03-15 19:38:27 UTC (rev 1589)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.h 2007-03-15 19:52:55 UTC (rev 1590)
@@ -2,7 +2,7 @@
rkcommandeditorwindow - description
-------------------
begin : Mon Aug 30 2004
- copyright : (C) 2004, 2006 by Thomas Friedrichsmeier
+ copyright : (C) 2004, 2006, 2007 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -100,6 +100,9 @@
QString getDescription ();
+/** reimplemented from RKMDIWindow to return full path of file (if any) */
+ QString fullCaption ();
+
void setReadOnly (bool ro);
/** Return current url */
Modified: trunk/rkward/rkward/windows/rkworkplaceview.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkworkplaceview.cpp 2007-03-15 19:38:27 UTC (rev 1589)
+++ trunk/rkward/rkward/windows/rkworkplaceview.cpp 2007-03-15 19:52:55 UTC (rev 1590)
@@ -183,14 +183,6 @@
return (pages[tabs->currentTab ()]);
}
-QString RKWorkplaceView::activeCaption () {
- RK_TRACE (APP);
-
- RKMDIWindow *window = activePage ();
- if (!window) return QString ();
- return window->shortCaption ();
-}
-
void RKWorkplaceView::closePage (int index) {
RK_TRACE (APP);
int page = tabs->tabAt (index)->identifier ();
Modified: trunk/rkward/rkward/windows/rkworkplaceview.h
===================================================================
--- trunk/rkward/rkward/windows/rkworkplaceview.h 2007-03-15 19:38:27 UTC (rev 1589)
+++ trunk/rkward/rkward/windows/rkworkplaceview.h 2007-03-15 19:52:55 UTC (rev 1590)
@@ -46,9 +46,6 @@
void setActivePage (RKMDIWindow *widget);
/** @returns the currently active window */
RKMDIWindow *activePage ();
-/** Like activePage ()->shortCaption, but safe even if there is no active window
- at returns the caption of the currently active window. */
- QString activeCaption ();
/** reimplemented form QWidget::setCaption () to emit captionChanged () when the caption changes */
void setCaption (const QString &caption);
/** initialize the window left/right actions */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list