various fixes

This commit is contained in:
nakst 2021-09-13 10:07:02 +01:00
parent a19e0996bb
commit b66cdda741
5 changed files with 14 additions and 7 deletions

View File

@ -820,6 +820,8 @@ int ListCallback(EsElement *element, EsMessage *message) {
EsMenu *menu = EsMenuCreate(element, ES_MENU_AT_CURSOR);
EsMenuAddCommand(menu, ES_FLAGS_DEFAULT, INTERFACE_STRING(CommonClipboardCut), EsCommandByID(instance, ES_COMMAND_CUT));
EsMenuAddCommand(menu, ES_FLAGS_DEFAULT, INTERFACE_STRING(CommonClipboardCopy), EsCommandByID(instance, ES_COMMAND_COPY));
EsMenuAddSeparator(menu);
EsMenuAddCommand(menu, ES_FLAGS_DEFAULT, INTERFACE_STRING(FileManagerRenameAction), &instance->commandRename);
EsMenuShow(menu);
} else if (message->type == ES_MSG_MOUSE_RIGHT_CLICK) {
EsMenu *menu = EsMenuCreate(element, ES_MENU_AT_CURSOR);

View File

@ -1167,6 +1167,7 @@ void EsInstanceSaveComplete(EsMessage *message, bool success) {
apiInstance->startupInformation->filePathBytes, apiInstance->startupInformation->filePath);
EsAnnouncementShow(instance->window, ES_FLAGS_DEFAULT, (bounds.l + bounds.r) / 2, bounds.b, message, messageBytes);
EsHeapFree(message);
EsCommandSetDisabled(&apiInstance->commandShowInFileManager, false);
} else {
const char *errorMessage = interfaceString_FileSaveErrorUnknown;

View File

@ -1661,6 +1661,7 @@ void ApplicationInstanceRequestSave(ApplicationInstance *instance, const char *n
document.pathBytes = nameBytes;
document.readHandle = file.handle;
document.id = ++desktop.currentDocumentID;
document.referenceCount++;
*desktop.openDocuments.Put(&document.id) = document;
instance->documentID = document.id;

View File

@ -6060,7 +6060,10 @@ int UIMessageSendPropagateToAncestors(EsElement *element, EsMessage *message, Es
int response = EsMessageSend(element, message);
if (response) {
if (handler) *handler = element;
if (handler && (~element->state & UI_STATE_DESTROYING)) {
*handler = element;
}
return response;
}

View File

@ -702,15 +702,15 @@ void SettingsPageTheme(EsElement *element, SettingsPage *page) {
}
SettingsPage settingsPages[] = {
{ INTERFACE_STRING(DesktopSettingsAccessibility), ES_ICON_PREFERENCES_DESKTOP_ACCESSIBILITY, SettingsPageUnimplemented, 'A' }, // TODO.
{ INTERFACE_STRING(DesktopSettingsDateAndTime), ES_ICON_PREFERENCES_SYSTEM_TIME, SettingsPageUnimplemented, 'C' }, // TODO.
// { INTERFACE_STRING(DesktopSettingsAccessibility), ES_ICON_PREFERENCES_DESKTOP_ACCESSIBILITY, SettingsPageUnimplemented, 'A' }, // TODO.
// { INTERFACE_STRING(DesktopSettingsDateAndTime), ES_ICON_PREFERENCES_SYSTEM_TIME, SettingsPageUnimplemented, 'C' }, // TODO.
{ INTERFACE_STRING(DesktopSettingsDisplay), ES_ICON_PREFERENCES_DESKTOP_DISPLAY, SettingsPageDisplay, 'D' },
{ INTERFACE_STRING(DesktopSettingsKeyboard), ES_ICON_INPUT_KEYBOARD, SettingsPageKeyboard, 'E' },
{ INTERFACE_STRING(DesktopSettingsLocalisation), ES_ICON_PREFERENCES_DESKTOP_LOCALE, SettingsPageUnimplemented, 'F' }, // TODO.
// { INTERFACE_STRING(DesktopSettingsLocalisation), ES_ICON_PREFERENCES_DESKTOP_LOCALE, SettingsPageUnimplemented, 'F' }, // TODO.
{ INTERFACE_STRING(DesktopSettingsMouse), ES_ICON_INPUT_MOUSE, SettingsPageMouse, 'G' },
{ INTERFACE_STRING(DesktopSettingsNetwork), ES_ICON_PREFERENCES_SYSTEM_NETWORK, SettingsPageUnimplemented, 'H' }, // TODO.
{ INTERFACE_STRING(DesktopSettingsPower), ES_ICON_PREFERENCES_SYSTEM_POWER, SettingsPageUnimplemented, 'J' }, // TODO.
{ INTERFACE_STRING(DesktopSettingsSound), ES_ICON_PREFERENCES_DESKTOP_SOUND, SettingsPageUnimplemented, 'K' }, // TODO.
// { INTERFACE_STRING(DesktopSettingsNetwork), ES_ICON_PREFERENCES_SYSTEM_NETWORK, SettingsPageUnimplemented, 'H' }, // TODO.
// { INTERFACE_STRING(DesktopSettingsPower), ES_ICON_PREFERENCES_SYSTEM_POWER, SettingsPageUnimplemented, 'J' }, // TODO.
// { INTERFACE_STRING(DesktopSettingsSound), ES_ICON_PREFERENCES_DESKTOP_SOUND, SettingsPageUnimplemented, 'K' }, // TODO.
{ INTERFACE_STRING(DesktopSettingsTheme), ES_ICON_APPLICATIONS_INTERFACEDESIGN, SettingsPageTheme, 'M' },
};