[rkward-cvs] rkward/rkward rkward.cpp,1.92,1.93 rkward.h,1.41,1.42 rkwardui.rc,1.21,1.22
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Thu Sep 15 11:50:05 UTC 2005
- Previous message: [rkward-cvs] rkward ChangeLog,1.66,1.67
- Next message: [rkward-cvs] rkward/rkward/windows rkcommandeditorwindowpart.cpp,NONE,1.1 rkcommandeditorwindowpart.h,NONE,1.1 Makefile.am,1.3,1.4 rkcommandeditorwindow.cpp,1.19,1.20 rkcommandeditorwindow.h,1.14,1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/rkward/rkward/rkward
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10954/rkward
Modified Files:
rkward.cpp rkward.h rkwardui.rc
Log Message:
Create extension part for run line/selection/all, as a child of the katepart. Moving corresponding actions and slots to RKCommandEditorWindowPart. Some more dead code cleanups in RKCommandEditorWindow
Index: rkward.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.cpp,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -d -r1.92 -r1.93
*** rkward.cpp 14 Sep 2005 21:07:06 -0000 1.92
--- rkward.cpp 15 Sep 2005 11:50:03 -0000 1.93
***************
*** 112,117 ****
createShellGUI ( true );
- setEnabledActions(true);
-
RKGlobals::manager = new RKEditorManager ();
/* KMdiChildView * editorManagerView = createWrapper(RKGlobals::editorManager (), i18n( "Data editor"), i18n( "Data editor"));
--- 112,115 ----
***************
*** 291,298 ****
fileOpen->setText (i18n ("Open Command File"));
fileOpenRecent = KStdAction::openRecent(this, SLOT(slotOpenRecentCommandEditor(const KURL&)), actionCollection(), "file_open_recenty");
- fileSave = KStdAction::save(this, SLOT(slotSaveCommandEditor()), actionCollection(), "file_savey");
- fileSave->setText (i18n ("Save Command File"));
- fileSaveAs = KStdAction::saveAs(this, SLOT(slotSaveCommandEditorAs()), actionCollection(), "file_save_asy");
- fileSaveAs->setText (i18n ("Save Command File As"));
fileOpenWorkspace = KStdAction::open(this, SLOT(slotFileOpenWorkspace()), actionCollection(), "file_openx");
--- 289,292 ----
***************
*** 304,310 ****
fileSaveWorkspaceAs->setText (i18n ("Save Workspace As"));
//file_load_libs = new KAction (i18n ("Libraries"), 0, 0, this, SLOT (slotFileLoadLibs ()), actionCollection (), "file_load_libs");
- close_editor = KStdAction::close (this, SLOT(slotCloseEditor ()), actionCollection(), "editor_close");
- close_editor->setText (i18n ("Close current editor"));
- close_editor->setEnabled (false);
close_all_editors = new KAction (i18n ("Close All Editors"), 0, 0, this, SLOT(slotCloseAllEditors ()), actionCollection (), "close_all_editors");
close_all_editors->setEnabled (false);
--- 298,301 ----
***************
*** 323,332 ****
showRObjectBrowser = new KToggleAction (i18n ("Workspace"), 0, 0, this, SLOT(slotShowRObjectBrowser ()), actionCollection(), "windows_robjectbrowser");
- runAll = new KAction (i18n ("Run all"), KShortcut ("F9"), this, SLOT (slotRunAll ()), actionCollection (), "run_all");
- runAll->setIcon("player_fwd");
- runSelection = new KAction (i18n ("Run selection"), KShortcut ("F8"), this, SLOT (slotRunSelection ()), actionCollection (), "run_selection");
- runSelection->setIcon("player_play");
- runLine = new KAction (i18n ("Run current line"), KShortcut ("Ctrl+L"), this, SLOT (slotRunLine ()), actionCollection (), "run_line");
- runLine->setIcon("player_play");
interruptCommand = new KAction (i18n ("Interrupt running command"), 0, 0, this, SLOT (slotInterruptCommand ()), actionCollection (), "interrupt");
interruptCommand->setIcon("player_stop");
--- 314,317 ----
***************
*** 344,348 ****
fileSaveWorkspace->setStatusText(i18n("Saves the actual document"));
fileSaveWorkspaceAs->setStatusText(i18n("Saves the actual document as..."));
- close_editor->setStatusText (i18n ("Closes the current data editor"));
close_all_editors->setStatusText (i18n ("Closes all open data editors"));
filePrint ->setStatusText(i18n("Prints out the actual document"));
--- 329,332 ----
***************
*** 606,619 ****
}
- void RKwardApp::slotCloseEditor () {
- RK_TRACE (APP);
- //RKGlobals::editorManager ()->closeEditor (RKGlobals::editorManager ()->currentEditor ());
- }
-
void RKwardApp::slotCloseAllEditors () {
RK_TRACE (APP);
! /* while (RKGlobals::editorManager ()->numEditors ()) {
! RKGlobals::editorManager ()->closeEditor (RKGlobals::editorManager ()->currentEditor ());
! }*/
}
--- 590,597 ----
}
void RKwardApp::slotCloseAllEditors () {
RK_TRACE (APP);
!
! RKGlobals::editorManager ()->closeAll ();
}
***************
*** 792,862 ****
};
-
- void RKwardApp::slotSaveCommandEditor(){
-
- if (! activeWindow()->inherits("RKCommandEditorWindow"))
- return;
-
-
- RKCommandEditorWindow *editor;
- KURL url;
- QString strURL;
-
- editor = (RKCommandEditorWindow *)activeWindow();
- if (!editor)
- return;
- url = editor->url();
- strURL = url.url();
-
- if (strURL.length() == 0) // was a new document
- saveAsProcedure(editor);
- else
- {
- if (!editor->save())
- KMessageBox::messageBox(this,KMessageBox::Information,i18n("Could not save document"),i18n("Warning"));
- }
- };
- void RKwardApp::slotSaveCommandEditorAs(){
- if (! activeWindow()->inherits("RKCommandEditorWindow"))
- return;
-
- RKCommandEditorWindow *editor;
-
- editor = (RKCommandEditorWindow *)activeWindow();
- if (editor == 0)
- return;
- saveAsProcedure(editor);
- };
-
- void RKwardApp::slotCloseCommandEditor(){
- if (! activeWindow()->inherits("RKCommandEditorWindow"))
- return;
-
- activeWindow()->close();
- };
-
-
- void RKwardApp::saveAsProcedure(RKCommandEditorWindow *editor)
- {
- KFileDialog dlg(QString("."),QString("*.R *.r"),this,i18n("Save file"),true);
- KURL url;
- QString fname;
-
- dlg.setOperationMode(KFileDialog::Saving);
- if (dlg.exec() == QDialog::Rejected)
- return;
- url = dlg.selectedURL();
- if (editor->saveAs(url))
- {
- if (getFilenameAndPath(url,&fname))
- editor->setTabCaption(fname);
- else
- editor->setTabCaption(url.prettyURL());
- }
- else
- KMessageBox::messageBox(this,KMessageBox::Information,i18n("Could not save document"),i18n("Warning"));
- }
-
-
bool RKwardApp::getFilenameAndPath(const KURL &url,QString *fname)
{
--- 770,773 ----
***************
*** 914,963 ****
}
!
!
!
! void RKwardApp::slotRunSelection() {
! if (! activeWindow()->inherits("RKCommandEditorWindow"))
! return;
!
! if(((RKCommandEditorWindow*) activeWindow())->getSelection().isEmpty() || ((RKCommandEditorWindow*) activeWindow())->getSelection().isNull())
! return;
!
! RKGlobals::rInterface ()->issueCommand (new RCommand ( ((RKCommandEditorWindow*) activeWindow())->getSelection(), RCommand::User, ""));
! }
!
! void RKwardApp::slotRunLine() {
! if (! activeWindow()->inherits("RKCommandEditorWindow"))
! return;
!
! if(((RKCommandEditorWindow*) activeWindow())->getLine().isEmpty() || ((RKCommandEditorWindow*) activeWindow())->getLine().isNull())
! return;
!
! RKGlobals::rInterface ()->issueCommand (new RCommand ( ((RKCommandEditorWindow*) activeWindow())->getLine(), RCommand::User, ""));
! }
!
!
! void RKwardApp::slotRunAll() {
! if (!activeWindow()->inherits("RKCommandEditorWindow"))
! return;
! if(((RKCommandEditorWindow*) activeWindow())->getText().isEmpty() || ((RKCommandEditorWindow*) activeWindow())->getText().isNull())
! return;
!
! RKGlobals::rInterface ()->issueCommand (new RCommand ( ((RKCommandEditorWindow*) activeWindow())->getText(), RCommand::User, ""));
! }
!
!
! // TODO: remove this!!!
! void RKwardApp::slotViewActivated (KMdiChildView * window)
! {
! if ((QString) activeWindow()->name()=="dataeditor"){
! m_manager->setActivePart(0L);
! }
! setEnabledActions((QString) activeWindow()->name()=="dataeditor");
setCaption(window->caption());
}
-
-
void RKwardApp::slotOpenRecentCommandEditor(const KURL& url)
{
--- 825,832 ----
}
! void RKwardApp::slotViewActivated (KMdiChildView * window) {
setCaption(window->caption());
}
void RKwardApp::slotOpenRecentCommandEditor(const KURL& url)
{
***************
*** 965,993 ****
}
! void RKwardApp::slotInterruptCommand()
! {
!
! }
!
!
!
! void RKwardApp::setEnabledActions(bool objectEditor)
! {
! if (objectEditor) {
! fileSave->setEnabled(false);
! fileSaveAs->setEnabled(false);
! runAll->setEnabled(false);
! runSelection->setEnabled(false);
! runLine->setEnabled(false);
! interruptCommand->setEnabled(false);
! }
! else{
! fileSave->setEnabled(true);
! fileSaveAs->setEnabled(true);
! runAll->setEnabled(true);
! runSelection->setEnabled(true);
! runLine->setEnabled(true);
! interruptCommand->setEnabled(true);
! }
}
--- 834,839 ----
}
! void RKwardApp::slotInterruptCommand () {
! // TODO!
}
Index: rkward.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** rkward.h 14 Sep 2005 21:07:06 -0000 1.41
--- rkward.h 15 Sep 2005 11:50:03 -0000 1.42
***************
*** 157,162 ****
/** shows the dialog to install/load/unload packages */
void slotFileLoadLibs ();
- /** close current editor */
- void slotCloseEditor ();
/** close all editors */
void slotCloseAllEditors ();
--- 157,160 ----
***************
*** 201,213 ****
void slotNewCommandEditor();
void slotOpenCommandEditor();
- void slotSaveCommandEditor();
- void slotSaveCommandEditorAs();
- void slotCloseCommandEditor();
void slotOpenURL(const KURL &url);
void slotChildWindowCloseRequest (KMdiChildView * window);
- void slotRunSelection();
- void slotRunLine();
void slotInterruptCommand();
- void slotRunAll();
void slotViewActivated (KMdiChildView *window);
void slotOpenRecentCommandEditor(const KURL&);
--- 199,205 ----
***************
*** 226,231 ****
KAction* fileOpen;
KRecentFilesAction* fileOpenRecent;
- KAction* fileSave;
- KAction* fileSaveAs;
KAction* fileOpenWorkspace;
--- 218,221 ----
***************
*** 236,240 ****
KAction* fileQuit;
KAction* file_load_libs;
- KAction* close_editor;
KAction* close_all_editors;
KAction* new_data_frame;
--- 226,229 ----
***************
*** 254,260 ****
KToggleAction* showRObjectBrowser;
- KAction* runAll;
- KAction* runSelection;
- KAction* runLine;
KAction* interruptCommand;
KAction* configure;
--- 243,246 ----
***************
*** 286,290 ****
bool getFilenameAndPath(const KURL &url,QString *fname);
void saveAsProcedure(RKCommandEditorWindow *editor);
- void setEnabledActions(bool commandEditor);
KMdiChildView* outputView();
--- 272,275 ----
Index: rkwardui.rc
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkwardui.rc,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** rkwardui.rc 29 Apr 2005 16:47:30 -0000 1.21
--- rkwardui.rc 15 Sep 2005 11:50:03 -0000 1.22
***************
*** 1,4 ****
<!DOCTYPE kpartgui>
! <kpartgui name="rkward" version="0.3">
<MenuBar>
<Menu name="file"><text>&File</text>
--- 1,4 ----
<!DOCTYPE kpartgui>
! <kpartgui name="rkward" version="0.3.3">
<MenuBar>
<Menu name="file"><text>&File</text>
***************
*** 45,52 ****
<Menu name="run"><text>&Run</text>
! <Separator/>
! <Action name="run_line"/>
! <Action name="run_selection"/>
! <Action name="run_all"/>
<Separator/>
<Action name="interrupt"/>
--- 45,49 ----
<Menu name="run"><text>&Run</text>
! <Merge/>
<Separator/>
<Action name="interrupt"/>
- Previous message: [rkward-cvs] rkward ChangeLog,1.66,1.67
- Next message: [rkward-cvs] rkward/rkward/windows rkcommandeditorwindowpart.cpp,NONE,1.1 rkcommandeditorwindowpart.h,NONE,1.1 Makefile.am,1.3,1.4 rkcommandeditorwindow.cpp,1.19,1.20 rkcommandeditorwindow.h,1.14,1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the rkward-tracker
mailing list