UI: Rename and put Reset Recent to a menu #112853

Merged
Pablo Vazquez merged 2 commits from persun/blender:change_reset_recent into main 2023-09-25 15:16:01 +02:00
1 changed files with 11 additions and 1 deletions

View File

@ -327,6 +327,15 @@ class FILEBROWSER_PT_bookmarks_favorites(FileBrowserPanel, Panel):
layout.operator("file.bookmark_add", icon='ADD')
class FILEBROWSER_MT_bookmarks_recents_specials_menu(Menu):
persun marked this conversation as resolved Outdated

This is not actually a context menu so maybe just call it specials? FILEBROWSER_MT_bookmarks_recents_specials_menu

This is not actually a context menu so maybe just call it specials? `FILEBROWSER_MT_bookmarks_recents_specials_menu`
bl_label = "Recent Items Specials"
persun marked this conversation as resolved Outdated

Recent Items Specials, since it can also be drives or network locations that are not regular directories.

`Recent Items Specials`, since it can also be drives or network locations that are not regular directories.
def draw(self, _context):
layout = self.layout
layout.operator("file.reset_recent", icon='X', text="Clear Recent Items")
class FILEBROWSER_PT_bookmarks_recents(Panel):
bl_space_type = 'FILE_BROWSER'
bl_region_type = 'TOOLS'
@ -351,7 +360,7 @@ class FILEBROWSER_PT_bookmarks_recents(Panel):
space, "recent_folders_active", item_dyntip_propname="path", rows=1, maxrows=10)
col = row.column(align=True)
col.operator("file.reset_recent", icon='X', text="")
col.menu("FILEBROWSER_MT_bookmarks_recents_specials_menu", icon='DOWNARROW_HLT', text="")
class FILEBROWSER_PT_advanced_filter(Panel):
@ -853,6 +862,7 @@ classes = (
FILEBROWSER_PT_bookmarks_favorites,
FILEBROWSER_PT_bookmarks_system,
FILEBROWSER_PT_bookmarks_volumes,
FILEBROWSER_MT_bookmarks_recents_specials_menu,
FILEBROWSER_PT_bookmarks_recents,
FILEBROWSER_PT_advanced_filter,
FILEBROWSER_PT_directory_path,