[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/office/kile/kile
From:       Holger Danielsson <holger.danielsson () t-online ! de>
Date:       2005-11-16 12:59:58
Message-ID: 1132145998.778713.15237.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 480746 by danielsson:

change some default toolbar settings of Kile and add a new menu entry 'Close All \
Other Files'

 M  +1 -0      kile.cpp  
 M  +15 -0     kiledocmanager.cpp  
 M  +1 -0      kiledocmanager.h  
 M  +9 -3      kileui.rc  


--- trunk/extragear/office/kile/kile/kile.cpp #480745:480746
@@ -359,6 +359,7 @@
 	(void) new KAction(i18n("&Remove Template..."),0, docManager(), \
SLOT(removeTemplate()), actionCollection(), "template_remove");  (void) \
KStdAction::close(docManager(), SLOT(fileClose()), actionCollection(),"file_close" ); \
(void) new KAction(i18n("Close All"), 0, docManager(), SLOT(fileCloseAll()), \
actionCollection(),"file_close_all" ); +	(void) new KAction(i18n("Close All \
Ot&hers"), 0, docManager(), SLOT(fileCloseAllOthers()), \
actionCollection(),"file_close_all_others" );  (void) new \
KAction(i18n("S&tatistics"), 0, this, SLOT(showDocInfo()), actionCollection(), \
"Statistics" );  (void) new KAction(i18n("&ASCII"), 0, this, SLOT(convertToASCII()), \
actionCollection(), "file_export_ascii" );  (void) new KAction(i18n("Latin-&1 (iso \
                8859-1)"), 0, this, SLOT(convertToEnc()), actionCollection(), \
                "file_export_latin1" );
--- trunk/extragear/office/kile/kile/kiledocmanager.cpp #480745:480746
@@ -785,6 +785,21 @@
 	m_ki->fileSelector()->blockSignals(false);
 }
 
+bool Manager::fileCloseAllOthers()
+{
+	Kate::View * currentview = m_ki->viewManager()->currentView();
+	while (  m_ki->viewManager()->views().count() > 1 )
+	{
+		Kate::View *view =  m_ki->viewManager()->views().first();
+		if ( view == currentview )
+			view =  m_ki->viewManager()->views().next();
+		if ( ! fileClose(view->getDoc()) )
+			return false;
+	}
+
+	return true;
+}
+
 bool Manager::fileCloseAll()
 {
 	Kate::View * view = m_ki->viewManager()->currentView();
--- trunk/extragear/office/kile/kile/kiledocmanager.h #480745:480746
@@ -77,6 +77,7 @@
 	void saveURL(const KURL &);
 	void fileSaveAll(bool amAutoSaving = false);
 
+	bool fileCloseAllOthers();
 	bool fileCloseAll();
 	bool fileClose(const KURL & url);
 	bool fileClose(Kate::Document *doc = 0L, bool closingproject = false);
--- trunk/extragear/office/kile/kile/kileui.rc #480745:480746
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="kile" version="17">
+<kpartgui name="kile" version="18">
 <Menu name="ktexteditor_popup" noMerge="1">
 	<DefineGroup name="popup_operations" />
 	<Action name="popup_pasteaslatex"/>
@@ -39,6 +39,7 @@
 	<Separator/>
 	<Action name="file_close"/>
 	<Action name="file_close_all"/>
+	<Action name="file_close_all_others"/>
 	<Separator/>
 	<Action name="file_quit"/>
 </Menu>
@@ -553,10 +554,15 @@
 	<Separator lineSeparator="true"/>
 	<Action name="tag_textbf"/>
 	<Action name="tag_textit"/>
+	<Action name="tag_texttt"/>
 	<Action name="tag_underline"/>
-	<Action name="tag_flushleft"/>
+	<Separator/>
 	<Action name="tag_center"/>
-	<Action name="tag_flushright"/>
+	<Separator/>
+	<Action name="tag_env_itemize"/>
+	<Action name="tag_env_enumerate"/>
+	<Action name="tag_env_description"/>
+	<Action name="tag_item"/>
 </ToolBar>
 <ToolBar name="mathToolBar" fullWidth="false" index="6"><text>Math</text>
 	<Action name="tag_mathmode"/>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic