[rkward-cvs] rkward/rkward rkeditormanager.cpp,1.10,1.11 rkward.cpp,1.108,1.109 rkward.h,1.50,1.51 rkwardui.rc,1.26,1.27

Thomas Friedrichsmeier tfry at users.sourceforge.net
Wed Oct 19 22:39:34 UTC 2005


Update of /cvsroot/rkward/rkward/rkward
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14824/rkward

Modified Files:
	rkeditormanager.cpp rkward.cpp rkward.h rkwardui.rc 
Log Message:
Do not try to show toolbars while corresponding part is not active. Use standard mechanism for toolbars. TODO: find out, how to save states for the toolbars, now

Index: rkward.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** rkward.h	16 Oct 2005 21:40:55 -0000	1.50
--- rkward.h	19 Oct 2005 22:39:32 -0000	1.51
***************
*** 79,85 ****
  /** construtor
  @param load_url The workspace file to load on startup. If 0, show a dialog asking what to do. */
! 	RKwardApp(KURL *load_url=0);
  /** destructor */
! 	~RKwardApp();
  
  /** initialize the backend */
--- 79,85 ----
  /** construtor
  @param load_url The workspace file to load on startup. If 0, show a dialog asking what to do. */
! 	RKwardApp (KURL *load_url=0);
  /** destructor */
! 	~RKwardApp ();
  
  /** initialize the backend */
***************
*** 170,176 ****
  	*/
  	void slotFileQuit();
- 	/** toggles the toolbar
- 	*/
- 	void slotViewToolBar();
  	/** toggles the statusbar
  	*/
--- 170,173 ----
***************
*** 229,233 ****
  	KAction* outputShow;
  
- 	KToggleAction* viewToolBar;
  	KToggleAction* viewStatusBar;
  
--- 226,229 ----
***************
*** 259,264 ****
  /** set the R status message ("R engine idel/busy") to idle or busy */
  	void setRStatus (bool busy);
- 	
- 	void saveAsProcedure(RKCommandEditorWindow *editor);
  
  	/** refreshes the output.
--- 255,258 ----
***************
*** 267,271 ****
  	void refreshOutput (bool show, bool raise);
  signals:
! /** no idea, why we have to declare this explicitly, to somehow we do. */
  	void childWindowCloseRequest (KMdiChildView *);
  };
--- 261,265 ----
  	void refreshOutput (bool show, bool raise);
  signals:
! /** no idea, why we have to declare this explicitly, but somehow we do. */
  	void childWindowCloseRequest (KMdiChildView *);
  };

Index: rkward.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -d -r1.108 -r1.109
*** rkward.cpp	16 Oct 2005 21:40:55 -0000	1.108
--- rkward.cpp	19 Oct 2005 22:39:32 -0000	1.109
***************
*** 85,88 ****
--- 85,93 ----
  RKwardApp::RKwardApp (KURL *load_url) : DCOPObject ("rkwardapp"), KMdiMainFrm (0, 0, KMdi::IDEAlMode) {
  	ShowEditTextFileAgent::showEditFiles (0);		// TODO: AAAAAAAARGGGH!!!! It won't link without this bogus line!!!
+ 	// TODO: more linking workarounds: These lines are actually totally useless, as the real values are set during R initilization
+ 	RKGlobals::empty_char = const_cast<char*> ("");
+ 	RKGlobals::unknown_char = const_cast<char*> ("");
+ 	RKGlobals::na_double = 0.0;
+ 	// END linking workarounds
  
  	RK_TRACE (APP);
***************
*** 303,307 ****
  	file_load_libs = new KAction (i18n ("Configure Packages"), 0, 0, this, SLOT (slotFileLoadLibs ()), actionCollection (), "file_load_libs");	
  
! 	viewToolBar = KStdAction::showToolbar(this, SLOT (slotViewToolBar()), actionCollection());
  	viewStatusBar = KStdAction::showStatusbar(this, SLOT (slotViewStatusBar()), actionCollection());
  
--- 308,312 ----
  	file_load_libs = new KAction (i18n ("Configure Packages"), 0, 0, this, SLOT (slotFileLoadLibs ()), actionCollection (), "file_load_libs");	
  
! 	setStandardToolBarMenuEnabled (true);
  	viewStatusBar = KStdAction::showStatusbar(this, SLOT (slotViewStatusBar()), actionCollection());
  
***************
*** 322,326 ****
  	filePrint ->setStatusText(i18n("Prints out the actual document"));
  	fileQuit->setStatusText(i18n("Quits the application"));
- 	viewToolBar->setStatusText(i18n("Enables/disables the toolbar"));
  	viewStatusBar->setStatusText(i18n("Enables/disables the statusbar"));
  }
--- 327,330 ----
***************
*** 349,357 ****
  	config->setGroup("General Options");
  	config->writeEntry("Geometry", size());
! 	config->writeEntry("Show Toolbar", viewToolBar->isChecked());
  	config->writeEntry("Show Statusbar",viewStatusBar->isChecked());
  	config->writeEntry("ToolBarPos", (int) toolBar("mainToolBar")->barPos());
! 	config->writeEntry("EditBarPos", (int) toolBar("editToolBar")->barPos());
! 	config->writeEntry("RunBarPos", (int) toolBar("runToolBar")->barPos());
  
  	RKSettings::saveSettings (config);
--- 353,361 ----
  	config->setGroup("General Options");
  	config->writeEntry("Geometry", size());
! //	config->writeEntry("Show Toolbar", viewToolBar->isChecked());
  	config->writeEntry("Show Statusbar",viewStatusBar->isChecked());
  	config->writeEntry("ToolBarPos", (int) toolBar("mainToolBar")->barPos());
! /*	config->writeEntry("EditBarPos", (int) toolBar("editToolBar")->barPos());
! 	config->writeEntry("RunBarPos", (int) toolBar("runToolBar")->barPos()); */
  
  	RKSettings::saveSettings (config);
***************
*** 371,376 ****
  	
  	// bar status settings
! 	viewToolBar->setChecked (config->readBoolEntry ("Show Toolbar", true));
! 	slotViewToolBar ();
  
  	viewStatusBar->setChecked (config->readBoolEntry ("Show Statusbar", true));
--- 375,379 ----
  	
  	// bar status settings
! //	viewToolBar->setChecked (config->readBoolEntry ("Show Toolbar", true));
  
  	viewStatusBar->setChecked (config->readBoolEntry ("Show Statusbar", true));
***************
*** 379,384 ****
  	// bar position settings
  	toolBar("mainToolBar")->setBarPos ((KToolBar::BarPosition) config->readNumEntry ("ToolBarPos", KToolBar::Top));
! 	toolBar("editToolBar")->setBarPos ((KToolBar::BarPosition) config->readNumEntry ("EditBarPos", KToolBar::Top));
! 	toolBar("runToolBar")->setBarPos ((KToolBar::BarPosition) config->readNumEntry("RunBarPos", KToolBar::Top));
  	
  	QSize size=config->readSizeEntry("Geometry");
--- 382,388 ----
  	// bar position settings
  	toolBar("mainToolBar")->setBarPos ((KToolBar::BarPosition) config->readNumEntry ("ToolBarPos", KToolBar::Top));
! /*	toolBar("editToolBar")->setBarPos ((KToolBar::BarPosition) config->readNumEntry ("EditBarPos", KToolBar::Top));
! 	toolBar("runToolBar")->setBarPos ((KToolBar::BarPosition) config->readNumEntry("RunBarPos", KToolBar::Top)); */
! //	delete toolBar ("KMdiTaskBar");
  	
  	QSize size=config->readSizeEntry("Geometry");
***************
*** 586,611 ****
  }
  
- void RKwardApp::slotViewToolBar()
- {
- 	RK_TRACE (APP);
-   slotStatusMsg(i18n("Toggling toolbar..."));
-   ///////////////////////////////////////////////////////////////////
-   // turn Toolbar on or off
-   if(!viewToolBar->isChecked())
-   {
-     toolBar("mainToolBar")->hide();
-     toolBar("runToolBar")->hide();
-     toolBar("editToolBar")->hide();
-   }
-   else
-   {
-     toolBar("mainToolBar")->show();
-     toolBar("runToolBar")->show();
-     toolBar("editToolBar")->show();
-   }		
- 
-   slotStatusReady ();
- }
- 
  void RKwardApp::slotViewStatusBar()
  {
--- 590,593 ----

Index: rkeditormanager.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkeditormanager.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** rkeditormanager.cpp	29 Sep 2005 16:02:50 -0000	1.10
--- rkeditormanager.cpp	19 Oct 2005 22:39:32 -0000	1.11
***************
*** 172,176 ****
  	RK_TRACE (APP);
  
! 	QValueList<RKEditor*>::iterator it = editors.find (static_cast<RKEditor*> (editor));
  	if (it != editors.end ()) editors.erase (it);
  
--- 172,177 ----
  	RK_TRACE (APP);
  
! 	RKEditor *ed = static_cast<RKEditor*> (editor);
! 	QValueList<RKEditor*>::iterator it = editors.find (ed);
  	if (it != editors.end ()) editors.erase (it);
  

Index: rkwardui.rc
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkwardui.rc,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** rkwardui.rc	16 Oct 2005 20:44:16 -0000	1.26
--- rkwardui.rc	19 Oct 2005 22:39:32 -0000	1.27
***************
*** 14,19 ****
  		<Action name="file_quitx"/>
  	</Menu>
! 		
! 		
  	<Menu name="workspace"><text>&Workspace</text>
  		<Action name="file_openx"/>
--- 14,18 ----
  		<Action name="file_quitx"/>
  	</Menu>
! 
  	<Menu name="workspace"><text>&Workspace</text>
  		<Action name="file_openx"/>
***************
*** 24,39 ****
  		<Action name="file_load_libs"/>
  	</Menu>
  	
- 	
- 	<Menu name="edit"><text>&Edit</text>
- 		<Action name="cut"/>
- 		<Action name="copy"/>
- 		<Action name="paste"/>
- 		<Action name="paste_to_selection"/>
- 		<Action name="paste_to_table"/>
- 		<Separator/>
- 		<Merge/> 
- 	</Menu>
-  
  	<Menu name="windows"><text>&Windows</text>
  		<Action name="output_show"/>
--- 23,29 ----
  		<Action name="file_load_libs"/>
  	</Menu>
+ 
+ 	<Merge/>
  	
  	<Menu name="windows"><text>&Windows</text>
  		<Action name="output_show"/>
***************
*** 50,55 ****
  		<Action name="configure"/>
  	</Menu>
- 
- 	<Merge/>
  </MenuBar>
  <ToolBar fullWidth="true" name="mainToolBar">
--- 40,43 ----
***************
*** 59,69 ****
  		<Action name="file_open_recenty"/>
  </ToolBar>
- <ToolBar fullWidth="true" name="editToolBar">
- 		<Action name="cut"/>
- 		<Action name="copy"/>
- 		<Action name="paste"/>
- 		<Separator/>
- 		<Action name="paste_to_selection"/>
- 		<Action name="paste_to_table"/>
- </ToolBar>
  </kpartgui>
--- 47,49 ----





More information about the rkward-tracker mailing list