dab60d5580
The RenameFolderMenu uses the internal box as a menu item, while PopupMenu expects to have PopupBaseMenuItem based children with a delegate set. Instead of using a custom menu with a customized box acting as menu item,just add a RenameFolderMenuItem that inherits from the parent, adjusting the features as we need them. In fact, the rename folder menu item doesn't need any label, padding or default styling so we can reuse PopupMenuBaseItem after we use our styling properties and we set the Ornament to HIDDEN. To get the proper style in place, define rename-folder-popup and rename-folder-popup-item to override the default popup-menu-item rule padding instead of using margins. Pass the menu item as menu's focusActor as this will key-focus it on pop-up, by overriding the key_focus_in() vfunc we can then delegate the focus handling to the entry's clutter-text. Also override the map() vfunc in order to update the entry's content before mapping the entry. Finally, use the item's activate method in order to tell the parent menu we're done with it and that the menu can be closed. As consequence we can also remove the menu's popup() method, and just use the default open(). https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720 |
||
---|---|---|
.. | ||
dbus-interfaces | ||
osk-layouts | ||
theme | ||
00_org.gnome.shell.gschema.override | ||
50-gnome-shell-system.xml | ||
emoji.json | ||
gnome-shell-dbus-interfaces.gresource.xml | ||
gnome-shell-disable-extensions.service | ||
gnome-shell-extension-prefs.desktop.in.in | ||
gnome-shell-osk-layouts.gresource.xml | ||
gnome-shell-overrides-migration.desktop.in | ||
gnome-shell-overrides.convert | ||
gnome-shell-theme.gresource.xml | ||
gnome-shell-wayland.service.in | ||
gnome-shell-wayland.target | ||
gnome-shell-x11.service.in | ||
gnome-shell-x11.target | ||
gnome-shell.portal | ||
meson.build | ||
org.gnome.Shell.desktop.in.in | ||
org.gnome.shell.gschema.xml.in | ||
org.gnome.Shell.PortalHelper.desktop.in.in | ||
org.gnome.Shell.PortalHelper.service.in | ||
perf-background.xml.in | ||
README.osk-layouts | ||
update-osk-layouts.sh |
Gnome-shell OSK layouts are extracted from CLDR layout definitions: https://www.unicode.org/cldr/charts/latest/keyboards/layouts/index.html Updating these involves several steps: 1) Downloading and unzipping the tarball found at: http://www.unicode.org/Public/cldr/latest/keyboards.zip This file contains XML files describing the keyboard layouts. 2) Cloning the cldr2json script at: git://repo.or.cz/cldr2json.git It will be used to convert the XML files into JSON that can be directly consumed by gnome-shell. 3) Running the script to produce the files: ./cldr2json <input-directory> <output-directory> We shall usually use the "android" folder, since that's most complete, and similar to our UI and target sizes. And the target directory must be data/osk-layouts in this repository. 4) Modify gnome-shell-osk-layouts.gresource.xml to include the files 5) Do git add on the updated/new files, and git commit. Or alternatively: 1) Run update-osk-layouts.sh 2) Do git add and git commit