Kaydet (Commit) 0f86895f authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt Kaydeden (comit) Caolán McNamara

Add the Navigation buttons to the Search toolbar

They were remove from below the scrollbar before and it was decided to put them on the Search toolbar: http://nabble.documentfoundation.org/Libreoffice-ux-advise-Remove-the-Navigator-button-below-the-scrollbar-in-Writer-tp4083097p4086370.html

Change-Id: I5f7dfc0aa522e97cf3821c494525c967dcd6a92c
Reviewed-on: https://gerrit.libreoffice.org/7006Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 769778e4
...@@ -78,7 +78,7 @@ How to add a new icon for a new command: ...@@ -78,7 +78,7 @@ How to add a new icon for a new command:
</node> </node>
Here, you need to define a property named "Properties", with its value set Here, you need to define a property named "Properties", with its value set
to 1. (TODO: Check if this step is still necessary.) to 1 so that the icons show up.
- Now, you need to add 2 new icon images under icon-themes/galaxy/cmd/, one - Now, you need to add 2 new icon images under icon-themes/galaxy/cmd/, one
for the large size and one for the smaller size. The name of each image for the large size and one for the smaller size. The name of each image
......
...@@ -94,6 +94,10 @@ sd/imglst/sc27095.png cmd/sc_toggleobjectrotatemode.png ...@@ -94,6 +94,10 @@ sd/imglst/sc27095.png cmd/sc_toggleobjectrotatemode.png
cmd/lc_browseforward.png cmd/lc_pagedown.png cmd/lc_browseforward.png cmd/lc_pagedown.png
cmd/lc_navigateforward.png cmd/lc_pagedown.png cmd/lc_navigateforward.png cmd/lc_pagedown.png
cmd/lc_nextpage.png cmd/lc_pagedown.png cmd/lc_nextpage.png cmd/lc_pagedown.png
cmd/lc_scrolltoprevious.png cmd/lc_pageup.png
cmd/sc_scrolltoprevious.png cmd/sc_pageup.png
cmd/lc_scrolltonext.png cmd/lc_pagedown.png
cmd/sc_scrolltonext.png cmd/sc_pagedown.png
res/lc06300.png cmd/lc_pagedown.png res/lc06300.png cmd/lc_pagedown.png
cmd/lc_insertavmedia.png cmd/lc_avmediaplayer.png cmd/lc_insertavmedia.png cmd/lc_avmediaplayer.png
cmd/sc_closewin.png cmd/sc_closedoc.png cmd/sc_closewin.png cmd/sc_closedoc.png
......
...@@ -2319,6 +2319,27 @@ ...@@ -2319,6 +2319,27 @@
<value xml:lang="en-US">Continue previous numbering</value> <value xml:lang="en-US">Continue previous numbering</value>
</prop> </prop>
</node> </node>
<node oor:name=".uno:NavigationPopup" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Navigate by</value>
</prop>
</node>
<node oor:name=".uno:ScrollToPrevious" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Previous Element</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
<node oor:name=".uno:ScrollToNext" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Next Element</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
<node oor:name=".uno:NavigateBack" oor:op="replace"> <node oor:name=".uno:NavigateBack" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string"> <prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Back</value> <value xml:lang="en-US">Back</value>
......
...@@ -204,8 +204,7 @@ included in c-context files, so c++ style stuff will cause problems. ...@@ -204,8 +204,7 @@ included in c-context files, so c++ style stuff will cause problems.
#define FN_DROP_REGION_LINK (FN_VIEW + 38) /**/ #define FN_DROP_REGION_LINK (FN_VIEW + 38) /**/
#define FN_DROP_REGION_COPY (FN_VIEW + 39) /**/ #define FN_DROP_REGION_COPY (FN_VIEW + 39) /**/
#define FN_SCROLL_NAVIGATION (FN_VIEW + 40) /* Navigation Controller in the scrollbar */ #define FN_SCROLL_NAVIGATION (FN_VIEW + 40) /* Navigation Controller */
#define FN_SCROLL_NEXT_PREV (FN_VIEW + 41) /* processes MoveType */
#define FN_VIEW_HIDDEN_PARA (FN_VIEW + 42) /* View hidden paragraphs */ #define FN_VIEW_HIDDEN_PARA (FN_VIEW + 42) /* View hidden paragraphs */
#define FN_VIEW_SMOOTH_SCROLL (FN_VIEW + 43) #define FN_VIEW_SMOOTH_SCROLL (FN_VIEW + 43)
...@@ -223,6 +222,10 @@ included in c-context files, so c++ style stuff will cause problems. ...@@ -223,6 +222,10 @@ included in c-context files, so c++ style stuff will cause problems.
#define FN_VSCROLL_METRIC (FN_VIEW + 54) /* Metric vertical scrollbar */ #define FN_VSCROLL_METRIC (FN_VIEW + 54) /* Metric vertical scrollbar */
#define FN_VIEW_NOTES (FN_VIEW + 55) #define FN_VIEW_NOTES (FN_VIEW + 55)
#define FN_NAVIGATION_POPUP (FN_VIEW + 56) /* Navigation Popup */
#define FN_SCROLL_PREV (FN_VIEW + 57) /* uno:ScrollToPrevious */
#define FN_SCROLL_NEXT (FN_VIEW + 58) /* uno:ScrollToNext */
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Region: Insert Region: Insert
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
......
...@@ -76,7 +76,15 @@ interface BaseTextEditView ...@@ -76,7 +76,15 @@ interface BaseTextEditView
ExecMethod = NoExec ; ExecMethod = NoExec ;
StateMethod = NoState ; StateMethod = NoState ;
] ]
FN_SCROLL_NEXT_PREV FN_NAVIGATION_POPUP
[
ExecMethod = Execute;
]
FN_SCROLL_PREV
[
ExecMethod = Execute;
]
FN_SCROLL_NEXT
[ [
ExecMethod = Execute; ExecMethod = Execute;
] ]
......
...@@ -6803,9 +6803,56 @@ SfxBoolItem ScrollNavigation FN_SCROLL_NAVIGATION ...@@ -6803,9 +6803,56 @@ SfxBoolItem ScrollNavigation FN_SCROLL_NAVIGATION
GroupId = GID_VIEW; GroupId = GID_VIEW;
] ]
//-------------------------------------------------------------------------- SfxVoidItem NavigationPopup FN_NAVIGATION_POPUP
SfxVoidItem ScrollNextPrev FN_SCROLL_NEXT_PREV ()
( SfxBoolItem ScrollNextPrev FN_SCROLL_NEXT_PREV ) [
/* flags: */
AutoUpdate = FALSE,
Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
ReadOnlyDoc = TRUE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
Synchron;
/* config: */
AccelConfig = FALSE,
MenuConfig = FALSE,
StatusBarConfig = FALSE,
ToolBoxConfig = FALSE,
GroupId = GID_NAVIGATOR;
]
SfxVoidItem ScrollToPrevious FN_SCROLL_PREV
()
[
/* flags: */
AutoUpdate = FALSE,
Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
ReadOnlyDoc = TRUE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
Synchron;
/* config: */
AccelConfig = FALSE,
MenuConfig = FALSE,
StatusBarConfig = FALSE,
ToolBoxConfig = FALSE,
GroupId = GID_NAVIGATOR;
]
SfxVoidItem ScrollToNext FN_SCROLL_NEXT
()
[ [
/* flags: */ /* flags: */
AutoUpdate = FALSE, AutoUpdate = FALSE,
......
...@@ -525,7 +525,7 @@ public: ...@@ -525,7 +525,7 @@ public:
void ChangeTabMetric(FieldUnit eUnit); void ChangeTabMetric(FieldUnit eUnit);
void GetHRulerMetric(FieldUnit& rToFill) const; void GetHRulerMetric(FieldUnit& rToFill) const;
// Handler // Handler
void Execute(SfxRequest&); void Execute(SfxRequest&);
void ExecPageMove(SfxRequest&); void ExecPageMove(SfxRequest&);
void ExecStyle(SfxRequest&); void ExecStyle(SfxRequest&);
......
...@@ -566,15 +566,12 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) ...@@ -566,15 +566,12 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
} }
else else
{ {
SfxBoolItem aNext(FN_SCROLL_NEXT_PREV, NID_NEXT == nSet); Sequence< PropertyValue > aArgs;
Any a; OUString cmd(".uno:ScrollToPrevious");
Sequence< PropertyValue > aArgs( 1 ); if (NID_NEXT == nSet)
aArgs[0].Name = "ScrollNextPrev"; cmd = OUString(".uno:ScrollToNext");
aNext.QueryValue( a );
aArgs[0].Value = a;
SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ), SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ),
OUString( ".uno:ScrollNextPrev" ), cmd, aArgs );
aArgs );
} }
return 0; return 0;
} }
......
...@@ -1006,19 +1006,34 @@ void SwView::Execute(SfxRequest &rReq) ...@@ -1006,19 +1006,34 @@ void SwView::Execute(SfxRequest &rReq)
lcl_SetAllTextToDefaultLanguage( *m_pWrtShell, RES_CHRATR_CJK_LANGUAGE ); lcl_SetAllTextToDefaultLanguage( *m_pWrtShell, RES_CHRATR_CJK_LANGUAGE );
} }
break; break;
case FN_SCROLL_NEXT_PREV: case FN_SCROLL_PREV:
if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, sal_False, &pItem)) case FN_SCROLL_NEXT:
{
// call the handlers of PageUp/DownButtons, only
bool *pbNext = new bool(true); // FN_SCROLL_NEXT
if (nSlot == FN_SCROLL_PREV)
*pbNext = false;
// #i75416# move the execution of the search to an asynchronously called static link
Application::PostUserEvent( STATIC_LINK(this, SwView, MoveNavigationHdl), pbNext );
}
break;
case FN_NAVIGATION_POPUP:
{
SfxViewFrame* pVFrame = GetViewFrame();
SfxChildWindow* pCh = pVFrame->GetChildWindow( SID_NAVIGATOR );
if (!pCh)
{ {
// call the handlers of PageUp/DownButtons, only pVFrame->ToggleChildWindow( SID_NAVIGATOR );
bool* pbNext = new bool ( ((const SfxBoolItem*)pItem)->GetValue() ); pCh = pVFrame->GetChildWindow( SID_NAVIGATOR );
// #i75416# move the execution of the search to an asynchronously called static link
Application::PostUserEvent( STATIC_LINK(this, SwView, MoveNavigationHdl), pbNext );
} }
break; ((SwNavigationPI*) pCh->GetContextWindow(SW_MOD()))->CreateNavigationTool(
GetVisArea(), true, &pVFrame->GetWindow());
}
break;
case SID_JUMPTOMARK: case SID_JUMPTOMARK:
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, sal_False, &pItem)) if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, sal_False, &pItem))
JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() ); JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() );
break; break;
case SID_GALLERY : case SID_GALLERY :
GetViewFrame()->ChildWindowExecute(rReq); GetViewFrame()->ChildWindowExecute(rReq);
break; break;
......
...@@ -26,4 +26,8 @@ ...@@ -26,4 +26,8 @@
<toolbar:toolbaritem xlink:href=".uno:MatchCase"/> <toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:SearchDialog"/> <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:ScrollToPrevious"/>
<toolbar:toolbaritem xlink:href=".uno:NavigationPopup"/>
<toolbar:toolbaritem xlink:href=".uno:ScrollToNext"/>
</toolbar:toolbar> </toolbar:toolbar>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment