summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2016-08-11 13:53:20 +0200
committerSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2016-08-16 07:11:25 +0000
commitaf97c180983e5a8ac147b97f7773d483bba8cfef (patch)
treedc16d54bdb452b7ce2a18aa83bd1585ed6ea76e4 /sc
parent5b1095fc03e90506cb8ed956fafb528d4f6b0044 (diff)
GSoC notebookbar: multiple .ui implementations
+ added menu controller for .uno:Notebookbar showing all implementations + switching between .ui files + officecfg stores implementation description + added second implementation file notebookbar_groups.ui Change-Id: I9f406daced7a111793f61a2e9f939cba27d92184 Reviewed-on: https://gerrit.libreoffice.org/28067 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/source/ui/docshell/docsh4.cxx12
-rw-r--r--sc/uiconfig/scalc/ui/notebookbar_groups.ui133
3 files changed, 144 insertions, 2 deletions
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 7ab8cd4fbdfa..366eef035f34 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/leftheaderdialog \
sc/uiconfig/scalc/ui/namerangesdialog \
sc/uiconfig/scalc/ui/notebookbar \
+ sc/uiconfig/scalc/ui/notebookbar_groups \
sc/uiconfig/scalc/ui/managenamesdialog \
sc/uiconfig/scalc/ui/movecopysheet \
sc/uiconfig/scalc/ui/movingaveragedialog \
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 6ce6eae2e36d..8fcb604ca0dd 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1097,8 +1097,16 @@ void ScDocShell::Execute( SfxRequest& rReq )
break;
case SID_NOTEBOOKBAR:
{
- if (pBindings)
+ const SfxStringItem* pFile = rReq.GetArg<SfxStringItem>( SID_NOTEBOOKBAR );
+
+ if ( pBindings && ( !pFile || ( pFile && !sfx2::SfxNotebookBar::IsActive() ) ) )
sfx2::SfxNotebookBar::ExecMethod(*pBindings);
+ else if ( pBindings && pFile && pFile->GetValue().isEmpty() )
+ {
+ sfx2::SfxNotebookBar::CloseMethod(*pBindings);
+ if ( sfx2::SfxNotebookBar::IsActive() )
+ sfx2::SfxNotebookBar::ExecMethod(*pBindings);
+ }
}
break;
default:
@@ -1858,7 +1866,7 @@ void ScDocShell::GetState( SfxItemSet &rSet )
case SID_NOTEBOOKBAR:
{
if (GetViewBindings())
- sfx2::SfxNotebookBar::StateMethod(*GetViewBindings(), "modules/scalc/ui/notebookbar.ui");
+ sfx2::SfxNotebookBar::StateMethod(*GetViewBindings(), "modules/scalc/ui/");
}
break;
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groups.ui b/sc/uiconfig/scalc/ui/notebookbar_groups.ui
new file mode 100644
index 000000000000..0154978af690
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/notebookbar_groups.ui
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
+<interface>
+ <requires lib="gtk+" version="3.12"/>
+ <requires lib="LibreOffice" version="1.0"/>
+ <!-- interface-local-resource-path ../../../icon-themes/galaxy/cmd/ -->
+ <object class="GtkGrid" id="NotebookBar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="vcllo-NotebookbarTabControl" id="notebook1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child>
+ <object class="sfxlo-PriorityHBox" id="FileBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="sfxlo-DropdownBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ <style>
+ <class name="priority-1"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">7</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="FileLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">File</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+</interface>