diff options
author | Gabor Kelemen <gabor.kelemen.extern@allotropia.de> | 2024-03-18 08:43:41 +0100 |
---|---|---|
committer | Gabor Kelemen <gabor.kelemen.extern@allotropia.de> | 2024-03-29 14:26:47 +0100 |
commit | 69a8adcc76de2d827d109d2c66e1d0c64a1e6a52 (patch) | |
tree | 95e1e714b3f00d952e8a5ad554680ebe6893daa9 /svx | |
parent | b4134d3554711bfb1c05e8f36f9f4b5bc52aec3f (diff) |
Use default HIDs in Gallery, simplify code
and copy relevant help texts from helpcontent to .ui file
Change-Id: I3791f7843d6d8a0285d0d3369c867e6b165a582f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165021
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/helpids.h | 5 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 8 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 5 | ||||
-rw-r--r-- | svx/uiconfig/ui/sidebargallery.ui | 25 |
4 files changed, 23 insertions, 20 deletions
diff --git a/svx/inc/helpids.h b/svx/inc/helpids.h index 30e12062db47..01ca23ff058f 100644 --- a/svx/inc/helpids.h +++ b/svx/inc/helpids.h @@ -27,11 +27,6 @@ inline constexpr OUString HID_CTRL3D_HSCROLL = u"SVX_HID_CTRL3D_HSCROLL"_ustr; inline constexpr OUString HID_CTRL3D_SWITCHER = u"SVX_HID_CTRL3D_SWITCHER"_ustr; inline constexpr OUString HID_CTRL3D_VSCROLL = u"SVX_HID_CTRL3D_VSCROLL"_ustr; inline constexpr OUString HID_CTRL_COLOR = u"SVX_HID_CTRL_COLOR"_ustr; -inline constexpr OUString HID_GALLERY_ICONVIEW = u"SVX_HID_GALLERY_ICONVIEW"_ustr; -inline constexpr OUString HID_GALLERY_LISTVIEW = u"SVX_HID_GALLERY_LISTVIEW"_ustr; -inline constexpr OUString HID_GALLERY_NEWTHEME = u"SVX_HID_GALLERY_NEWTHEME"_ustr; -inline constexpr OUString HID_GALLERY_THEMELIST = u"SVX_HID_GALLERY_THEMELIST"_ustr; -inline constexpr OUString HID_GALLERY_WINDOW = u"SVX_HID_GALLERY_WINDOW"_ustr; inline constexpr OUString HID_POPUP_COLOR = u"SVX_HID_POPUP_COLOR"_ustr; inline constexpr OUString HID_POPUP_COLOR_CTRL = u"SVX_HID_POPUP_COLOR_CTRL"_ustr; inline constexpr OUString HID_POPUP_FRAME = u"SVX_HID_POPUP_FRAME"_ustr; diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 443d9be4adec..18c2dae8e39a 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -32,7 +32,6 @@ #include <sfx2/app.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/bindings.hxx> -#include <helpids.h> #include <galobj.hxx> #include <svx/svxids.hrc> #include <svx/gallery1.hxx> @@ -148,11 +147,9 @@ GalleryBrowser1::GalleryBrowser1( , meLastMode ( GALLERYBROWSERMODE_NONE ) , m_aCharacterClassficator( ::comphelper::getProcessComponentContext(), SvtSysLocale().GetLanguageTag() ) { - mxNewTheme->set_help_id(HID_GALLERY_NEWTHEME); mxNewTheme->connect_clicked( LINK( this, GalleryBrowser1, ClickNewThemeHdl ) ); mxThemes->make_sorted(); - mxThemes->set_help_id( HID_GALLERY_THEMELIST ); mxThemes->connect_changed( LINK( this, GalleryBrowser1, SelectThemeHdl ) ); mxThemes->connect_popup_menu(LINK(this, GalleryBrowser1, PopupMenuHdl1)); mxThemes->connect_key_press(LINK(this, GalleryBrowser1, KeyInputHdl1)); @@ -180,9 +177,6 @@ GalleryBrowser1::GalleryBrowser1( "com.sun.star.util.URLTransformer", m_xContext ), css::uno::UNO_QUERY ); - mxIconButton->set_help_id(HID_GALLERY_ICONVIEW); - mxListButton->set_help_id(HID_GALLERY_LISTVIEW); - mxIconButton->connect_toggled( LINK( this, GalleryBrowser1, SelectTbxHdl ) ); mxListButton->connect_toggled( LINK( this, GalleryBrowser1, SelectTbxHdl ) ); @@ -197,8 +191,6 @@ GalleryBrowser1::GalleryBrowser1( mxListView->connect_drag_begin(LINK(this, GalleryBrowser1, DragBeginHdl)); mxSearchField->connect_changed( LINK( this, GalleryBrowser1, SearchHdl)); - mxListView->set_help_id(HID_GALLERY_WINDOW); - SetMode( ( GALLERYBROWSERMODE_PREVIEW != GalleryBrowser1::meInitMode ) ? GalleryBrowser1::meInitMode : GALLERYBROWSERMODE_ICON ); FillThemeEntries(); diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 05b64117577e..b753dbfac069 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -23,7 +23,6 @@ #include <sfx2/dispatch.hxx> #include <sfx2/sfxsids.hrc> #include <avmedia/mediaplayer.hxx> -#include <helpids.h> #include <galbrws1.hxx> #include <svx/galtheme.hxx> #include <svx/galmisc.hxx> @@ -66,8 +65,6 @@ void GalleryPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea) pDrawingArea->set_size_request(aSize.Width(), aSize.Height()); SetOutputSizePixel(aSize); - pDrawingArea->set_help_id(HID_GALLERY_WINDOW); - mxDragDropTargetHelper.reset(new GalleryDragDrop(mpParent, pDrawingArea->get_drop_target())); } @@ -227,7 +224,6 @@ void DialogGalleryPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea) CustomWidgetController::SetDrawingArea(pDrawingArea); Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(70, 88), MapMode(MapUnit::MapAppFont))); pDrawingArea->set_size_request(aSize.Width(), aSize.Height()); - pDrawingArea->set_help_id(HID_GALLERY_WINDOW); } bool DialogGalleryPreview::SetGraphic( const INetURLObject& _aURL ) @@ -302,7 +298,6 @@ void GalleryIconView::SetDrawingArea(weld::DrawingArea* pDrawingArea) SetStyle(GetStyle() | WB_TABSTOP | WB_3DLOOK | WB_BORDER | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_VSCROLL | WB_FLATVALUESET); EnableFullItemMode( false ); - SetHelpId( HID_GALLERY_WINDOW ); SetExtraSpacing( 2 ); SetItemWidth( S_THUMB + 6 ); SetItemHeight( S_THUMB + 6 ); diff --git a/svx/uiconfig/ui/sidebargallery.ui b/svx/uiconfig/ui/sidebargallery.ui index ebeea6134a03..17005c4f780b 100644 --- a/svx/uiconfig/ui/sidebargallery.ui +++ b/svx/uiconfig/ui/sidebargallery.ui @@ -111,6 +111,7 @@ <child internal-child="accessible"> <object class="AtkObject" id="themelist-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="sidebargallery|RID_SVXSTR_GALLERYPROPS_GALTHEME">Gallery Theme</property> + <property name="AtkObject::accessible-description" translatable="yes" context="sidebargallery|THEMELIST">Click a theme to view the objects associated with the theme.</property> </object> </child> </object> @@ -161,6 +162,11 @@ <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> <property name="hexpand">True</property> <property name="vexpand">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="gallery-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="sidebargallery|extended_tip|gallery">To insert a Gallery object, select the object, and then drag it into the document.</property> + </object> + </child> </object> </child> </object> @@ -208,6 +214,11 @@ </child> </object> </child> + <child internal-child="accessible"> + <object class="AtkObject" id="gallerylist-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="sidebargallery|extended_tip|gallery">To insert a Gallery object, select the object, and then drag it into the document.</property> + </object> + </child> </object> </child> </object> @@ -236,6 +247,11 @@ <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> <property name="hexpand">True</property> <property name="vexpand">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="preview-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="sidebargallery|extended_tip|preview">Displays a large preview of the selected gallery item. Double click to close.</property> + </object> + </child> </object> </child> </object> @@ -269,7 +285,7 @@ <property name="always-show-image">True</property> <child internal-child="accessible"> <object class="AtkObject" id="icon-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="sidebargallery|RID_SVXSTR_GALLERY_THEMEITEMS">Theme Items</property> + <property name="AtkObject::accessible-description" translatable="yes" context="sidebargallery|extended_tip|icons">Displays the contents of the Gallery as icons.</property> </object> </child> </object> @@ -288,7 +304,7 @@ <property name="always-show-image">True</property> <child internal-child="accessible"> <object class="AtkObject" id="list-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="sidebargallery|RID_SVXSTR_GALLERY_THEMEITEMS">Theme Items</property> + <property name="AtkObject::accessible-description" translatable="yes" context="sidebargallery|extended_tip|list">Displays the contents of the Gallery as small icons, with title and path information.</property> </object> </child> </object> @@ -341,6 +357,11 @@ <property name="halign">end</property> <property name="hexpand">True</property> <property name="use-underline">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="insert-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="sidebargallery|extended_tip|insert">Adds a new theme to the Gallery and lets you choose the files to include in the theme.</property> + </object> + </child> </object> <packing> <property name="left-attach">4</property> |