sw/source/uibase/utlui/content.cxx | 12 ++++++------ vcl/unx/gtk3/gtk3gtkframe.cxx | 8 ++++++++ 2 files changed, 14 insertions(+), 6 deletions(-)
New commits: commit 55e7f73640d754bf0004a0d8a989e0a20de00351 Author: Caolán McNamara <[email protected]> Date: Mon Apr 10 13:08:33 2017 +0100 Resolves: tdf#107031 writer depends on ACTION_DEFAULT to do its standard "honor the DragDropMode setting" on drag and drop of outline headings into a document Change-Id: Ie154fb237de57ae18fa22d6f50dbf890fb9ebc77 diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 1459f669fcca..4de9d457fe60 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -3407,6 +3407,14 @@ gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, GdkDragContext* context aEvent.LocationX = x; aEvent.LocationY = y; aEvent.DropAction = GdkToVcl(gdk_drag_context_get_selected_action(context)); + // ACTION_DEFAULT is documented as... + // 'This means the user did not press any key during the Drag and Drop operation + // and the action that was combined with ACTION_DEFAULT is the system default action' + // in tdf#107031 writer won't insert a link when a heading is dragged from the + // navigator unless this is set. Its unclear really what ACTION_DEFAULT means, + // there is a deprecated 'GDK_ACTION_DEFAULT Means nothing, and should not be used' + // possible equivalent in gtk. + aEvent.DropAction |= css::datatransfer::dnd::DNDConstants::ACTION_DEFAULT; aEvent.SourceActions = GdkToVcl(gdk_drag_context_get_actions(context)); css::uno::Reference<css::datatransfer::XTransferable> xTransferable; // For LibreOffice internal D&D we provide the Transferable without Gtk commit 20881524848bf8478e216671c15ccf00c7b76746 Author: Caolán McNamara <[email protected]> Date: Mon Apr 10 10:46:15 2017 +0100 the navigator menus in writer should use radio entries too Change-Id: Iea9ae8ef33387a76d43aaa802fa0600a352ae1f0 diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 8db9a70127b5..cf178dbf3895 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1105,13 +1105,13 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu() for(int i = 1; i <= MAXLEVEL; ++i) { - pSubPop1->InsertItem( i + 100, OUString::number(i)); + pSubPop1->InsertItem(i + 100, OUString::number(i), MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); } pSubPop1->CheckItem(100 + m_nOutlineLevel); for(int i=0; i < 3; ++i) { - pSubPop2->InsertItem( i + 201, m_aContextStrings[ - STR_HYPERLINK - STR_CONTEXT_FIRST + i]); + pSubPop2->InsertItem(i + 201, m_aContextStrings[ + STR_HYPERLINK - STR_CONTEXT_FIRST + i], MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); } pSubPop2->CheckItem(201 + static_cast<int>(GetParentWindow()->GetRegionDropMode())); // Insert the list of the open files @@ -1127,20 +1127,20 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu() sInsert += m_aContextStrings[ STR_ACTIVE - STR_CONTEXT_FIRST]; sInsert += ")"; } - pSubPop3->InsertItem(nId, sInsert); + pSubPop3->InsertItem(nId, sInsert, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); if (State::CONSTANT == m_eState && m_pActiveShell == &pView->GetWrtShell()) pSubPop3->CheckItem(nId); pView = SwModule::GetNextView(pView); nId++; } - pSubPop3->InsertItem(nId++, m_aContextStrings[STR_ACTIVE_VIEW - STR_CONTEXT_FIRST]); + pSubPop3->InsertItem(nId++, m_aContextStrings[STR_ACTIVE_VIEW - STR_CONTEXT_FIRST], MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); if(m_pHiddenShell) { OUString sHiddenEntry = m_pHiddenShell->GetView().GetDocShell()->GetTitle(); sHiddenEntry += " ( "; sHiddenEntry += m_aContextStrings[ STR_HIDDEN - STR_CONTEXT_FIRST]; sHiddenEntry += " )"; - pSubPop3->InsertItem(nId, sHiddenEntry); + pSubPop3->InsertItem(nId, sHiddenEntry, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK); } if (State::ACTIVE == m_eState)
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
