summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristopher Davis <christopherdavis@gnome.org>2021-09-21 22:12:44 -0700
committerChristopher Davis <christopherdavis@gnome.org>2021-09-22 02:08:38 -0700
commit959ef4b4768d6a192f715115029dd3d15d40069f (patch)
tree4f01f2417332de0e00d919c59a67d681ad988349 /data
parent3b628ac25b6209d414d1f8964a743e0a2b0a29f9 (diff)
downloadbaobab-959ef4b4768d6a192f715115029dd3d15d40069f.tar.gz
window: Use popover instead of GtkMenu
GtkMenu is gone in GTK4
Diffstat (limited to 'data')
-rw-r--r--data/baobab.gresource.xml1
-rw-r--r--data/ui/baobab-main-window.ui32
-rw-r--r--data/ui/baobab-treeview-menu.ui19
3 files changed, 23 insertions, 29 deletions
diff --git a/data/baobab.gresource.xml b/data/baobab.gresource.xml
index d61d46c..2f1709f 100644
--- a/data/baobab.gresource.xml
+++ b/data/baobab.gresource.xml
@@ -9,6 +9,7 @@
<file compressed="true">ui/baobab-main-window.ui</file>
<file compressed="true">ui/baobab-pathbutton.ui</file>
<file compressed="true">ui/baobab-preferences-dialog.ui</file>
+ <file compressed="true">ui/baobab-treeview-menu.ui</file>
<file compressed="true">gtk/help-overlay.ui</file>
<file compressed="true">gtk/menus.ui</file>
<file compressed="true">icons/scalable/actions/view-ringschart-symbolic.svg</file>
diff --git a/data/ui/baobab-main-window.ui b/data/ui/baobab-main-window.ui
index b677cb5..e1cd76a 100644
--- a/data/ui/baobab-main-window.ui
+++ b/data/ui/baobab-main-window.ui
@@ -31,36 +31,10 @@
</item>
</section>
</menu>
- <object class="GtkMenu" id="treeview_popup_menu">
- <property name="visible">True</property>
+ <object class="GtkPopoverMenu" id="treeview_popover_menu">
<property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="treeview_popup_open">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Open Folder</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="treeview_popup_copy">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Copy Path to Clipboard</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="treeview_popup_trash">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Mo_ve to Trash</property>
- <property name="use_underline">True</property>
- </object>
- </child>
+ <property name="relative-to">treeview</property>
+ <property name="position">bottom</property>
</object>
<template class="BaobabWindow" parent="HdyApplicationWindow">
<property name="title" translatable="yes">Disk Usage Analyzer</property>
diff --git a/data/ui/baobab-treeview-menu.ui b/data/ui/baobab-treeview-menu.ui
new file mode 100644
index 0000000..26ad7db
--- /dev/null
+++ b/data/ui/baobab-treeview-menu.ui
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <menu id="treeview_menu">
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">_Open Folder</attribute>
+ <attribute name="action">win.treeview-open-folder</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Copy Path to Clipboard</attribute>
+ <attribute name="action">win.treeview-copy</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Mo_ve to Trash</attribute>
+ <attribute name="action">win.treeview-trash</attribute>
+ </item>
+ </section>
+ </menu>
+</interface>