tdf133275: Additions: Sorting menu ui implementation

Change-Id: I41b0887d0bc6bf4618bd1cf9afd06f4b1ddbabb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100778
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
This commit is contained in:
Yusuf Keten 2020-08-15 21:41:45 +03:00 committed by Muhammet Kara
parent a568abf851
commit a6373c1193
3 changed files with 87 additions and 0 deletions

View File

@ -465,6 +465,7 @@ AdditionsDialog::AdditionsDialog(weld::Window* pParent, const OUString& sAdditio
, m_xContentWindow(m_xBuilder->weld_scrolled_window("contentWindow"))
, m_xContentGrid(m_xBuilder->weld_container("contentGrid"))
, m_xLabelProgress(m_xBuilder->weld_label("labelProgress"))
, m_xGearBtn(m_xBuilder->weld_menu_button("buttonGear"))
{
m_aSearchDataTimer.SetInvokeHandler(LINK(this, AdditionsDialog, ImplUpdateDataHdl));
m_aSearchDataTimer.SetDebugName("AdditionsDialog SearchDataTimer");

View File

@ -74,6 +74,8 @@ public:
std::unique_ptr<weld::Container> m_xContentGrid;
std::unique_ptr<weld::Label> m_xLabelProgress;
std::unique_ptr<weld::MenuButton> m_xGearBtn;
::rtl::Reference<SearchAndParseThread> m_pSearchThread;
OString m_sURL;

View File

@ -2,6 +2,89 @@
<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
<object class="GtkMenu" id="additionsmenu">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkCheckMenuItem" id="gear_activeVersionOnly">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="customanimationfragment|90">Active version only</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="gear_separator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="sort">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="bulletandposition|gallery">Sort by</property>
<child type="submenu">
<object class="GtkMenu" id="sortSubMenu">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkRadioMenuItem" id="gear_sort_voting">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="menuassignpage|gear_textOnly">Voting</property>
<property name="draw_as_radio">True</property>
<property name="group">gear_sort_downloads</property>
</object>
</child>
<child>
<object class="GtkRadioMenuItem" id="gear_sort_downloads">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="menuassignpage|gear_textOnly">Downloads</property>
<property name="draw_as_radio">True</property>
<property name="group">gear_sort_voting</property>
</object>
</child>
<child>
<object class="GtkRadioMenuItem" id="gear_sort_comments">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="menuassignpage|gear_textOnly">Comments</property>
<property name="draw_as_radio">True</property>
<property name="group">gear_sort_voting</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="gear_separator2">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkRadioMenuItem" id="gear_detailView">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="menuassignpage|gear_iconAndText">Detail view</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_as_radio">True</property>
<property name="group">gear_condensedList</property>
</object>
</child>
<child>
<object class="GtkRadioMenuItem" id="gear_condensedList">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="menuassignpage|gear_iconAndText">Condensed list</property>
<property name="draw_as_radio">True</property>
<property name="group">gear_detailView</property>
</object>
</child>
</object>
<object class="GtkDialog" id="AdditionsDialog">
<property name="width_request">400</property>
<property name="height_request">500</property>
@ -118,6 +201,7 @@
<property name="receives_default">True</property>
<property name="halign">end</property>
<property name="margin_left">1</property>
<property name="popup">additionsmenu</property>
<property name="use_popover">False</property>
<child>
<object class="GtkImage" id="imageGear">