Bug 79082 - Load project toolbars when opening project
Summary: Load project toolbars when opening project
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Unmaintained
Component: general (show other bugs)
Version: CVS HEAD
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-05 06:07 UTC by Magnus Määttä
Modified: 2004-04-06 18:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Määttä 2004-04-05 06:07:53 UTC
Version:           CVS HEAD (using KDE KDE 3.2.0)
Installed from:    Gentoo Packages
OS:          Linux

I have made my own project toolbar with all buttons I need that are normally in the regular toolbar (and plugins toolbar). So I remove the regular toolbars and add my project toolbar.

That way I save 20-30 pixels of space, more space for my code!

Now I was thinking, having a way to have some or all project toolbars autoloaded when you open a project would be a really nice feature.

Also, it would be nice if I could hide the plugins toolbar like I can do with the normal toolbar (View->Show Toolbar) so I don't have to have it floating around.

I know you can do some hacky thing by putting and editing some file in your home dir. But you might not want to have same toolbar for different projects.
Comment 1 András Manţia 2004-04-05 10:28:12 UTC
> Now I was thinking, having a way to have some or all project toolbars
> autoloaded when you open a project would be a really nice feature.

Save a Project View and set it to the default view. Look at Project->Save 
Project View and Project->Project Options. Is it OK for you?

> Also, it would be nice if I could hide the plugins toolbar like I can do
> with the normal toolbar (View->Show Toolbar) so I don't have to have it
> floating around.
Hm, right. ;-) 

Andras

> I know you can do some hacky thing by putting and editing some file in your
> home dir. But you might not want to have same toolbar for different
> projects.

Comment 2 Magnus Määttä 2004-04-05 11:39:12 UTC
Ahh.. Yes.. That's perfect!
Didn't even know what that View stuff was =)

Anyway.. Just noticed something else too.. When you remove the main toolbar (via View->Show Toolbar), that won't be saved and you have to remove it at next startup again.. It's minor, but if it's possible to save it in some application setting that would be great.

Thanks for the great work!
Comment 3 András Manţia 2004-04-06 18:46:12 UTC
CVS commit by amantia: 



CCMAIL: 79082-done@bugs.kde.org


  M +3 -0      ChangeLog   1.205.2.30
  M +3 -0      quanta/quanta.cpp   1.414.2.19
  M +24 -19    quanta/quanta_init.cpp   1.399.2.9


--- quanta/ChangeLog  #1.205.2.29:1.205.2.30
@@ -4,4 +4,7 @@
     - bugfixes:
         - don't crash when source/VPL buttons are pressed while a plugin is visible [#76616]
+        - fix search problems when Preview is set to appear in the bottom area [#76832]
+        - fix restoration of the toolbar visibility setting [#79082]
+        - hide/show the plugin toolbar as well when Show Toolbar is unchecked/checked [#79082]
 
     - improvements:

--- quanta/quanta/quanta.cpp  #1.414.2.18:1.414.2.19
@@ -573,4 +573,5 @@ void QuantaApp::slotViewToolBar()
   QToolBar *ebar = toolBar("mainEditToolBar");
   QToolBar *nbar = toolBar("mainNaviToolBar");
+  QToolBar *pbar = toolBar("mainPluginsToolBar");
 
   if(mbar->isVisible()) {
@@ -578,4 +579,5 @@ void QuantaApp::slotViewToolBar()
     ebar->hide();
     nbar->hide();
+    pbar->hide();
   }
   else {
@@ -583,4 +585,5 @@ void QuantaApp::slotViewToolBar()
     ebar->show();
     mbar->show();
+    pbar->show();
   }
 }

--- quanta/quanta/quanta_init.cpp  #1.399.2.8:1.399.2.9
@@ -214,4 +214,22 @@ void QuantaApp::initQuanta()
   createGUI( QString::null, false /* conserveMemory */ );
 
+  KToggleAction *showToolbarAction = (KToggleAction *) actionCollection()->action( "view_toolbar" );
+  m_config->setGroup("General Options");
+  if (!m_config->readBoolEntry("Show Toolbar",true))
+  {
+    toolBar("mainToolBar")->hide();
+    toolBar("mainEditToolBar")->hide();
+    toolBar("mainNaviToolBar")->hide();
+    toolBar("mainPluginsToolBar")->hide();
+    showToolbarAction->setChecked(false);
+  } else
+  {
+    toolBar("mainToolBar")->show();
+    toolBar("mainEditToolBar")->show();
+    toolBar("mainNaviToolBar")->show();
+    toolBar("mainPluginsToolBar")->show();
+    showToolbarAction->setChecked(true);
+  }
+
 //Compatility code (read the action shortcuts from quantaui.rc)
 //TODO: Remove after upgrade from 3.1 is not supported
@@ -729,17 +747,4 @@ void QuantaApp::readOptions()
   qConfig.autosaveInterval = m_config->readNumEntry("Autosave interval", 1);
 
-  KToggleAction *showToolbarAction = (KToggleAction *) actionCollection()->action( "view_toolbar" );
-  if (!m_config->readBoolEntry("Show Toolbar",true))
-  {
-    toolBar("mainToolBar")->hide();
-    toolBar("mainEditToolBar")->hide();
-    toolBar("mainNaviToolBar")->hide();
-    showToolbarAction->setChecked(false);
-  } else
-  {
-    toolBar("mainToolBar")->show();
-    toolBar("mainEditToolBar")->show();
-    toolBar("mainNaviToolBar")->show();
-  }
   if (!m_config->readBoolEntry("Show Statusbar", true))
   {
@@ -750,5 +755,5 @@ void QuantaApp::readOptions()
   }
   slotViewStatusBar();
-  showToolbarAction  ->setChecked(m_config->readBoolEntry("Show Toolbar",   true));
+//  showToolbarAction  ->setChecked(m_config->readBoolEntry("Show Toolbar",   true));
   qConfig.enableDTDToolbar = m_config->readBoolEntry("Show DTD Toolbar",true);
   showDTDToolbar->setChecked(qConfig.enableDTDToolbar);