diff --git a/fish@kriegcc/CHANGELOG.md b/fish@kriegcc/CHANGELOG.md index 692635f5363..5db1a7601a1 100644 --- a/fish@kriegcc/CHANGELOG.md +++ b/fish@kriegcc/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [0.2.0] - 2025-01-20 + +### Fixed + +- Fix a crash when popup menu is replaced (e.g. transition from error to normal message) while it is still open. + +### Added + +- Add an advanced settings tab to the preferences window with options to adjust animation size and margin. + ## [0.1.1] - 2024-09-11 ### Fixed diff --git a/fish@kriegcc/README.md b/fish@kriegcc/README.md index fd36999f684..51fffeafb97 100644 --- a/fish@kriegcc/README.md +++ b/fish@kriegcc/README.md @@ -87,20 +87,21 @@ The properties are: - **File**: You can change the animation here. You can select an image that is supplied with the applet or a personal image. - **Total frames in animation**: You need to specify here the number of frames of the selected image. - **Pause between frames**: You can specify here the pause in seconds between each frame in the animation. The default is 0.3 seconds, but the range is from 0.1 to 10 seconds. -- **Rotate on vertical panels**: This checkbox is used for vertical panels, and when checked, the fish will appear swimming upwards on a vertical panel. If it is not checked, it will appear the same way as on a horizontal panel. +- **Flip sideways on vertical panels**: This checkbox is used for vertical panels, and when checked, the fish will appear swimming upwards on a vertical panel. If it is not checked, it will appear the same way as on a horizontal panel. + +### Advanced Settings + +The **Advanced Settings** tab in the Preferences dialog allows further customization of the animation, such as adjusting its size and configuring margins around it within the panel. ## Known Bugs and Limitations -This Cinnamon port of the Fish applet is in early development. -If you prefer a stable and clean experience, check out the original applet for GNOME and MATE desktops. +This Cinnamon port of the Fish applet is currently under development. +For a more stable and polished experience, consider using the original applet available for GNOME and MATE desktops. ### Known Issues -- lack of tests -- missing translations -- inconsistent, ugly styles +- style issues: - message in popup might be cut or overlapped by scroll bars -- lot's of TODOs in code Please feel free to provide feedback, report problems, or support the development of this applet. diff --git a/fish@kriegcc/docs/DEVELOPMENT.md b/fish@kriegcc/docs/DEVELOPMENT.md index 5d37d411c2c..8a178e1c2cc 100644 --- a/fish@kriegcc/docs/DEVELOPMENT.md +++ b/fish@kriegcc/docs/DEVELOPMENT.md @@ -193,6 +193,31 @@ The coding guidelines are not definitive. Feel free to suggest changes or additi - If you copy code from another applet, add a comment and give credit. - Ensure that no copyright is violated and the applet's license is retained (GPL-3.0-or-later). +## Developer Options + +There is a hidden **Developer Options** section in the **Advanced Settings** tab of the Preferences dialog. This section contains options intended for debugging and development purposes. For example, it includes an option to trigger the Fool's Day easter egg without changing the system date. You can also add additional options here that should remain hidden from normal users. + +![Developer Options][advanced-settings-developer-options] + +### Enable Display of Developer Options + +The visibility of the **Developer Options** section is controlled by the `keyDeveloperOptionsEnabled` setting, which is of type `generic`. To enable it: + +1. Locate the Fish applet's configuration JSON file under: `~/.config/cinnamon/spices/fish@kriegcc` +2. Modify the `keyDeveloperOptionsEnabled` value to `true`. The updated JSON entry should look like this: + +```json +"keyDeveloperOptionsEnabled": { + "type": "generic", + "default": false, + "value": true +} +``` + +3. Close the Preferences dialog (if it is open) and reopen it. + +The next time you open the applet preferences, the **Developer Options** section will be visible in the Advanced Settings tab. + ## Troubleshooting Unhandled errors can easily lead to a crash of the Cinnamon desktop. When this happens, window decorations may disappear, and nothing may be clickable. @@ -266,3 +291,5 @@ Source code of the original Fish applet: - [GNOME](https://gitlab.gnome.org/GNOME/gnome-panel/-/tree/master/modules/fish) - [MATE](https://github.com/mate-desktop/mate-panel/tree/master/applets/fish) + +[advanced-settings-developer-options]: ./images/applet/advanced-settings-developer-options.png diff --git a/fish@kriegcc/docs/TODO.md b/fish@kriegcc/docs/TODO.md index 6ef2d74a65c..cfb43c5c6e1 100644 --- a/fish@kriegcc/docs/TODO.md +++ b/fish@kriegcc/docs/TODO.md @@ -15,10 +15,8 @@ - [ ] Display error messages directly for invalid input -- [ ] Advanced settings page in preferences window +- [] Advanced settings - - [ ] Add options for animation width and height - - [ ] Include toggle for original size display - [ ] Add option to allow change of message popup size (max-width, max-height) - [ ] Improve notifications @@ -42,3 +40,6 @@ ### Completed Tasks ✓ - [x] Scale animation image to fit in panel +- [x] Advanced settings in preferences window + - [x] Add options for animation width and height + - [x] Include toggle for original size display diff --git a/fish@kriegcc/docs/TRANSLATION.md b/fish@kriegcc/docs/TRANSLATION.md index 66d2576915c..2a052bd3143 100644 --- a/fish@kriegcc/docs/TRANSLATION.md +++ b/fish@kriegcc/docs/TRANSLATION.md @@ -17,7 +17,17 @@ However, there are some deviations (like error handling) in this applet from the ## Available Translations and Their Authors -- German (de): kriegcc (copied from mate-panel and adjusted) +- Catalan (ca): Odyssey +- German (de): kriegcc +- Spanish (es): haggen88 +- French (fr): Claudiux +- Hungarian (hu): bossbob88 +- Italian (it): Dragone2 +- Dutch (nl): qadzek + +[Generated Translation Status Table](https://github.com/linuxmint/cinnamon-spices-applets/blob/translation-status-tables/.translation-tables/tables/fish%40kriegcc.md) + +Thank you to everyone who has contributed translations to make this applet available in multiple languages. ## Translating diff --git a/fish@kriegcc/docs/images/applet/advanced-settings-developer-options.png b/fish@kriegcc/docs/images/applet/advanced-settings-developer-options.png new file mode 100644 index 00000000000..32927fc049c Binary files /dev/null and b/fish@kriegcc/docs/images/applet/advanced-settings-developer-options.png differ diff --git a/fish@kriegcc/docs/images/applet/settings-window.png b/fish@kriegcc/docs/images/applet/settings-window.png index f7b5800a2aa..72b03cb903b 100644 Binary files a/fish@kriegcc/docs/images/applet/settings-window.png and b/fish@kriegcc/docs/images/applet/settings-window.png differ diff --git a/fish@kriegcc/files/fish@kriegcc/fish-applet.js b/fish@kriegcc/files/fish@kriegcc/fish-applet.js index f0db945f8c8..474923489b2 100644 --- a/fish@kriegcc/files/fish@kriegcc/fish-applet.js +++ b/fish@kriegcc/files/fish@kriegcc/fish-applet.js @@ -3,7 +3,7 @@ /*! * This file is part of the fish@kriegcc applet project for Cinnamon desktop. * - * Copyright (C) 2024 kriegcc + * Copyright (C) 2025 kriegcc * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -64,15 +64,21 @@ __webpack_require__.d(__webpack_exports__, { main: () => (/* binding */ main) }); -;// CONCATENATED MODULE: ./src/consts/common.ts +;// ./src/consts/common.ts const UUID = "fish@kriegcc"; const KNOWN_USEFUL_PROGRAMS = ["ps", "who", "uptime", "tail"]; const FISH_APPLET_CINNAMON_SPICES_WEBSITE = "https://cinnamon-spices.linuxmint.com/applets/view/401"; const REPORT_BUGS_INSTRUCTIONS_WEBSITE = "https://github.com/linuxmint/cinnamon-spices-applets/blob/master/.github/CONTRIBUTING.md"; -;// CONCATENATED MODULE: ./src/utils/logging/Logger.ts +;// ./src/utils/logging/Logger.ts const { isError } = imports.ui.main; +function mapStringToLogLevel(logLevel) { + if (logLevel === "Info" || logLevel === "Debug" || logLevel === "Warning" || logLevel === "Error") { + return logLevel; + } + throw new Error(`Invalid log level value: ${logLevel}`); +} const DEFAULT_LOG_LEVEL = "Info"; const logLevelPriority = { Error: 1, @@ -127,10 +133,10 @@ class Logger { } const logger = new Logger(); -;// CONCATENATED MODULE: ./src/utils/logging/index.ts +;// ./src/utils/logging/index.ts -;// CONCATENATED MODULE: ./src/utils/common/common.ts +;// ./src/utils/common/common.ts const { St } = imports.gi; const { GLib } = imports.gi; @@ -165,7 +171,7 @@ function isAnimationSpeedValid(speed) { return true; } -;// CONCATENATED MODULE: ./src/utils/common/command.ts +;// ./src/utils/common/command.ts const { spawnCommandLineAsyncIO, spawnCommandLine } = imports.misc.util; function runCommandAsyncIO(command, callback, errorCallback) { spawnCommandLineAsyncIO(command, (stdout, stderr, exitCode) => { @@ -183,7 +189,7 @@ function openWebsite(url) { runCommand("xdg-open " + url); } -;// CONCATENATED MODULE: ./src/utils/common/foolsDay.ts +;// ./src/utils/common/foolsDay.ts const { spawnCommandLineAsyncIO: foolsDay_spawnCommandLineAsyncIO } = imports.misc.util; async function isFoolsDay() { @@ -259,7 +265,7 @@ function readFile(filePath) { }); } -;// CONCATENATED MODULE: ./src/utils/common/theme.ts +;// ./src/utils/common/theme.ts function getThemeAppearance(className) { const theme = getThemeNodeOfClass(className); const color = theme.get_foreground_color(); @@ -297,14 +303,88 @@ function invertColor(color) { }); return invertedColor; } +function getMargin(className) { + const themeNode = getThemeNodeOfClass(className); + const margin = themeNode.get_horizontal_padding() + + themeNode.get_border_width(imports.gi.St.Side.TOP) + + themeNode.get_border_width(imports.gi.St.Side.BOTTOM); + return margin; +} + +;// ./src/utils/common/renderOptions.ts +function mapStringToAnimationScalingMode(mode) { + if (mode === "AutoFit" || mode === "PreserveOriginal" || mode === "Custom") { + return mode; + } + throw new Error(`Invalid animation scaling mode value: ${mode}`); +} +function mapNumberToAnimationRotation(rotation) { + if (rotation === 0 || rotation === 90 || rotation === 180 || rotation === 270) { + return rotation; + } + throw new Error(`Invalid rotation value: ${rotation}`); +} +function determineRenderOptionsFromSettings(props) { + const { isInHorizontalPanel, panelHeight, scalingMode, margin, customHeight, customWidth, isPreserveAspectRatio, isFlipSidewaysOnVerticalPanel, rotation, } = props; + const adjustedRotation = isFlipSidewaysOnVerticalPanel ? getSidewaysFlippedRotation(rotation) : rotation; + const renderOptions = { + height: undefined, + width: undefined, + rotation: adjustedRotation, + }; + switch (scalingMode) { + case "AutoFit": + { + const sizeLimit = panelHeight - margin; + applyAutoFit(renderOptions, sizeLimit, isInHorizontalPanel, adjustedRotation); + } + break; + case "PreserveOriginal": + applyPreserveAnimationOriginalDimensions(renderOptions); + break; + case "Custom": + applyCustomDimensions(renderOptions, customHeight, customWidth, isPreserveAspectRatio); + break; + } + return renderOptions; +} +function getSidewaysFlippedRotation(rotation) { + switch (rotation) { + case 0: + return 90; + case 180: + return 270; + case 90: + case 270: + return rotation; + } +} +function applyAutoFit(renderOptions, limit, isInHorizontalPanel, rotation) { + const isRotatedSideways = rotation === 90 || rotation === 270; + const isHeightConstrained = (isInHorizontalPanel && !isRotatedSideways) || (!isInHorizontalPanel && isRotatedSideways); + renderOptions.height = isHeightConstrained ? limit : undefined; + renderOptions.width = isHeightConstrained ? undefined : limit; +} +function applyPreserveAnimationOriginalDimensions(renderOptions) { + renderOptions.height = undefined; + renderOptions.width = undefined; +} +function applyCustomDimensions(renderOptions, customHeight, customWidth, isPreserveAspectRatio) { + renderOptions.height = customHeight; + renderOptions.width = customWidth; + if (isPreserveAspectRatio) { + renderOptions.width = undefined; + } +} + +;// ./src/utils/common/index.ts -;// CONCATENATED MODULE: ./src/utils/common/index.ts -;// CONCATENATED MODULE: ./src/AnimatedFish/AnimatedFish.ts +;// ./src/AnimatedFish/AnimatedFish.ts @@ -324,7 +404,6 @@ const AnimatedFish = GObject.registerClass(class AnimatedFish extends AnimatedFi } update(props) { this.props = props; - this.cleanUp(); this.initAnimation(); } updateImage(imagePath) { @@ -446,7 +525,7 @@ const AnimatedFish = GObject.registerClass(class AnimatedFish extends AnimatedFi } }); -;// CONCATENATED MODULE: ./src/utils/pixbuf/image.ts +;// ./src/utils/pixbuf/image.ts const { GdkPixbuf } = imports.gi; function getFrameSizeOfSlicedImage(file, frames) { if (!Number.isInteger(frames) || frames < 0) { @@ -487,6 +566,12 @@ function getPixbufFromFileAtScale(file, width, height, preserveAspectRatio) { if (!filePath) { throw new Error(`File path is null.`); } + if (height !== -1 && height < 1) { + throw new Error(`Invalid image height value: ${height}`); + } + if (width !== -1 && width < 1) { + throw new Error(`Invalid image width value: ${width}`); + } const pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filePath, width, height, preserveAspectRatio); if (!pixbuf) { throw new Error(`Failed to load image from file: ${file}`); @@ -494,10 +579,10 @@ function getPixbufFromFileAtScale(file, width, height, preserveAspectRatio) { return pixbuf; } -;// CONCATENATED MODULE: ./src/utils/pixbuf/index.ts +;// ./src/utils/pixbuf/index.ts -;// CONCATENATED MODULE: ./src/AnimatedFish/Animation/cairo-surface/Animation.ts +;// ./src/AnimatedFish/Animation/cairo-surface/Animation.ts const { St: Animation_St, GLib: Animation_GLib, GObject: Animation_GObject, Gdk } = imports.gi; @@ -695,11 +780,11 @@ function mapAnimationRotationToPixbufRotation(rotation) { } } -;// CONCATENATED MODULE: ./src/AnimatedFish/index.ts +;// ./src/AnimatedFish/index.ts -;// CONCATENATED MODULE: ./src/PopupMenu/BasePopupMenu.ts +;// ./src/PopupMenu/BasePopupMenu.ts const { AppletPopupMenu } = imports.ui.applet; class BasePopupMenu extends AppletPopupMenu { constructor(launcher, orientation) { @@ -714,7 +799,7 @@ class BasePopupMenu extends AppletPopupMenu { } } -;// CONCATENATED MODULE: ./src/utils/translation/translation.ts +;// ./src/utils/translation/translation.ts const Gettext = imports.gettext; function _(text) { @@ -725,10 +810,10 @@ function _(text) { return Gettext.gettext(text); } -;// CONCATENATED MODULE: ./src/utils/translation/index.ts +;// ./src/utils/translation/index.ts -;// CONCATENATED MODULE: ./src/utils/icons/icons.ts +;// ./src/utils/icons/icons.ts const { St: icons_St } = imports.gi; const ErrorIcon = (iconsSize = 24) => new icons_St.Icon({ icon_name: "error", @@ -741,10 +826,10 @@ const InfoIcon = (iconsSize = 24) => new icons_St.Icon({ icon_size: iconsSize, }); -;// CONCATENATED MODULE: ./src/utils/icons/index.ts +;// ./src/utils/icons/index.ts -;// CONCATENATED MODULE: ./src/utils/notification/notification.ts +;// ./src/utils/notification/notification.ts const { MessageTray, SystemNotificationSource, Notification, Urgency } = imports.ui.messageTray; const Main = imports.ui.main; @@ -774,10 +859,10 @@ function showNotification(props) { } } -;// CONCATENATED MODULE: ./src/utils/notification/index.ts +;// ./src/utils/notification/index.ts -;// CONCATENATED MODULE: ./src/PopupMenu/ErrorPopupMenu.ts +;// ./src/PopupMenu/ErrorPopupMenu.ts @@ -892,7 +977,7 @@ class ErrorPopupMenu extends BasePopupMenu { } } -;// CONCATENATED MODULE: ./src/PopupMenu/FishMessagePopupMenu.ts +;// ./src/PopupMenu/FishMessagePopupMenu.ts @@ -1004,7 +1089,7 @@ class FishMessagePopupMenu extends BasePopupMenu { } } -;// CONCATENATED MODULE: ./src/PopupMenu/FoolsDayPopupMenu.ts +;// ./src/PopupMenu/FoolsDayPopupMenu.ts @@ -1042,7 +1127,7 @@ class FoolsDayPopupMenu extends BasePopupMenu { } } -;// CONCATENATED MODULE: ./src/PopupMenu/PopupMenuFactory.ts +;// ./src/PopupMenu/PopupMenuFactory.ts @@ -1070,14 +1155,14 @@ class PopupMenuFactory { } } -;// CONCATENATED MODULE: ./src/PopupMenu/index.ts +;// ./src/PopupMenu/index.ts -;// CONCATENATED MODULE: ./src/FishApplet/ErrorManager/FishAppletErrorManager.ts +;// ./src/FishApplet/ErrorManager/FishAppletErrorManager.ts class FishAppletErrorManager { constructor() { this.errors = {}; @@ -1116,7 +1201,7 @@ class FishAppletErrorManager { } } -;// CONCATENATED MODULE: ./src/FishApplet/FishApplet.ts +;// ./src/FishApplet/FishApplet.ts @@ -1126,7 +1211,7 @@ class FishAppletErrorManager { -const { Applet } = imports.ui.applet; +const { Applet, AllowedLayout } = imports.ui.applet; const { AppletSettings } = imports.ui.settings; const { PopupMenuManager } = imports.ui.popupMenu; const { SignalManager } = imports.misc.signalManager; @@ -1145,17 +1230,21 @@ class FishApplet extends Applet { this.orientation = orientation; this.panelHeight = panelHeight; this.instanceId = instanceId; + this.setAllowedLayout(AllowedLayout.BOTH); this.actor.add_style_class_name("fish-applet"); this.isFoolsDay = false; this.foolsDayTimeoutId = 0; this.startPeriodicFoolsDayCheck(); this.errorManager = new FishAppletErrorManager(); + this.lastCommandOutput = ""; this.bindSettings(); + this.updateLogLevel(); this.initApplet(); } on_panel_height_changed() { this.panelHeight = this._panelHeight; this.initAnimation(); + this.updateApplet(); } on_applet_removed_from_panel() { var _a; @@ -1168,8 +1257,8 @@ class FishApplet extends Applet { } on_orientation_changed(orientation) { this.orientation = orientation; - const isRotated = this.settingsObject.rotate; - this.updateRotate(isRotated); + const isFlipSidewaysOnVerticalPanel = this.settingsObject.flipSidewaysOnVerticalPanel; + this.updateFlipSidewaysOnVerticalPanel(isFlipSidewaysOnVerticalPanel); } initApplet() { const expandedPath = expandHomeDir(this.settings.getValue("keyImagePath")); @@ -1178,6 +1267,7 @@ class FishApplet extends Applet { this.signalManager = new SignalManager(); this.signalManager.connect(themeManager, "theme-set", this.changeTheme.bind(this), this); this.initAnimation(); + this.menuManager = new PopupMenuManager(this); this.updateMessagePopup(); this.updateName(); this.updateCommand(); @@ -1211,6 +1301,7 @@ class FishApplet extends Applet { launcher: this, orientation: this.orientation, name: this.settingsObject.name, + message: this.lastCommandOutput, onSpeakAgain: this.runCommand.bind(this), onClose: () => this.messagePopup.close(true), }, @@ -1249,15 +1340,12 @@ class FishApplet extends Applet { styleClassName, }; } - if (this.menuManager) { - this.menuManager.destroy(); + if (this.messagePopup) { + this.menuManager.removeMenu(this.messagePopup); + this.messagePopup.destroy(); } - this.menuManager = new PopupMenuManager(this); this.messagePopup = PopupMenuFactory.createPopupMenu(popupMenuProps); this.menuManager.addMenu(this.messagePopup); - if (popupMenuType === "FishMessage") { - this.runCommand(); - } } isTargetPopupMenuAlreadyActive(targetPopupMenuTyp) { switch (targetPopupMenuTyp) { @@ -1296,6 +1384,7 @@ class FishApplet extends Applet { if (this.messagePopup instanceof FishMessagePopupMenu) { this.messagePopup.updateMessage(message); } + this.lastCommandOutput = message; }, (error) => { this.handleError(error, "commandExecution"); }); @@ -1306,12 +1395,22 @@ class FishApplet extends Applet { this.settings.bind("keyCommand", "command", this.updateCommand.bind(this)); this.settings.bind("keyFrames", "frames", this.updateAnimationFrames.bind(this)); this.settings.bind("keyPausePerFrameInSeconds", "pausePerFrameInSeconds", this.updateAnimationPause.bind(this)); - this.settings.bind("keyRotate", "rotate", this.updateRotate.bind(this)); + this.settings.bind("keyFlipSidewaysOnVerticalPanel", "flipSidewaysOnVerticalPanel", this.updateFlipSidewaysOnVerticalPanel.bind(this)); this.settings.connect("changed::keyImagePath", () => { const newValue = this.settings.getValue("keyImagePath"); this.settingsObject.imagePath = newValue; this.updateAnimationImage(newValue); }); + this.settings.bind("keyAnimationScalingMode", "animationScalingMode", this.updateAnimationScalingMode.bind(this)); + this.settings.bind("keyAnimationAutoMargin", "autoAnimationMargin", this.updateAnimationAutoMargin.bind(this)); + this.settings.bind("keyAnimationMargin", "customAnimationMargin", this.updateAnimationMargin.bind(this)); + this.settings.bind("keyAnimationHeight", "customAnimationHeight", this.updateCustomAnimationHeight.bind(this)); + this.settings.bind("keyAnimationWidth", "customAnimationWidth", this.updateCustomAnimationWidth.bind(this)); + this.settings.bind("keyAnimationPreserveAspectRatio", "preserveAnimationAspectRatio", this.updatePreserveAnimationAspectRatio.bind(this)); + this.settings.bind("keyAnimationRotation", "animationRotation", this.updateAnimationRotation.bind(this)); + this.settings.bind("keyDeveloperOptionsEnabled", "developerOptionsEnabled"); + this.settings.bind("keyLogLevel", "logLevel", this.updateLogLevel.bind(this)); + this.settings.bind("keyForceFoolsDay", "forceFoolsDay", this.updateForceFoolsDay.bind(this)); } openCinnamonSpicesWebsite() { openWebsite(FISH_APPLET_CINNAMON_SPICES_WEBSITE); @@ -1376,55 +1475,28 @@ If you prefer not to install any additional packages, you can change the command } } determineAnimationRenderOptions() { - let isRotated = this.settingsObject.rotate; - if (isRotated && isHorizontalOriented(this.orientation)) { - isRotated = false; - } - let height = undefined; - let width = undefined; - let rotation = undefined; - const margin = this.getAppletMargin(); - const isInHorizontalPanel = isHorizontalOriented(this.orientation); - if (isInHorizontalPanel) { - if (isRotated) { - width = this.panelHeight - margin; - height = undefined; - } - else { - width = undefined; - height = this.panelHeight - margin; - } - } - else { - if (isRotated) { - width = undefined; - height = this.panelHeight - margin; - } - else { - width = this.panelHeight - margin; - height = undefined; - } - } - if (isRotated) { - rotation = 90; - } - const renderOptions = { - height, - width, - rotation, - }; - return renderOptions; + return determineRenderOptionsFromSettings({ + isInHorizontalPanel: isHorizontalOriented(this.orientation), + panelHeight: this.panelHeight, + scalingMode: mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode), + margin: this.getAppletMargin(), + customHeight: this.settingsObject.customAnimationHeight, + customWidth: this.settingsObject.customAnimationWidth, + isPreserveAspectRatio: this.settingsObject.preserveAnimationAspectRatio, + isFlipSidewaysOnVerticalPanel: this.settingsObject.flipSidewaysOnVerticalPanel, + rotation: mapNumberToAnimationRotation(this.settingsObject.animationRotation), + }); } initAnimation() { - const configuration = { - imagePath: this.settingsObject.imagePath, - frames: this.settingsObject.frames, - pausePerFrameInMs: Math.floor(this.settingsObject.pausePerFrameInSeconds * 1000), - renderOptions: this.determineAnimationRenderOptions(), - isFoolsDay: this.isFoolsDay, - }; - this.errorManager.deleteError("animation"); try { + this.errorManager.deleteError("animation"); + const configuration = { + imagePath: this.settingsObject.imagePath, + frames: this.settingsObject.frames, + pausePerFrameInMs: Math.floor(this.settingsObject.pausePerFrameInSeconds * 1000), + renderOptions: this.determineAnimationRenderOptions(), + isFoolsDay: this.isFoolsDay, + }; if (this.animatedFish === undefined) { this.animatedFish = new AnimatedFish(configuration); } @@ -1482,9 +1554,9 @@ If you prefer not to install any additional packages, you can change the command this.handleError(error, "animation"); } } - updateRotate(rotate) { - if (rotate && isHorizontalOriented(this.orientation)) { - logger.logWarning("Rotation works only when the applet is placed on a vertical panel."); + updateFlipSidewaysOnVerticalPanel(isFlipSidewaysOnVerticalPanel) { + if (isFlipSidewaysOnVerticalPanel && isHorizontalOriented(this.orientation)) { + logger.logWarning("Flip sideways option works only when the applet is placed on a vertical panel."); return; } this.errorManager.deleteError("animation"); @@ -1502,6 +1574,83 @@ If you prefer not to install any additional packages, you can change the command this.handleError(error, "animation"); } } + updateAnimationScalingMode() { + this.initAnimation(); + this.updateApplet(); + } + updateAnimationAutoMargin() { + const scalingMode = mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode); + if (scalingMode !== "AutoFit") { + logger.logDebug("Margin options only apply when the 'auto-fit' animation scaling option is enabled."); + } + else { + this.initAnimation(); + this.updateApplet(); + } + } + updateAnimationMargin() { + const scalingMode = mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode); + if (scalingMode !== "AutoFit") { + logger.logDebug("Margin options only apply when the 'auto-fit' animation scaling option is enabled."); + } + else if (this.settingsObject.autoAnimationMargin) { + logger.logDebug("The 'auto-margin' option is turned on, so the custom margin value is ignored."); + } + else { + this.initAnimation(); + this.updateApplet(); + } + } + updateCustomAnimationHeight() { + const scalingMode = mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode); + if (scalingMode !== "Custom") { + logger.logDebug("Custom height options only apply when the 'custom' animation scaling option is enabled."); + } + else { + this.initAnimation(); + this.updateApplet(); + } + } + updateCustomAnimationWidth() { + const scalingMode = mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode); + if (scalingMode !== "Custom") { + logger.logDebug("Custom width options only apply when the 'custom' animation scaling option is enabled."); + } + else { + this.initAnimation(); + this.updateApplet(); + } + } + updatePreserveAnimationAspectRatio() { + const scalingMode = mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode); + if (scalingMode !== "Custom") { + logger.logDebug("The 'Preserve aspect ratio' option only apply when the 'custom' animation scaling option is used."); + } + else { + this.initAnimation(); + this.updateApplet(); + } + } + updateAnimationRotation() { + this.initAnimation(); + this.updateApplet(); + } + updateLogLevel() { + const logLevel = mapStringToLogLevel(this.settingsObject.logLevel); + logger.setLogLevel(logLevel); + } + updateForceFoolsDay() { + const isActivated = this.settingsObject.forceFoolsDay; + if (isActivated) { + this.stopPeriodicFoolsDayCheck(); + this.isFoolsDay = true; + this.initAnimation(); + this.updateApplet(); + } + else { + this.startPeriodicFoolsDayCheck(); + } + } updateApplet() { if (this.errorManager.hasErrors()) { return; @@ -1547,6 +1696,7 @@ If you prefer not to install any additional packages, you can change the command } } startPeriodicFoolsDayCheck() { + this.stopPeriodicFoolsDayCheck(); this.checkIfFoolsDay(); this.foolsDayTimeoutId = Mainloop.timeout_add(FOOLS_DAY_CHECK_INTERVAL_IN_MS, () => { this.checkIfFoolsDay(); @@ -1580,18 +1730,17 @@ If you prefer not to install any additional packages, you can change the command return getThemeAppearance(DEFAULT_APPLET_CLASS_NAME) === "Dark" ? true : false; } getAppletMargin() { - const themeNode = getThemeNodeOfClass(DEFAULT_APPLET_CLASS_NAME); - const margin = themeNode.get_horizontal_padding() + - themeNode.get_border_width(imports.gi.St.Side.TOP) + - themeNode.get_border_width(imports.gi.St.Side.BOTTOM); - return margin; + if (this.settingsObject.autoAnimationMargin) { + return getMargin(DEFAULT_APPLET_CLASS_NAME); + } + return this.settingsObject.customAnimationMargin; } } -;// CONCATENATED MODULE: ./src/FishApplet/index.ts +;// ./src/FishApplet/index.ts -;// CONCATENATED MODULE: ./src/applet.ts +;// ./src/applet.ts diff --git a/fish@kriegcc/files/fish@kriegcc/metadata.json b/fish@kriegcc/files/fish@kriegcc/metadata.json index 21877a81742..7b203d6037d 100644 --- a/fish@kriegcc/files/fish@kriegcc/metadata.json +++ b/fish@kriegcc/files/fish@kriegcc/metadata.json @@ -2,6 +2,6 @@ "uuid": "fish@kriegcc", "name": "Fish", "description": "Displays a small fish in your panel and does nothing useful whatsoever beyond that.", - "version": "0.1.1", + "version": "0.2.0", "max-instances": "-1" } \ No newline at end of file diff --git a/fish@kriegcc/files/fish@kriegcc/po/ca.po b/fish@kriegcc/files/fish@kriegcc/po/ca.po index 9c0e2b49c44..d41181dbce3 100644 --- a/fish@kriegcc/files/fish@kriegcc/po/ca.po +++ b/fish@kriegcc/files/fish@kriegcc/po/ca.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: fish@kriegcc 0.1.1\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-11 17:44+0200\n" +"POT-Creation-Date: 2025-01-20 18:32+0100\n" "PO-Revision-Date: \n" "Last-Translator: Odyssey \n" "Language-Team: \n" @@ -18,69 +18,69 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" -#. fish-applet.js:753 +#. fish-applet.js:838 msgid "Fish Applet" msgstr "Miniaplicació del Peix" -#. fish-applet.js:810 +#. fish-applet.js:895 msgid "There's something fishy going on here:" msgstr "Està passant quelcom sospitós aquí:" -#. fish-applet.js:851 +#. fish-applet.js:936 msgid "Copy Error Messages" msgstr "Copiar els missatges d'error" -#. fish-applet.js:854 +#. fish-applet.js:939 msgid "Copy Error Message" msgstr "Copiar el missatge d'error" -#. fish-applet.js:870 fish-applet.js:1360 +#. fish-applet.js:955 fish-applet.js:1459 msgid "Open Preferences" msgstr "Obrir les preferències" -#. fish-applet.js:882 +#. fish-applet.js:967 msgid "Errors copied to the clipboard" msgstr "Errors copiats al porta-papers" -#. fish-applet.js:885 +#. fish-applet.js:970 msgid "Error copied to the clipboard" msgstr "Error copiat al porta-papers" -#. fish-applet.js:958 +#. fish-applet.js:1043 msgid "Copy Message" msgstr "Copiar missatge" -#. fish-applet.js:970 +#. fish-applet.js:1055 msgid "Speak again" msgstr "Parla de nou" -#. fish-applet.js:975 +#. fish-applet.js:1060 msgid "Close" msgstr "Tancar" -#. fish-applet.js:995 +#. fish-applet.js:1080 #, javascript-format msgid "%s the Fish Says:" msgstr "El peix %s diu:" -#. fish-applet.js:1003 +#. fish-applet.js:1088 msgid "Message copied to the clipboard" msgstr "Missatge copiat al porta-papers" -#. fish-applet.js:1031 +#. fish-applet.js:1116 msgid "The water needs changing" msgstr "Fa falta canviar l'aigua" -#. fish-applet.js:1036 +#. fish-applet.js:1121 msgid "Look at today's date!" msgstr "Mira la data d'avui!" -#. fish-applet.js:1323 +#. fish-applet.js:1422 #, javascript-format msgid "%s the Fish, the fortune teller" msgstr "El peix %s, l'endeví" -#. fish-applet.js:1340 +#. fish-applet.js:1439 #, javascript-format msgid "" "Warning: The command appears to be something actually useful. \n" @@ -94,7 +94,7 @@ msgstr "" "Us recomanem no utilitzar %s per a res que pogués convertir la miniaplicació " "en pràctica o útil." -#. fish-applet.js:1348 +#. fish-applet.js:1447 msgid "" "Normally, the Fish's wisdom is derived from the 'fortune' command-line " "utility. \n" @@ -112,7 +112,7 @@ msgstr "" "Si preferiu no instal·lar paquets addicionals, podeu canviar l'ordre a la " "configuració de la miniaplicació." -#. fish-applet.js:1356 +#. fish-applet.js:1455 msgid "Open Documentation" msgstr "Obrir la documentació" @@ -142,6 +142,10 @@ msgstr "Mostra un peix al tauler i no fa res més que sigui útil." msgid "Preferences" msgstr "Preferències" +#. settings-schema.json->pageAdvancedSettings->title +msgid "Advanced Settings" +msgstr "" + #. settings-schema.json->pageHelp->title msgid "Help" msgstr "Ajuda" @@ -158,6 +162,25 @@ msgstr "General" msgid "Animation" msgstr "Animació" +#. settings-schema.json->sectionAdvancedAnimationSettings->title +#, fuzzy +msgid "Animation Settings" +msgstr "Animació" + +#. settings-schema.json->sectionAdvancedAnimationSettingsMargin->title +#, fuzzy +msgid "Animation Margin" +msgstr "Animació" + +#. settings- +#. schema.json->sectionAdvancedAnimationSettingsCustomDimension->title +msgid "Animation Custom Dimension" +msgstr "" + +#. settings-schema.json->sectionDeveloperOptions->title +msgid "Developer Options" +msgstr "" + #. settings-schema.json->sectionInstruction->title msgid "Manual" msgstr "Manual" @@ -237,14 +260,16 @@ msgstr "" "Utilitzeu aquesta casella per definir un espai temporal de pausa entre cada " "fotograma de l'animació." -#. settings-schema.json->keyRotate->description -msgid "Rotate on vertical panels" +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->description +#, fuzzy +msgid "Flip sideways on vertical panels" msgstr "Rotar als taulers verticals" -#. settings-schema.json->keyRotate->tooltip +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->tooltip +#, fuzzy msgid "" -"Select this option to rotate the applet image when you add the applet to a " -"vertical panel." +"Select this option to rotate the applet image sideways when you add the " +"applet to a vertical panel." msgstr "" "Seleccioneu aquesta opció per a ajustar la rotació de la imatge de la " "miniaplicació als taulers verticals." @@ -258,6 +283,147 @@ msgstr "" "miniaplicació. Podeu seleccionar una imatge proveïda per la miniaplicació o " "un fitxer personal." +#. settings-schema.json->keyAnimationScalingMode->description +msgid "Scaling Mode" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Auto-fit" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Preserve original size" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Custom" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->tooltip +msgid "Select how the animation image in the panel should be scaled." +msgstr "" + +#. settings-schema.json->keyAnimationMarginHint->description +msgid "" +"Margin options apply only when the 'auto-fit' option is enabled. For other " +"settings, margins appear if the animation is smaller than the panel." +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->description +msgid "Auto-margin" +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->tooltip +msgid "Check this to use the default margin from theme." +msgstr "" + +#. settings-schema.json->keyAnimationMargin->units +#. settings-schema.json->keyAnimationHeight->units +#. settings-schema.json->keyAnimationWidth->units +msgid "px" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->description +msgid "Margin around the animation frame" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->tooltip +#, fuzzy +msgid "" +"Use this spin box to specify the margin around the animation frame shown in " +"the panel." +msgstr "" +"Utilitzeu aquesta casella per especificar el número de fotogrames de " +"l'animació." + +#. settings-schema.json->keyAnimationHeight->description +msgid "Height" +msgstr "" + +#. settings-schema.json->keyAnimationHeight->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom height for the animation frame." +msgstr "" +"Utilitzeu aquesta casella per especificar el número de fotogrames de " +"l'animació." + +#. settings-schema.json->keyAnimationWidth->description +msgid "Width" +msgstr "" + +#. settings-schema.json->keyAnimationWidth->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom width for the animation frame." +msgstr "" +"Utilitzeu aquesta casella per especificar el número de fotogrames de " +"l'animació." + +#. settings-schema.json->keyAnimationPreserveAspectRatio->description +msgid "Preserve aspect ratio" +msgstr "" + +#. settings-schema.json->keyAnimationPreserveAspectRatio->tooltip +msgid "" +"Enable this option to maintain the original aspect ratio of the animation. " +"If enabled, the specified width will be ignored." +msgstr "" + +#. settings-schema.json->keyAnimationRotationHint->description +msgid "" +"If a rotation is selected, the image may also be flipped sideways depending " +"on the 'Flip sideways on vertical panels' option." +msgstr "" + +#. settings-schema.json->keyAnimationRotation->description +msgid "Rotation" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "0°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "90°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "180°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "270°" +msgstr "" + +#. settings-schema.json->keyLogLevel->description +msgid "Log Level" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Info" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Debug" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Warning" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Error" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->description +msgid "Force Fool's Day" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->tooltip +msgid "" +"Enforces Fool's Day mode for debugging purposes. Simulates Fool's Day (April " +"1st) without modifying the system date." +msgstr "" + #. settings-schema.json->keyInstructionsText->description msgid "" "For instructions on how to use and configure this applet, please visit the " @@ -322,8 +488,8 @@ msgid "Opens the applet's page on Cinnamon Spices website." msgstr "Obre la pàgina web de la miniaplicació a Cinnamon Spices." #. settings-schema.json->keyVersion->description -msgid "v0.1.1" -msgstr "v0.1.1" +msgid "v0.2.0" +msgstr "" #. settings-schema.json->keyLicenseText->description msgid "GPL-3.0-or-later" diff --git a/fish@kriegcc/files/fish@kriegcc/po/de.po b/fish@kriegcc/files/fish@kriegcc/po/de.po index 01c47587c8a..8fb419ab831 100644 --- a/fish@kriegcc/files/fish@kriegcc/po/de.po +++ b/fish@kriegcc/files/fish@kriegcc/po/de.po @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: fish@kriegcc 0.1.0\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-11 17:44+0200\n" -"PO-Revision-Date: 2024-09-11 17:44+0200\n" +"POT-Creation-Date: 2025-01-20 18:32+0100\n" +"PO-Revision-Date: 2025-01-20 18:32+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" @@ -18,69 +18,69 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 3.0.1\n" -#. fish-applet.js:753 +#. fish-applet.js:838 msgid "Fish Applet" msgstr "Fisch Applet" -#. fish-applet.js:810 +#. fish-applet.js:895 msgid "There's something fishy going on here:" msgstr "Hier stimmt etwas nicht:" -#. fish-applet.js:851 +#. fish-applet.js:936 msgid "Copy Error Messages" msgstr "Fehlermeldungen kopieren" -#. fish-applet.js:854 +#. fish-applet.js:939 msgid "Copy Error Message" msgstr "Fehlermeldung kopieren" -#. fish-applet.js:870 fish-applet.js:1360 +#. fish-applet.js:955 fish-applet.js:1459 msgid "Open Preferences" msgstr "Einstellungen öffnen" -#. fish-applet.js:882 +#. fish-applet.js:967 msgid "Errors copied to the clipboard" msgstr "Fehler wurden in die Zwischenablage kopiert" -#. fish-applet.js:885 +#. fish-applet.js:970 msgid "Error copied to the clipboard" msgstr "Fehler wurde in die Zwischenablage kopiert" -#. fish-applet.js:958 +#. fish-applet.js:1043 msgid "Copy Message" msgstr "Nachricht kopieren" -#. fish-applet.js:970 +#. fish-applet.js:1055 msgid "Speak again" msgstr "Erneut sprechen" -#. fish-applet.js:975 +#. fish-applet.js:1060 msgid "Close" msgstr "Schließen" -#. fish-applet.js:995 +#. fish-applet.js:1080 #, javascript-format msgid "%s the Fish Says:" msgstr "%s der Fisch, sagt:" -#. fish-applet.js:1003 +#. fish-applet.js:1088 msgid "Message copied to the clipboard" msgstr "Nachricht wurde in die Zwischenablage kopiert" -#. fish-applet.js:1031 +#. fish-applet.js:1116 msgid "The water needs changing" msgstr "Das Wasser muss gewechselt werden" -#. fish-applet.js:1036 +#. fish-applet.js:1121 msgid "Look at today's date!" msgstr "Man beachte das heutige Datum!" -#. fish-applet.js:1323 +#. fish-applet.js:1422 #, javascript-format msgid "%s the Fish, the fortune teller" msgstr "%s, der wahrsagende Fisch" -#. fish-applet.js:1340 +#. fish-applet.js:1439 #, javascript-format msgid "" "Warning: The command appears to be something actually useful. \n" @@ -95,7 +95,7 @@ msgstr "" "Wir raten davon ab, %s für irgendetwas zu nutzen, was dieses Applet " "praktisch oder gar nützlich machen könnte." -#. fish-applet.js:1348 +#. fish-applet.js:1447 msgid "" "Normally, the Fish's wisdom is derived from the 'fortune' command-line " "utility. \n" @@ -113,7 +113,7 @@ msgstr "" "Falls Sie keine weiteren Pakete installieren möchten, können Sie auch den " "Befehl in den Einstellungen des Applets ändern." -#. fish-applet.js:1356 +#. fish-applet.js:1455 msgid "Open Documentation" msgstr "Dokumentation öffnen" @@ -145,6 +145,10 @@ msgstr "" msgid "Preferences" msgstr "Einstellungen" +#. settings-schema.json->pageAdvancedSettings->title +msgid "Advanced Settings" +msgstr "Erweiterte Einstellungen" + #. settings-schema.json->pageHelp->title msgid "Help" msgstr "Hilfe" @@ -161,6 +165,23 @@ msgstr "Allgemein" msgid "Animation" msgstr "Animation" +#. settings-schema.json->sectionAdvancedAnimationSettings->title +msgid "Animation Settings" +msgstr "Animationseinstellungen" + +#. settings-schema.json->sectionAdvancedAnimationSettingsMargin->title +msgid "Animation Margin" +msgstr "Animationsrand" + +#. settings- +#. schema.json->sectionAdvancedAnimationSettingsCustomDimension->title +msgid "Animation Custom Dimension" +msgstr "Benutzerdefinierte Animationsgröße" + +#. settings-schema.json->sectionDeveloperOptions->title +msgid "Developer Options" +msgstr "Entwickleroptionen" + #. settings-schema.json->sectionInstruction->title msgid "Manual" msgstr "Anleitung" @@ -240,17 +261,17 @@ msgstr "" "Legen Sie mittels des Spin-Feldes die Pause in Sekunden zwischen jedem " "Einzelbild in der Animation fest." -#. settings-schema.json->keyRotate->description -msgid "Rotate on vertical panels" -msgstr "Auf senkrechten Leisten drehen" +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->description +msgid "Flip sideways on vertical panels" +msgstr "Auf senkrechten Leisten seitlich drehen" -#. settings-schema.json->keyRotate->tooltip +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->tooltip msgid "" -"Select this option to rotate the applet image when you add the applet to a " -"vertical panel." +"Select this option to rotate the applet image sideways when you add the " +"applet to a vertical panel." msgstr "" -"Wählen Sie diese Einstellung, um die Grafik im Applet zu drehen, falls sich " -"das Applet auf einer senkrechten Leiste befindet." +"Wählen Sie diese Einstellung, um die Grafik im Applet seitlich zu drehen, " +"falls sich das Applet auf einer senkrechten Leiste befindet." #. settings-schema.json->keyImagePath->tooltip msgid "" @@ -261,6 +282,155 @@ msgstr "" "können eines der Vorauswahlbilder auswählen, die beim Applet dabei sind, " "oder ein eigenes." +#. settings-schema.json->keyAnimationScalingMode->description +msgid "Scaling Mode" +msgstr "Skalierungsmodus" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Auto-fit" +msgstr "Automatisch anpassen" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Preserve original size" +msgstr "Originalgröße beibehalten" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Custom" +msgstr "Benutzerdefiniert" + +#. settings-schema.json->keyAnimationScalingMode->tooltip +msgid "Select how the animation image in the panel should be scaled." +msgstr "Wählen Sie, wie das Animationsbild im Panel skaliert werden soll." + +#. settings-schema.json->keyAnimationMarginHint->description +msgid "" +"Margin options apply only when the 'auto-fit' option is enabled. For other " +"settings, margins appear if the animation is smaller than the panel." +msgstr "" +"Randoptionen gelten nur, wenn die Option 'Automatisch anpassen' aktiviert " +"ist. Bei anderen Einstellungen erscheinen Ränder, wenn die Animation kleiner " +"als das Panel ist." + +#. settings-schema.json->keyAnimationAutoMargin->description +msgid "Auto-margin" +msgstr "Automatischer Rand" + +#. settings-schema.json->keyAnimationAutoMargin->tooltip +msgid "Check this to use the default margin from theme." +msgstr "" +"Aktivieren Sie diese Option, um den Standardrand des Themes zu verwenden." + +#. settings-schema.json->keyAnimationMargin->units +#. settings-schema.json->keyAnimationHeight->units +#. settings-schema.json->keyAnimationWidth->units +msgid "px" +msgstr "px" + +#. settings-schema.json->keyAnimationMargin->description +msgid "Margin around the animation frame" +msgstr "Rand um den Animationsrahmen" + +#. settings-schema.json->keyAnimationMargin->tooltip +msgid "" +"Use this spin box to specify the margin around the animation frame shown in " +"the panel." +msgstr "" +"Verwenden Sie dieses Spin-Feld, um den Rand um den im Panel angezeigten " +"Animationsrahmen festzulegen." + +#. settings-schema.json->keyAnimationHeight->description +msgid "Height" +msgstr "Höhe" + +#. settings-schema.json->keyAnimationHeight->tooltip +msgid "Use this spin box to specify a custom height for the animation frame." +msgstr "" +"Verwenden Sie dieses Spin-Feld, um eine benutzerdefinierte Höhe für das " +"Animationsbild festzulegen." + +#. settings-schema.json->keyAnimationWidth->description +msgid "Width" +msgstr "Breite" + +#. settings-schema.json->keyAnimationWidth->tooltip +msgid "Use this spin box to specify a custom width for the animation frame." +msgstr "" +"Verwenden Sie dieses Spin-Feld, um eine benutzerdefinierte Breite für das " +"Animationsbild festzulegen." + +#. settings-schema.json->keyAnimationPreserveAspectRatio->description +msgid "Preserve aspect ratio" +msgstr "Seitenverhältnis beibehalten" + +#. settings-schema.json->keyAnimationPreserveAspectRatio->tooltip +msgid "" +"Enable this option to maintain the original aspect ratio of the animation. " +"If enabled, the specified width will be ignored." +msgstr "" +"Aktivieren Sie diese Option, um das ursprüngliche Seitenverhältnis der " +"Animation beizubehalten. Wenn aktiviert, wird die angegebene Breite " +"ignoriert." + +#. settings-schema.json->keyAnimationRotationHint->description +msgid "" +"If a rotation is selected, the image may also be flipped sideways depending " +"on the 'Flip sideways on vertical panels' option." +msgstr "" +"Wenn eine Drehung ausgewählt ist, kann das Bild je nach der Option 'Auf " +"senkrechten Leisten seitlich drehen' zusätzlich seitlich gedreht werden." + +#. settings-schema.json->keyAnimationRotation->description +msgid "Rotation" +msgstr "Drehung" + +#. settings-schema.json->keyAnimationRotation->options +msgid "0°" +msgstr "0°" + +#. settings-schema.json->keyAnimationRotation->options +msgid "90°" +msgstr "90°" + +#. settings-schema.json->keyAnimationRotation->options +msgid "180°" +msgstr "180°" + +#. settings-schema.json->keyAnimationRotation->options +msgid "270°" +msgstr "270°" + +#. settings-schema.json->keyLogLevel->description +msgid "Log Level" +msgstr "Loglevel" + +#. settings-schema.json->keyLogLevel->options +msgid "Info" +msgstr "Info" + +#. settings-schema.json->keyLogLevel->options +msgid "Debug" +msgstr "Debug" + +#. settings-schema.json->keyLogLevel->options +msgid "Warning" +msgstr "Warning" + +#. settings-schema.json->keyLogLevel->options +msgid "Error" +msgstr "Error" + +#. settings-schema.json->keyForceFoolsDay->description +msgid "Force Fool's Day" +msgstr "Erzwinge den Aprilscherztag" + +#. settings-schema.json->keyForceFoolsDay->tooltip +msgid "" +"Enforces Fool's Day mode for debugging purposes. Simulates Fool's Day (April " +"1st) without modifying the system date." +msgstr "" +"Erzwingt den Aprilscherztagsmodus zu Debugging-Zwecken. Simuliert den " +"Aprilscherztag (1. April), ohne das Systemdatum zu ändern." + #. settings-schema.json->keyInstructionsText->description msgid "" "For instructions on how to use and configure this applet, please visit the " @@ -326,8 +496,8 @@ msgid "Opens the applet's page on Cinnamon Spices website." msgstr "Öffnet die Seite des Applets auf der Cinnamon Spices Website." #. settings-schema.json->keyVersion->description -msgid "v0.1.1" -msgstr "" +msgid "v0.2.0" +msgstr "v0.2.0" #. settings-schema.json->keyLicenseText->description msgid "GPL-3.0-or-later" diff --git a/fish@kriegcc/files/fish@kriegcc/po/es.po b/fish@kriegcc/files/fish@kriegcc/po/es.po index ead2f5f2ff6..24e2307f0d6 100644 --- a/fish@kriegcc/files/fish@kriegcc/po/es.po +++ b/fish@kriegcc/files/fish@kriegcc/po/es.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: fish@kriegcc 0.1.0\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-11 17:44+0200\n" +"POT-Creation-Date: 2025-01-20 18:32+0100\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -17,69 +17,69 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.4\n" -#. fish-applet.js:753 +#. fish-applet.js:838 msgid "Fish Applet" msgstr "Applet de Pez" -#. fish-applet.js:810 +#. fish-applet.js:895 msgid "There's something fishy going on here:" msgstr "Hay algo sospechoso aquí:" -#. fish-applet.js:851 +#. fish-applet.js:936 msgid "Copy Error Messages" msgstr "Copiar mensajes de error" -#. fish-applet.js:854 +#. fish-applet.js:939 msgid "Copy Error Message" msgstr "Copiar mensaje de error" -#. fish-applet.js:870 fish-applet.js:1360 +#. fish-applet.js:955 fish-applet.js:1459 msgid "Open Preferences" msgstr "Abrir Preferencias" -#. fish-applet.js:882 +#. fish-applet.js:967 msgid "Errors copied to the clipboard" msgstr "Errores copiados en el portapapeles" -#. fish-applet.js:885 +#. fish-applet.js:970 msgid "Error copied to the clipboard" msgstr "Error copiado en el portapapeles" -#. fish-applet.js:958 +#. fish-applet.js:1043 msgid "Copy Message" msgstr "Copiar mensaje" -#. fish-applet.js:970 +#. fish-applet.js:1055 msgid "Speak again" msgstr "Habla de nuevo" -#. fish-applet.js:975 +#. fish-applet.js:1060 msgid "Close" msgstr "Cerrar" -#. fish-applet.js:995 +#. fish-applet.js:1080 #, javascript-format msgid "%s the Fish Says:" msgstr "%s el Pez Dice:" -#. fish-applet.js:1003 +#. fish-applet.js:1088 msgid "Message copied to the clipboard" msgstr "Mensaje copiado en el portapapeles" -#. fish-applet.js:1031 +#. fish-applet.js:1116 msgid "The water needs changing" msgstr "Hay que cambiar el agua" -#. fish-applet.js:1036 +#. fish-applet.js:1121 msgid "Look at today's date!" msgstr "¡Mira la fecha de hoy!" -#. fish-applet.js:1323 +#. fish-applet.js:1422 #, javascript-format msgid "%s the Fish, the fortune teller" msgstr "%s el Pez, el adivino" -#. fish-applet.js:1340 +#. fish-applet.js:1439 #, javascript-format msgid "" "Warning: The command appears to be something actually useful. \n" @@ -92,7 +92,7 @@ msgstr "" "Le recomendamos encarecidamente que no utilice %s para nada que pueda hacer " "que el applet sea \"práctico\" o útil." -#. fish-applet.js:1348 +#. fish-applet.js:1447 msgid "" "Normally, the Fish's wisdom is derived from the 'fortune' command-line " "utility. \n" @@ -112,7 +112,7 @@ msgstr "" "Si prefiere no instalar ningún paquete adicional, puede cambiar el comando " "en la configuración del applet." -#. fish-applet.js:1356 +#. fish-applet.js:1455 msgid "Open Documentation" msgstr "Abrir documentación" @@ -143,6 +143,10 @@ msgstr "" msgid "Preferences" msgstr "Preferencias" +#. settings-schema.json->pageAdvancedSettings->title +msgid "Advanced Settings" +msgstr "" + #. settings-schema.json->pageHelp->title msgid "Help" msgstr "Ayuda" @@ -159,6 +163,25 @@ msgstr "General" msgid "Animation" msgstr "Animación" +#. settings-schema.json->sectionAdvancedAnimationSettings->title +#, fuzzy +msgid "Animation Settings" +msgstr "Animación" + +#. settings-schema.json->sectionAdvancedAnimationSettingsMargin->title +#, fuzzy +msgid "Animation Margin" +msgstr "Animación" + +#. settings- +#. schema.json->sectionAdvancedAnimationSettingsCustomDimension->title +msgid "Animation Custom Dimension" +msgstr "" + +#. settings-schema.json->sectionDeveloperOptions->title +msgid "Developer Options" +msgstr "" + #. settings-schema.json->sectionInstruction->title msgid "Manual" msgstr "Manual" @@ -238,14 +261,16 @@ msgstr "" "Utilice esta casilla para especificar la pausa en segundos entre cada " "fotograma de la animación." -#. settings-schema.json->keyRotate->description -msgid "Rotate on vertical panels" +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->description +#, fuzzy +msgid "Flip sideways on vertical panels" msgstr "Rotar en paneles verticales" -#. settings-schema.json->keyRotate->tooltip +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->tooltip +#, fuzzy msgid "" -"Select this option to rotate the applet image when you add the applet to a " -"vertical panel." +"Select this option to rotate the applet image sideways when you add the " +"applet to a vertical panel." msgstr "" "Seleccione esta opción para girar la imagen del applet cuando lo añada a un " "panel vertical." @@ -259,6 +284,147 @@ msgstr "" "Puede seleccionar una imagen suministrada con el applet o una imagen " "personal." +#. settings-schema.json->keyAnimationScalingMode->description +msgid "Scaling Mode" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Auto-fit" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Preserve original size" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Custom" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->tooltip +msgid "Select how the animation image in the panel should be scaled." +msgstr "" + +#. settings-schema.json->keyAnimationMarginHint->description +msgid "" +"Margin options apply only when the 'auto-fit' option is enabled. For other " +"settings, margins appear if the animation is smaller than the panel." +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->description +msgid "Auto-margin" +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->tooltip +msgid "Check this to use the default margin from theme." +msgstr "" + +#. settings-schema.json->keyAnimationMargin->units +#. settings-schema.json->keyAnimationHeight->units +#. settings-schema.json->keyAnimationWidth->units +msgid "px" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->description +msgid "Margin around the animation frame" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->tooltip +#, fuzzy +msgid "" +"Use this spin box to specify the margin around the animation frame shown in " +"the panel." +msgstr "" +"Utilice esta casilla para especificar el número de fotogramas de la " +"animación." + +#. settings-schema.json->keyAnimationHeight->description +msgid "Height" +msgstr "" + +#. settings-schema.json->keyAnimationHeight->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom height for the animation frame." +msgstr "" +"Utilice esta casilla para especificar el número de fotogramas de la " +"animación." + +#. settings-schema.json->keyAnimationWidth->description +msgid "Width" +msgstr "" + +#. settings-schema.json->keyAnimationWidth->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom width for the animation frame." +msgstr "" +"Utilice esta casilla para especificar el número de fotogramas de la " +"animación." + +#. settings-schema.json->keyAnimationPreserveAspectRatio->description +msgid "Preserve aspect ratio" +msgstr "" + +#. settings-schema.json->keyAnimationPreserveAspectRatio->tooltip +msgid "" +"Enable this option to maintain the original aspect ratio of the animation. " +"If enabled, the specified width will be ignored." +msgstr "" + +#. settings-schema.json->keyAnimationRotationHint->description +msgid "" +"If a rotation is selected, the image may also be flipped sideways depending " +"on the 'Flip sideways on vertical panels' option." +msgstr "" + +#. settings-schema.json->keyAnimationRotation->description +msgid "Rotation" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "0°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "90°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "180°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "270°" +msgstr "" + +#. settings-schema.json->keyLogLevel->description +msgid "Log Level" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Info" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Debug" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Warning" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Error" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->description +msgid "Force Fool's Day" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->tooltip +msgid "" +"Enforces Fool's Day mode for debugging purposes. Simulates Fool's Day (April " +"1st) without modifying the system date." +msgstr "" + #. settings-schema.json->keyInstructionsText->description msgid "" "For instructions on how to use and configure this applet, please visit the " @@ -324,8 +490,8 @@ msgid "Opens the applet's page on Cinnamon Spices website." msgstr "Abre la página del applet en el sitio web de las especias de Cinnamon." #. settings-schema.json->keyVersion->description -msgid "v0.1.1" -msgstr "v0.1.1" +msgid "v0.2.0" +msgstr "" #. settings-schema.json->keyLicenseText->description msgid "GPL-3.0-or-later" diff --git a/fish@kriegcc/files/fish@kriegcc/po/fish@kriegcc.pot b/fish@kriegcc/files/fish@kriegcc/po/fish@kriegcc.pot index feaa23bee16..bcbff4d845f 100644 --- a/fish@kriegcc/files/fish@kriegcc/po/fish@kriegcc.pot +++ b/fish@kriegcc/files/fish@kriegcc/po/fish@kriegcc.pot @@ -5,10 +5,10 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: fish@kriegcc 0.1.1\n" +"Project-Id-Version: fish@kriegcc 0.2.0\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-11 17:44+0200\n" +"POT-Creation-Date: 2025-01-20 18:32+0100\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -17,69 +17,69 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#. fish-applet.js:753 +#. fish-applet.js:838 msgid "Fish Applet" msgstr "" -#. fish-applet.js:810 +#. fish-applet.js:895 msgid "There's something fishy going on here:" msgstr "" -#. fish-applet.js:851 +#. fish-applet.js:936 msgid "Copy Error Messages" msgstr "" -#. fish-applet.js:854 +#. fish-applet.js:939 msgid "Copy Error Message" msgstr "" -#. fish-applet.js:870 fish-applet.js:1360 +#. fish-applet.js:955 fish-applet.js:1459 msgid "Open Preferences" msgstr "" -#. fish-applet.js:882 +#. fish-applet.js:967 msgid "Errors copied to the clipboard" msgstr "" -#. fish-applet.js:885 +#. fish-applet.js:970 msgid "Error copied to the clipboard" msgstr "" -#. fish-applet.js:958 +#. fish-applet.js:1043 msgid "Copy Message" msgstr "" -#. fish-applet.js:970 +#. fish-applet.js:1055 msgid "Speak again" msgstr "" -#. fish-applet.js:975 +#. fish-applet.js:1060 msgid "Close" msgstr "" -#. fish-applet.js:995 +#. fish-applet.js:1080 #, javascript-format msgid "%s the Fish Says:" msgstr "" -#. fish-applet.js:1003 +#. fish-applet.js:1088 msgid "Message copied to the clipboard" msgstr "" -#. fish-applet.js:1031 +#. fish-applet.js:1116 msgid "The water needs changing" msgstr "" -#. fish-applet.js:1036 +#. fish-applet.js:1121 msgid "Look at today's date!" msgstr "" -#. fish-applet.js:1323 +#. fish-applet.js:1422 #, javascript-format msgid "%s the Fish, the fortune teller" msgstr "" -#. fish-applet.js:1340 +#. fish-applet.js:1439 #, javascript-format msgid "" "Warning: The command appears to be something actually useful. \n" @@ -88,7 +88,7 @@ msgid "" "applet \"practical\" or useful." msgstr "" -#. fish-applet.js:1348 +#. fish-applet.js:1447 msgid "" "Normally, the Fish's wisdom is derived from the 'fortune' command-line " "utility. \n" @@ -99,7 +99,7 @@ msgid "" "command in the applet's settings." msgstr "" -#. fish-applet.js:1356 +#. fish-applet.js:1455 msgid "Open Documentation" msgstr "" @@ -129,6 +129,10 @@ msgstr "" msgid "Preferences" msgstr "" +#. settings-schema.json->pageAdvancedSettings->title +msgid "Advanced Settings" +msgstr "" + #. settings-schema.json->pageHelp->title msgid "Help" msgstr "" @@ -145,6 +149,23 @@ msgstr "" msgid "Animation" msgstr "" +#. settings-schema.json->sectionAdvancedAnimationSettings->title +msgid "Animation Settings" +msgstr "" + +#. settings-schema.json->sectionAdvancedAnimationSettingsMargin->title +msgid "Animation Margin" +msgstr "" + +#. settings- +#. schema.json->sectionAdvancedAnimationSettingsCustomDimension->title +msgid "Animation Custom Dimension" +msgstr "" + +#. settings-schema.json->sectionDeveloperOptions->title +msgid "Developer Options" +msgstr "" + #. settings-schema.json->sectionInstruction->title msgid "Manual" msgstr "" @@ -217,14 +238,14 @@ msgid "" "animation." msgstr "" -#. settings-schema.json->keyRotate->description -msgid "Rotate on vertical panels" +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->description +msgid "Flip sideways on vertical panels" msgstr "" -#. settings-schema.json->keyRotate->tooltip +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->tooltip msgid "" -"Select this option to rotate the applet image when you add the applet to a " -"vertical panel." +"Select this option to rotate the applet image sideways when you add the " +"applet to a vertical panel." msgstr "" #. settings-schema.json->keyImagePath->tooltip @@ -233,6 +254,138 @@ msgid "" "an image that is supplied with the applet or a personal image." msgstr "" +#. settings-schema.json->keyAnimationScalingMode->description +msgid "Scaling Mode" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Auto-fit" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Preserve original size" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Custom" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->tooltip +msgid "Select how the animation image in the panel should be scaled." +msgstr "" + +#. settings-schema.json->keyAnimationMarginHint->description +msgid "" +"Margin options apply only when the 'auto-fit' option is enabled. For other " +"settings, margins appear if the animation is smaller than the panel." +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->description +msgid "Auto-margin" +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->tooltip +msgid "Check this to use the default margin from theme." +msgstr "" + +#. settings-schema.json->keyAnimationMargin->units +#. settings-schema.json->keyAnimationHeight->units +#. settings-schema.json->keyAnimationWidth->units +msgid "px" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->description +msgid "Margin around the animation frame" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->tooltip +msgid "" +"Use this spin box to specify the margin around the animation frame shown in " +"the panel." +msgstr "" + +#. settings-schema.json->keyAnimationHeight->description +msgid "Height" +msgstr "" + +#. settings-schema.json->keyAnimationHeight->tooltip +msgid "Use this spin box to specify a custom height for the animation frame." +msgstr "" + +#. settings-schema.json->keyAnimationWidth->description +msgid "Width" +msgstr "" + +#. settings-schema.json->keyAnimationWidth->tooltip +msgid "Use this spin box to specify a custom width for the animation frame." +msgstr "" + +#. settings-schema.json->keyAnimationPreserveAspectRatio->description +msgid "Preserve aspect ratio" +msgstr "" + +#. settings-schema.json->keyAnimationPreserveAspectRatio->tooltip +msgid "" +"Enable this option to maintain the original aspect ratio of the animation. " +"If enabled, the specified width will be ignored." +msgstr "" + +#. settings-schema.json->keyAnimationRotationHint->description +msgid "" +"If a rotation is selected, the image may also be flipped sideways depending " +"on the 'Flip sideways on vertical panels' option." +msgstr "" + +#. settings-schema.json->keyAnimationRotation->description +msgid "Rotation" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "0°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "90°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "180°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "270°" +msgstr "" + +#. settings-schema.json->keyLogLevel->description +msgid "Log Level" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Info" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Debug" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Warning" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Error" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->description +msgid "Force Fool's Day" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->tooltip +msgid "" +"Enforces Fool's Day mode for debugging purposes. Simulates Fool's Day (April " +"1st) without modifying the system date." +msgstr "" + #. settings-schema.json->keyInstructionsText->description msgid "" "For instructions on how to use and configure this applet, please visit the " @@ -279,7 +432,7 @@ msgid "Opens the applet's page on Cinnamon Spices website." msgstr "" #. settings-schema.json->keyVersion->description -msgid "v0.1.1" +msgid "v0.2.0" msgstr "" #. settings-schema.json->keyLicenseText->description diff --git a/fish@kriegcc/files/fish@kriegcc/po/fr.po b/fish@kriegcc/files/fish@kriegcc/po/fr.po index 912bff6338f..ecbdea8ddd2 100644 --- a/fish@kriegcc/files/fish@kriegcc/po/fr.po +++ b/fish@kriegcc/files/fish@kriegcc/po/fr.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: fish@kriegcc 0.1.1\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-11 17:44+0200\n" +"POT-Creation-Date: 2025-01-20 18:32+0100\n" "PO-Revision-Date: \n" "Last-Translator: Claudiux \n" "Language-Team: \n" @@ -18,69 +18,69 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" -#. fish-applet.js:753 +#. fish-applet.js:838 msgid "Fish Applet" msgstr "Applet Poisson" -#. fish-applet.js:810 +#. fish-applet.js:895 msgid "There's something fishy going on here:" msgstr "Il y a là quelque chose de louche :" -#. fish-applet.js:851 +#. fish-applet.js:936 msgid "Copy Error Messages" msgstr "Copier les messages d'erreur" -#. fish-applet.js:854 +#. fish-applet.js:939 msgid "Copy Error Message" msgstr "Copier le message d'erreur" -#. fish-applet.js:870 fish-applet.js:1360 +#. fish-applet.js:955 fish-applet.js:1459 msgid "Open Preferences" msgstr "Modifier les paramètres" -#. fish-applet.js:882 +#. fish-applet.js:967 msgid "Errors copied to the clipboard" msgstr "Erreurs copiées dans le presse-papiers" -#. fish-applet.js:885 +#. fish-applet.js:970 msgid "Error copied to the clipboard" msgstr "Erreur copiée dans le presse-papiers" -#. fish-applet.js:958 +#. fish-applet.js:1043 msgid "Copy Message" msgstr "Copier le message" -#. fish-applet.js:970 +#. fish-applet.js:1055 msgid "Speak again" msgstr "Dire autre chose" -#. fish-applet.js:975 +#. fish-applet.js:1060 msgid "Close" msgstr "Fermer" -#. fish-applet.js:995 +#. fish-applet.js:1080 #, javascript-format msgid "%s the Fish Says:" msgstr "%s le Poisson dit :" -#. fish-applet.js:1003 +#. fish-applet.js:1088 msgid "Message copied to the clipboard" msgstr "Message copié dans le presse-papiers" -#. fish-applet.js:1031 +#. fish-applet.js:1116 msgid "The water needs changing" msgstr "L'eau a besoin d'être changée" -#. fish-applet.js:1036 +#. fish-applet.js:1121 msgid "Look at today's date!" msgstr "Regarde la date d'aujourd'hui !" -#. fish-applet.js:1323 +#. fish-applet.js:1422 #, javascript-format msgid "%s the Fish, the fortune teller" msgstr "%s le Poisson, diseur de bonne aventure" -#. fish-applet.js:1340 +#. fish-applet.js:1439 #, javascript-format msgid "" "Warning: The command appears to be something actually useful. \n" @@ -94,7 +94,7 @@ msgstr "" "Nous vous déconseillons fortement d'utiliser %s pour tout ce qui pourrait " "rendre l'applet « pratique » ou utile." -#. fish-applet.js:1348 +#. fish-applet.js:1447 msgid "" "Normally, the Fish's wisdom is derived from the 'fortune' command-line " "utility. \n" @@ -114,7 +114,7 @@ msgstr "" "Si vous préférez ne pas installer de paquets supplémentaires, vous pouvez " "modifier la commande dans les paramètres de l'applet." -#. fish-applet.js:1356 +#. fish-applet.js:1455 msgid "Open Documentation" msgstr "Consulter la documentation" @@ -146,6 +146,10 @@ msgstr "" msgid "Preferences" msgstr "Préférences" +#. settings-schema.json->pageAdvancedSettings->title +msgid "Advanced Settings" +msgstr "" + #. settings-schema.json->pageHelp->title msgid "Help" msgstr "Aide" @@ -162,6 +166,25 @@ msgstr "Général" msgid "Animation" msgstr "Animation" +#. settings-schema.json->sectionAdvancedAnimationSettings->title +#, fuzzy +msgid "Animation Settings" +msgstr "Animation" + +#. settings-schema.json->sectionAdvancedAnimationSettingsMargin->title +#, fuzzy +msgid "Animation Margin" +msgstr "Animation" + +#. settings- +#. schema.json->sectionAdvancedAnimationSettingsCustomDimension->title +msgid "Animation Custom Dimension" +msgstr "" + +#. settings-schema.json->sectionDeveloperOptions->title +msgid "Developer Options" +msgstr "" + #. settings-schema.json->sectionInstruction->title msgid "Manual" msgstr "Manuel" @@ -239,14 +262,16 @@ msgstr "" "Utilisez ceci pour spécifier la pause en secondes entre chaque image de " "l'animation." -#. settings-schema.json->keyRotate->description -msgid "Rotate on vertical panels" +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->description +#, fuzzy +msgid "Flip sideways on vertical panels" msgstr "Pivoter sur les panneaux verticaux" -#. settings-schema.json->keyRotate->tooltip +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->tooltip +#, fuzzy msgid "" -"Select this option to rotate the applet image when you add the applet to a " -"vertical panel." +"Select this option to rotate the applet image sideways when you add the " +"applet to a vertical panel." msgstr "" "Sélectionnez cette option pour faire pivoter l'image de l'applet lorsque " "vous ajoutez l'applet à un panneau vertical." @@ -259,6 +284,141 @@ msgstr "" "Ce champ permet de sélectionner l'image à afficher dans l'applet. Vous " "pouvez sélectionner une image fournie avec l'applet ou une image personnelle." +#. settings-schema.json->keyAnimationScalingMode->description +msgid "Scaling Mode" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Auto-fit" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Preserve original size" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Custom" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->tooltip +msgid "Select how the animation image in the panel should be scaled." +msgstr "" + +#. settings-schema.json->keyAnimationMarginHint->description +msgid "" +"Margin options apply only when the 'auto-fit' option is enabled. For other " +"settings, margins appear if the animation is smaller than the panel." +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->description +msgid "Auto-margin" +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->tooltip +msgid "Check this to use the default margin from theme." +msgstr "" + +#. settings-schema.json->keyAnimationMargin->units +#. settings-schema.json->keyAnimationHeight->units +#. settings-schema.json->keyAnimationWidth->units +msgid "px" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->description +msgid "Margin around the animation frame" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->tooltip +#, fuzzy +msgid "" +"Use this spin box to specify the margin around the animation frame shown in " +"the panel." +msgstr "Utilisez ceci pour spécifier le nombre d'images dans l'animation." + +#. settings-schema.json->keyAnimationHeight->description +msgid "Height" +msgstr "" + +#. settings-schema.json->keyAnimationHeight->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom height for the animation frame." +msgstr "Utilisez ceci pour spécifier le nombre d'images dans l'animation." + +#. settings-schema.json->keyAnimationWidth->description +msgid "Width" +msgstr "" + +#. settings-schema.json->keyAnimationWidth->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom width for the animation frame." +msgstr "Utilisez ceci pour spécifier le nombre d'images dans l'animation." + +#. settings-schema.json->keyAnimationPreserveAspectRatio->description +msgid "Preserve aspect ratio" +msgstr "" + +#. settings-schema.json->keyAnimationPreserveAspectRatio->tooltip +msgid "" +"Enable this option to maintain the original aspect ratio of the animation. " +"If enabled, the specified width will be ignored." +msgstr "" + +#. settings-schema.json->keyAnimationRotationHint->description +msgid "" +"If a rotation is selected, the image may also be flipped sideways depending " +"on the 'Flip sideways on vertical panels' option." +msgstr "" + +#. settings-schema.json->keyAnimationRotation->description +msgid "Rotation" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "0°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "90°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "180°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "270°" +msgstr "" + +#. settings-schema.json->keyLogLevel->description +msgid "Log Level" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Info" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Debug" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Warning" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Error" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->description +msgid "Force Fool's Day" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->tooltip +msgid "" +"Enforces Fool's Day mode for debugging purposes. Simulates Fool's Day (April " +"1st) without modifying the system date." +msgstr "" + #. settings-schema.json->keyInstructionsText->description msgid "" "For instructions on how to use and configure this applet, please visit the " @@ -325,8 +485,8 @@ msgid "Opens the applet's page on Cinnamon Spices website." msgstr "Ouvre la page de l'applet sur le site web des Cinnamon Spices." #. settings-schema.json->keyVersion->description -msgid "v0.1.1" -msgstr "v0.1.1" +msgid "v0.2.0" +msgstr "" #. settings-schema.json->keyLicenseText->description msgid "GPL-3.0-or-later" diff --git a/fish@kriegcc/files/fish@kriegcc/po/hu.po b/fish@kriegcc/files/fish@kriegcc/po/hu.po index 0ba73ae1d25..5a0ab7610f1 100644 --- a/fish@kriegcc/files/fish@kriegcc/po/hu.po +++ b/fish@kriegcc/files/fish@kriegcc/po/hu.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: fish@kriegcc 0.1.1\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-11 17:44+0200\n" +"POT-Creation-Date: 2025-01-20 18:32+0100\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,69 +18,69 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" -#. fish-applet.js:753 +#. fish-applet.js:838 msgid "Fish Applet" msgstr "Hal kisalkalmazás" -#. fish-applet.js:810 +#. fish-applet.js:895 msgid "There's something fishy going on here:" msgstr "Itt valami fura dolog folyik:" -#. fish-applet.js:851 +#. fish-applet.js:936 msgid "Copy Error Messages" msgstr "Hibaüzenetek másolása" -#. fish-applet.js:854 +#. fish-applet.js:939 msgid "Copy Error Message" msgstr "Hibaüzenet másolása" -#. fish-applet.js:870 fish-applet.js:1360 +#. fish-applet.js:955 fish-applet.js:1459 msgid "Open Preferences" msgstr "Beállítások megnyitása" -#. fish-applet.js:882 +#. fish-applet.js:967 msgid "Errors copied to the clipboard" msgstr "A hibák a vágólapra másolva" -#. fish-applet.js:885 +#. fish-applet.js:970 msgid "Error copied to the clipboard" msgstr "A hiba a vágólapra másolva" -#. fish-applet.js:958 +#. fish-applet.js:1043 msgid "Copy Message" msgstr "Üzenet másolása" -#. fish-applet.js:970 +#. fish-applet.js:1055 msgid "Speak again" msgstr "Beszélj újra" -#. fish-applet.js:975 +#. fish-applet.js:1060 msgid "Close" msgstr "Bezár" -#. fish-applet.js:995 +#. fish-applet.js:1080 #, javascript-format msgid "%s the Fish Says:" msgstr "%s a hal azt mondja:" -#. fish-applet.js:1003 +#. fish-applet.js:1088 msgid "Message copied to the clipboard" msgstr "Az üzenet a vágólapra másolva" -#. fish-applet.js:1031 +#. fish-applet.js:1116 msgid "The water needs changing" msgstr "A vizet cserélni kell" -#. fish-applet.js:1036 +#. fish-applet.js:1121 msgid "Look at today's date!" msgstr "Nézd meg a mai dátumot!" -#. fish-applet.js:1323 +#. fish-applet.js:1422 #, javascript-format msgid "%s the Fish, the fortune teller" msgstr "%s a Hal, a jós" -#. fish-applet.js:1340 +#. fish-applet.js:1439 #, javascript-format msgid "" "Warning: The command appears to be something actually useful. \n" @@ -94,7 +94,7 @@ msgstr "" "Nyomatékosan javasoljuk, hogy ne használja a %s-t bármire, ami " "\"praktikussá\" vagy hasznossá tenné a kisalkalmazást." -#. fish-applet.js:1348 +#. fish-applet.js:1447 msgid "" "Normally, the Fish's wisdom is derived from the 'fortune' command-line " "utility. \n" @@ -112,7 +112,7 @@ msgstr "" "Ha nem szeretne további csomagokat telepíteni, módosíthatja a parancsot a " "kisaklamazás beállításaiban." -#. fish-applet.js:1356 +#. fish-applet.js:1455 msgid "Open Documentation" msgstr "Nyissa meg a Dokumentációt" @@ -143,6 +143,10 @@ msgstr "" msgid "Preferences" msgstr "Beállítások" +#. settings-schema.json->pageAdvancedSettings->title +msgid "Advanced Settings" +msgstr "" + #. settings-schema.json->pageHelp->title msgid "Help" msgstr "Súgó" @@ -159,6 +163,25 @@ msgstr "Általános" msgid "Animation" msgstr "Animáció" +#. settings-schema.json->sectionAdvancedAnimationSettings->title +#, fuzzy +msgid "Animation Settings" +msgstr "Animáció" + +#. settings-schema.json->sectionAdvancedAnimationSettingsMargin->title +#, fuzzy +msgid "Animation Margin" +msgstr "Animáció" + +#. settings- +#. schema.json->sectionAdvancedAnimationSettingsCustomDimension->title +msgid "Animation Custom Dimension" +msgstr "" + +#. settings-schema.json->sectionDeveloperOptions->title +msgid "Developer Options" +msgstr "" + #. settings-schema.json->sectionInstruction->title msgid "Manual" msgstr "Kézi" @@ -237,14 +260,16 @@ msgstr "" "Ebben a pörgős mezőben adhatja meg a szünetet másodpercben az animáció egyes " "képkockái között." -#. settings-schema.json->keyRotate->description -msgid "Rotate on vertical panels" +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->description +#, fuzzy +msgid "Flip sideways on vertical panels" msgstr "Forgatás függőleges paneleken" -#. settings-schema.json->keyRotate->tooltip +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->tooltip +#, fuzzy msgid "" -"Select this option to rotate the applet image when you add the applet to a " -"vertical panel." +"Select this option to rotate the applet image sideways when you add the " +"applet to a vertical panel." msgstr "" "Válassza ezt a lehetőséget az applet kép elforgatásához, amikor az appletet " "függőleges panelhez adja." @@ -257,6 +282,144 @@ msgstr "" "Ebben a mezőben választhatja ki az appletben megjelenítendő képet. " "Kiválaszthat egy képet, amely az applethez tartozik, vagy egy saját képet." +#. settings-schema.json->keyAnimationScalingMode->description +msgid "Scaling Mode" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Auto-fit" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Preserve original size" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Custom" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->tooltip +msgid "Select how the animation image in the panel should be scaled." +msgstr "" + +#. settings-schema.json->keyAnimationMarginHint->description +msgid "" +"Margin options apply only when the 'auto-fit' option is enabled. For other " +"settings, margins appear if the animation is smaller than the panel." +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->description +msgid "Auto-margin" +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->tooltip +msgid "Check this to use the default margin from theme." +msgstr "" + +#. settings-schema.json->keyAnimationMargin->units +#. settings-schema.json->keyAnimationHeight->units +#. settings-schema.json->keyAnimationWidth->units +msgid "px" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->description +msgid "Margin around the animation frame" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->tooltip +#, fuzzy +msgid "" +"Use this spin box to specify the margin around the animation frame shown in " +"the panel." +msgstr "" +"Ebben a pörgetőmezőben adhatja meg az animációban szereplő képkockák számát." + +#. settings-schema.json->keyAnimationHeight->description +msgid "Height" +msgstr "" + +#. settings-schema.json->keyAnimationHeight->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom height for the animation frame." +msgstr "" +"Ebben a pörgetőmezőben adhatja meg az animációban szereplő képkockák számát." + +#. settings-schema.json->keyAnimationWidth->description +msgid "Width" +msgstr "" + +#. settings-schema.json->keyAnimationWidth->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom width for the animation frame." +msgstr "" +"Ebben a pörgetőmezőben adhatja meg az animációban szereplő képkockák számát." + +#. settings-schema.json->keyAnimationPreserveAspectRatio->description +msgid "Preserve aspect ratio" +msgstr "" + +#. settings-schema.json->keyAnimationPreserveAspectRatio->tooltip +msgid "" +"Enable this option to maintain the original aspect ratio of the animation. " +"If enabled, the specified width will be ignored." +msgstr "" + +#. settings-schema.json->keyAnimationRotationHint->description +msgid "" +"If a rotation is selected, the image may also be flipped sideways depending " +"on the 'Flip sideways on vertical panels' option." +msgstr "" + +#. settings-schema.json->keyAnimationRotation->description +msgid "Rotation" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "0°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "90°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "180°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "270°" +msgstr "" + +#. settings-schema.json->keyLogLevel->description +msgid "Log Level" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Info" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Debug" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Warning" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Error" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->description +msgid "Force Fool's Day" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->tooltip +msgid "" +"Enforces Fool's Day mode for debugging purposes. Simulates Fool's Day (April " +"1st) without modifying the system date." +msgstr "" + #. settings-schema.json->keyInstructionsText->description msgid "" "For instructions on how to use and configure this applet, please visit the " @@ -320,8 +483,8 @@ msgid "Opens the applet's page on Cinnamon Spices website." msgstr "Megnyitja a kisalkalmazás oldalát a Cinnamon Spices webhelyen." #. settings-schema.json->keyVersion->description -msgid "v0.1.1" -msgstr "v0.1.1" +msgid "v0.2.0" +msgstr "" #. settings-schema.json->keyLicenseText->description msgid "GPL-3.0-or-later" diff --git a/fish@kriegcc/files/fish@kriegcc/po/it.po b/fish@kriegcc/files/fish@kriegcc/po/it.po index 9648d57b0ec..83ccf31a49f 100644 --- a/fish@kriegcc/files/fish@kriegcc/po/it.po +++ b/fish@kriegcc/files/fish@kriegcc/po/it.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: fish@kriegcc 0.1.1\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-11 17:44+0200\n" +"POT-Creation-Date: 2025-01-20 18:32+0100\n" "PO-Revision-Date: \n" "Last-Translator: Dragone2 \n" "Language-Team: \n" @@ -18,69 +18,69 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" -#. fish-applet.js:753 +#. fish-applet.js:838 msgid "Fish Applet" msgstr "Applet Pesce" -#. fish-applet.js:810 +#. fish-applet.js:895 msgid "There's something fishy going on here:" msgstr "C'è qualcosa di strano qui:" -#. fish-applet.js:851 +#. fish-applet.js:936 msgid "Copy Error Messages" msgstr "Copia messaggi di errore" -#. fish-applet.js:854 +#. fish-applet.js:939 msgid "Copy Error Message" msgstr "Copia messaggio di errore" -#. fish-applet.js:870 fish-applet.js:1360 +#. fish-applet.js:955 fish-applet.js:1459 msgid "Open Preferences" msgstr "Apri preferenze" -#. fish-applet.js:882 +#. fish-applet.js:967 msgid "Errors copied to the clipboard" msgstr "Errori copiati negli appunti" -#. fish-applet.js:885 +#. fish-applet.js:970 msgid "Error copied to the clipboard" msgstr "Errore copiato negli appunti" -#. fish-applet.js:958 +#. fish-applet.js:1043 msgid "Copy Message" msgstr "Copia messaggio" -#. fish-applet.js:970 +#. fish-applet.js:1055 msgid "Speak again" msgstr "Parla ancora" -#. fish-applet.js:975 +#. fish-applet.js:1060 msgid "Close" msgstr "Chiudi" -#. fish-applet.js:995 +#. fish-applet.js:1080 #, javascript-format msgid "%s the Fish Says:" msgstr "%s il Pesce Dice:" -#. fish-applet.js:1003 +#. fish-applet.js:1088 msgid "Message copied to the clipboard" msgstr "Messaggio copiato negli appunti" -#. fish-applet.js:1031 +#. fish-applet.js:1116 msgid "The water needs changing" msgstr "L'acqua ha bisogno di essere cambiata" -#. fish-applet.js:1036 +#. fish-applet.js:1121 msgid "Look at today's date!" msgstr "Guarda la data odierna!" -#. fish-applet.js:1323 +#. fish-applet.js:1422 #, javascript-format msgid "%s the Fish, the fortune teller" msgstr "%s il Pesce indovino" -#. fish-applet.js:1340 +#. fish-applet.js:1439 #, javascript-format msgid "" "Warning: The command appears to be something actually useful. \n" @@ -93,7 +93,7 @@ msgstr "" "Ti sconsigliamo vivamente di usare %s per qualsiasi cosa che renderebbe " "l'applet \"pratica\" o utile." -#. fish-applet.js:1348 +#. fish-applet.js:1447 msgid "" "Normally, the Fish's wisdom is derived from the 'fortune' command-line " "utility. \n" @@ -112,7 +112,7 @@ msgstr "" "Se preferisci non installare pacchetti aggiuntivi, puoi modificare il " "comando nelle impostazioni dell'applet." -#. fish-applet.js:1356 +#. fish-applet.js:1455 msgid "Open Documentation" msgstr "Apri Documentazione" @@ -143,6 +143,10 @@ msgstr "" msgid "Preferences" msgstr "Preferenze" +#. settings-schema.json->pageAdvancedSettings->title +msgid "Advanced Settings" +msgstr "" + #. settings-schema.json->pageHelp->title msgid "Help" msgstr "Aiuto" @@ -159,6 +163,25 @@ msgstr "Generale" msgid "Animation" msgstr "Animazione" +#. settings-schema.json->sectionAdvancedAnimationSettings->title +#, fuzzy +msgid "Animation Settings" +msgstr "Animazione" + +#. settings-schema.json->sectionAdvancedAnimationSettingsMargin->title +#, fuzzy +msgid "Animation Margin" +msgstr "Animazione" + +#. settings- +#. schema.json->sectionAdvancedAnimationSettingsCustomDimension->title +msgid "Animation Custom Dimension" +msgstr "" + +#. settings-schema.json->sectionDeveloperOptions->title +msgid "Developer Options" +msgstr "" + #. settings-schema.json->sectionInstruction->title msgid "Manual" msgstr "Manuale" @@ -238,14 +261,16 @@ msgstr "" "Utilizza questa casella di selezione per specificare la pausa in secondi tra " "ciascun fotogramma dell'animazione." -#. settings-schema.json->keyRotate->description -msgid "Rotate on vertical panels" +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->description +#, fuzzy +msgid "Flip sideways on vertical panels" msgstr "Ruota sui pannelli verticali" -#. settings-schema.json->keyRotate->tooltip +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->tooltip +#, fuzzy msgid "" -"Select this option to rotate the applet image when you add the applet to a " -"vertical panel." +"Select this option to rotate the applet image sideways when you add the " +"applet to a vertical panel." msgstr "" "Seleziona questa opzione per ruotare l'immagine dell'applet quando si " "aggiunge l'applet a un pannello verticale." @@ -259,6 +284,147 @@ msgstr "" "nell'applet. È possibile selezionare un'immagine fornita con l'applet o " "un'immagine personale." +#. settings-schema.json->keyAnimationScalingMode->description +msgid "Scaling Mode" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Auto-fit" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Preserve original size" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Custom" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->tooltip +msgid "Select how the animation image in the panel should be scaled." +msgstr "" + +#. settings-schema.json->keyAnimationMarginHint->description +msgid "" +"Margin options apply only when the 'auto-fit' option is enabled. For other " +"settings, margins appear if the animation is smaller than the panel." +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->description +msgid "Auto-margin" +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->tooltip +msgid "Check this to use the default margin from theme." +msgstr "" + +#. settings-schema.json->keyAnimationMargin->units +#. settings-schema.json->keyAnimationHeight->units +#. settings-schema.json->keyAnimationWidth->units +msgid "px" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->description +msgid "Margin around the animation frame" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->tooltip +#, fuzzy +msgid "" +"Use this spin box to specify the margin around the animation frame shown in " +"the panel." +msgstr "" +"Utilizza questa casella di selezione per specificare il numero di fotogrammi " +"nell'animazione." + +#. settings-schema.json->keyAnimationHeight->description +msgid "Height" +msgstr "" + +#. settings-schema.json->keyAnimationHeight->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom height for the animation frame." +msgstr "" +"Utilizza questa casella di selezione per specificare il numero di fotogrammi " +"nell'animazione." + +#. settings-schema.json->keyAnimationWidth->description +msgid "Width" +msgstr "" + +#. settings-schema.json->keyAnimationWidth->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom width for the animation frame." +msgstr "" +"Utilizza questa casella di selezione per specificare il numero di fotogrammi " +"nell'animazione." + +#. settings-schema.json->keyAnimationPreserveAspectRatio->description +msgid "Preserve aspect ratio" +msgstr "" + +#. settings-schema.json->keyAnimationPreserveAspectRatio->tooltip +msgid "" +"Enable this option to maintain the original aspect ratio of the animation. " +"If enabled, the specified width will be ignored." +msgstr "" + +#. settings-schema.json->keyAnimationRotationHint->description +msgid "" +"If a rotation is selected, the image may also be flipped sideways depending " +"on the 'Flip sideways on vertical panels' option." +msgstr "" + +#. settings-schema.json->keyAnimationRotation->description +msgid "Rotation" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "0°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "90°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "180°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "270°" +msgstr "" + +#. settings-schema.json->keyLogLevel->description +msgid "Log Level" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Info" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Debug" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Warning" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Error" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->description +msgid "Force Fool's Day" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->tooltip +msgid "" +"Enforces Fool's Day mode for debugging purposes. Simulates Fool's Day (April " +"1st) without modifying the system date." +msgstr "" + #. settings-schema.json->keyInstructionsText->description msgid "" "For instructions on how to use and configure this applet, please visit the " @@ -322,8 +488,8 @@ msgid "Opens the applet's page on Cinnamon Spices website." msgstr "Apre la pagina dell'applet sul sito web di Cinnamon Spices." #. settings-schema.json->keyVersion->description -msgid "v0.1.1" -msgstr "v0.1.1" +msgid "v0.2.0" +msgstr "" #. settings-schema.json->keyLicenseText->description msgid "GPL-3.0-or-later" diff --git a/fish@kriegcc/files/fish@kriegcc/po/nl.po b/fish@kriegcc/files/fish@kriegcc/po/nl.po index 3c5fa1dfc21..46c9d7787d5 100644 --- a/fish@kriegcc/files/fish@kriegcc/po/nl.po +++ b/fish@kriegcc/files/fish@kriegcc/po/nl.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: fish@kriegcc 0.1.1\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-09-11 17:44+0200\n" +"POT-Creation-Date: 2025-01-20 18:32+0100\n" "PO-Revision-Date: 2024-11-28 17:43+0100\n" "Last-Translator: qadzek\n" "Language-Team: \n" @@ -16,69 +16,69 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#. fish-applet.js:753 +#. fish-applet.js:838 msgid "Fish Applet" msgstr "Vis applet" -#. fish-applet.js:810 +#. fish-applet.js:895 msgid "There's something fishy going on here:" msgstr "Er is hier iets verdachts aan de hand:" -#. fish-applet.js:851 +#. fish-applet.js:936 msgid "Copy Error Messages" msgstr "Foutmeldingen kopiëren" -#. fish-applet.js:854 +#. fish-applet.js:939 msgid "Copy Error Message" msgstr "Foutmelding kopiëren" -#. fish-applet.js:870 fish-applet.js:1360 +#. fish-applet.js:955 fish-applet.js:1459 msgid "Open Preferences" msgstr "Voorkeuren openen" -#. fish-applet.js:882 +#. fish-applet.js:967 msgid "Errors copied to the clipboard" msgstr "Fouten gekopieerd naar het klembord" -#. fish-applet.js:885 +#. fish-applet.js:970 msgid "Error copied to the clipboard" msgstr "Fout gekopieerd naar het klembord" -#. fish-applet.js:958 +#. fish-applet.js:1043 msgid "Copy Message" msgstr "Bericht kopiëren" -#. fish-applet.js:970 +#. fish-applet.js:1055 msgid "Speak again" msgstr "Nog een keer zeggen" -#. fish-applet.js:975 +#. fish-applet.js:1060 msgid "Close" msgstr "Sluiten" -#. fish-applet.js:995 +#. fish-applet.js:1080 #, javascript-format msgid "%s the Fish Says:" msgstr "%s de Vis zegt:" -#. fish-applet.js:1003 +#. fish-applet.js:1088 msgid "Message copied to the clipboard" msgstr "Bericht gekopieerd naar het klembord" -#. fish-applet.js:1031 +#. fish-applet.js:1116 msgid "The water needs changing" msgstr "Het water moet worden ververst" -#. fish-applet.js:1036 +#. fish-applet.js:1121 msgid "Look at today's date!" msgstr "Kijk naar de datum van vandaag!" -#. fish-applet.js:1323 +#. fish-applet.js:1422 #, javascript-format msgid "%s the Fish, the fortune teller" msgstr "%s de Vis, de waarzegger" -#. fish-applet.js:1340 +#. fish-applet.js:1439 #, javascript-format msgid "" "Warning: The command appears to be something actually useful. \n" @@ -91,7 +91,7 @@ msgstr "" "We raden sterk af om %s te gebruiken voor iets dat de applet \"praktisch\" " "of nuttig zou maken." -#. fish-applet.js:1348 +#. fish-applet.js:1447 msgid "" "Normally, the Fish's wisdom is derived from the 'fortune' command-line " "utility. \n" @@ -109,7 +109,7 @@ msgstr "" ". Als je liever geen extra pakketten installeert, kun je het commando in de " "instellingen van de applet aanpassen. " -#. fish-applet.js:1356 +#. fish-applet.js:1455 msgid "Open Documentation" msgstr "Documentatie openen" @@ -139,6 +139,10 @@ msgstr "Toont een kleine vis in je paneel en doet verder niets nuttigs." msgid "Preferences" msgstr "Voorkeuren" +#. settings-schema.json->pageAdvancedSettings->title +msgid "Advanced Settings" +msgstr "" + #. settings-schema.json->pageHelp->title msgid "Help" msgstr "Help" @@ -155,6 +159,25 @@ msgstr "Algemeen" msgid "Animation" msgstr "Animatie" +#. settings-schema.json->sectionAdvancedAnimationSettings->title +#, fuzzy +msgid "Animation Settings" +msgstr "Animatie" + +#. settings-schema.json->sectionAdvancedAnimationSettingsMargin->title +#, fuzzy +msgid "Animation Margin" +msgstr "Animatie" + +#. settings- +#. schema.json->sectionAdvancedAnimationSettingsCustomDimension->title +msgid "Animation Custom Dimension" +msgstr "" + +#. settings-schema.json->sectionDeveloperOptions->title +msgid "Developer Options" +msgstr "" + #. settings-schema.json->sectionInstruction->title msgid "Manual" msgstr "Handleiding" @@ -231,14 +254,16 @@ msgstr "" "Gebruik dit spinvak om de pauze in seconden tussen elk frame in de animatie " "op te geven." -#. settings-schema.json->keyRotate->description -msgid "Rotate on vertical panels" +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->description +#, fuzzy +msgid "Flip sideways on vertical panels" msgstr "Draaien op verticale panelen" -#. settings-schema.json->keyRotate->tooltip +#. settings-schema.json->keyFlipSidewaysOnVerticalPanel->tooltip +#, fuzzy msgid "" -"Select this option to rotate the applet image when you add the applet to a " -"vertical panel." +"Select this option to rotate the applet image sideways when you add the " +"applet to a vertical panel." msgstr "" "Selecteer deze optie om de appletafbeelding te draaien wanneer je de applet " "toevoegt aan een verticaal paneel." @@ -252,6 +277,141 @@ msgstr "" "weergegeven. Je kunt een afbeelding kiezen die bij de applet wordt geleverd " "of een persoonlijke afbeelding gebruiken." +#. settings-schema.json->keyAnimationScalingMode->description +msgid "Scaling Mode" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Auto-fit" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Preserve original size" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->options +msgid "Custom" +msgstr "" + +#. settings-schema.json->keyAnimationScalingMode->tooltip +msgid "Select how the animation image in the panel should be scaled." +msgstr "" + +#. settings-schema.json->keyAnimationMarginHint->description +msgid "" +"Margin options apply only when the 'auto-fit' option is enabled. For other " +"settings, margins appear if the animation is smaller than the panel." +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->description +msgid "Auto-margin" +msgstr "" + +#. settings-schema.json->keyAnimationAutoMargin->tooltip +msgid "Check this to use the default margin from theme." +msgstr "" + +#. settings-schema.json->keyAnimationMargin->units +#. settings-schema.json->keyAnimationHeight->units +#. settings-schema.json->keyAnimationWidth->units +msgid "px" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->description +msgid "Margin around the animation frame" +msgstr "" + +#. settings-schema.json->keyAnimationMargin->tooltip +#, fuzzy +msgid "" +"Use this spin box to specify the margin around the animation frame shown in " +"the panel." +msgstr "Gebruik dit spinvak om het aantal frames in de animatie op te geven." + +#. settings-schema.json->keyAnimationHeight->description +msgid "Height" +msgstr "" + +#. settings-schema.json->keyAnimationHeight->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom height for the animation frame." +msgstr "Gebruik dit spinvak om het aantal frames in de animatie op te geven." + +#. settings-schema.json->keyAnimationWidth->description +msgid "Width" +msgstr "" + +#. settings-schema.json->keyAnimationWidth->tooltip +#, fuzzy +msgid "Use this spin box to specify a custom width for the animation frame." +msgstr "Gebruik dit spinvak om het aantal frames in de animatie op te geven." + +#. settings-schema.json->keyAnimationPreserveAspectRatio->description +msgid "Preserve aspect ratio" +msgstr "" + +#. settings-schema.json->keyAnimationPreserveAspectRatio->tooltip +msgid "" +"Enable this option to maintain the original aspect ratio of the animation. " +"If enabled, the specified width will be ignored." +msgstr "" + +#. settings-schema.json->keyAnimationRotationHint->description +msgid "" +"If a rotation is selected, the image may also be flipped sideways depending " +"on the 'Flip sideways on vertical panels' option." +msgstr "" + +#. settings-schema.json->keyAnimationRotation->description +msgid "Rotation" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "0°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "90°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "180°" +msgstr "" + +#. settings-schema.json->keyAnimationRotation->options +msgid "270°" +msgstr "" + +#. settings-schema.json->keyLogLevel->description +msgid "Log Level" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Info" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Debug" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Warning" +msgstr "" + +#. settings-schema.json->keyLogLevel->options +msgid "Error" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->description +msgid "Force Fool's Day" +msgstr "" + +#. settings-schema.json->keyForceFoolsDay->tooltip +msgid "" +"Enforces Fool's Day mode for debugging purposes. Simulates Fool's Day (April " +"1st) without modifying the system date." +msgstr "" + #. settings-schema.json->keyInstructionsText->description msgid "" "For instructions on how to use and configure this applet, please visit the " @@ -317,8 +477,8 @@ msgid "Opens the applet's page on Cinnamon Spices website." msgstr "Opent de pagina van de applet op de Cinnamon Spices-website." #. settings-schema.json->keyVersion->description -msgid "v0.1.1" -msgstr "v0.1.1" +msgid "v0.2.0" +msgstr "" #. settings-schema.json->keyLicenseText->description msgid "GPL-3.0-or-later" diff --git a/fish@kriegcc/files/fish@kriegcc/settings-schema.json b/fish@kriegcc/files/fish@kriegcc/settings-schema.json index 026f7b31e69..9ae4c1e574f 100644 --- a/fish@kriegcc/files/fish@kriegcc/settings-schema.json +++ b/fish@kriegcc/files/fish@kriegcc/settings-schema.json @@ -3,6 +3,7 @@ "type": "layout", "pages": [ "pagePreferences", + "pageAdvancedSettings", "pageHelp", "pageAbout" ], @@ -14,6 +15,16 @@ "sectionAnimation" ] }, + "pageAdvancedSettings": { + "type": "page", + "title": "Advanced Settings", + "sections": [ + "sectionAdvancedAnimationSettings", + "sectionAdvancedAnimationSettingsMargin", + "sectionAdvancedAnimationSettingsCustomDimension", + "sectionDeveloperOptions" + ] + }, "pageHelp": { "type": "page", "title": "Help", @@ -48,9 +59,47 @@ "keyImagePath", "keyFrames", "keyPausePerFrameInSeconds", - "keyRotate" + "keyFlipSidewaysOnVerticalPanel" + ] + }, + "sectionAdvancedAnimationSettings": { + "type": "section", + "title": "Animation Settings", + "keys": [ + "keyAnimationScalingMode", + "keyAnimationRotationHint", + "keyAnimationRotation" ] }, + "sectionAdvancedAnimationSettingsMargin": { + "type": "section", + "title": "Animation Margin", + "keys": [ + "keyAnimationMarginHint", + "keyAnimationAutoMargin", + "keyAnimationMargin" + ], + "dependency": "keyAnimationScalingMode=AutoFit" + }, + "sectionAdvancedAnimationSettingsCustomDimension": { + "type": "section", + "title": "Animation Custom Dimension", + "keys": [ + "keyAnimationHeight", + "keyAnimationWidth", + "keyAnimationPreserveAspectRatio" + ], + "dependency": "keyAnimationScalingMode=Custom" + }, + "sectionDeveloperOptions": { + "type": "section", + "title": "Developer Options", + "keys": [ + "keyLogLevel", + "keyForceFoolsDay" + ], + "dependency": "keyDeveloperOptionsEnabled" + }, "sectionInstruction": { "type": "section", "title": "Manual", @@ -136,11 +185,11 @@ "description": "Pause per frame", "tooltip": "Use this spin box to specify the pause in seconds between each frame in the animation." }, - "keyRotate": { + "keyFlipSidewaysOnVerticalPanel": { "type": "switch", "default": false, - "description": "Rotate on vertical panels", - "tooltip": "Select this option to rotate the applet image when you add the applet to a vertical panel." + "description": "Flip sideways on vertical panels", + "tooltip": "Select this option to rotate the applet image sideways when you add the applet to a vertical panel." }, "keyImagePath": { "type": "custom", @@ -149,6 +198,100 @@ "default": "~/.local/share/cinnamon/applets/fish@kriegcc/animations/wanda.svg", "tooltip": "Use this field to select the image to display in the applet. You can select an image that is supplied with the applet or a personal image." }, + "keyAnimationScalingMode": { + "type": "radiogroup", + "default": "AutoFit", + "description": "Scaling Mode", + "options": { + "Auto-fit": "AutoFit", + "Preserve original size": "PreserveOriginal", + "Custom": "Custom" + }, + "tooltip": "Select how the animation image in the panel should be scaled." + }, + "keyAnimationMarginHint": { + "type": "label", + "description": "Margin options apply only when the 'auto-fit' option is enabled. For other settings, margins appear if the animation is smaller than the panel." + }, + "keyAnimationAutoMargin": { + "type": "switch", + "default": true, + "description": "Auto-margin", + "tooltip": "Check this to use the default margin from theme." + }, + "keyAnimationMargin": { + "type": "spinbutton", + "default": 8, + "min": 0, + "max": 100, + "step": 1, + "units": "px", + "description": "Margin around the animation frame", + "tooltip": "Use this spin box to specify the margin around the animation frame shown in the panel.", + "dependency": "!keyAnimationAutoMargin" + }, + "keyAnimationHeight": { + "type": "spinbutton", + "default": 40, + "min": 1, + "max": 480, + "step": 1, + "units": "px", + "description": "Height", + "tooltip": "Use this spin box to specify a custom height for the animation frame." + }, + "keyAnimationWidth": { + "type": "spinbutton", + "default": 40, + "min": 1, + "max": 480, + "step": 1, + "units": "px", + "description": "Width", + "tooltip": "Use this spin box to specify a custom width for the animation frame." + }, + "keyAnimationPreserveAspectRatio": { + "type": "switch", + "default": true, + "description": "Preserve aspect ratio", + "tooltip": "Enable this option to maintain the original aspect ratio of the animation. If enabled, the specified width will be ignored." + }, + "keyAnimationRotationHint": { + "type": "label", + "description": "If a rotation is selected, the image may also be flipped sideways depending on the 'Flip sideways on vertical panels' option." + }, + "keyAnimationRotation": { + "type": "combobox", + "default": 0, + "description": "Rotation", + "options": { + "0°": 0, + "90°": 90, + "180°": 180, + "270°": 270 + } + }, + "keyDeveloperOptionsEnabled": { + "type": "generic", + "default": false + }, + "keyLogLevel": { + "type": "combobox", + "default": "Info", + "description": "Log Level", + "options": { + "Info": "Info", + "Debug": "Debug", + "Warning": "Warning", + "Error": "Error" + } + }, + "keyForceFoolsDay": { + "type": "switch", + "default": false, + "description": "Force Fool's Day", + "tooltip": "Enforces Fool's Day mode for debugging purposes. Simulates Fool's Day (April 1st) without modifying the system date." + }, "keyInstructionsText": { "type": "label", "description": "For instructions on how to use and configure this applet, please visit the applet's page on the Cinnamon Spices website." @@ -175,7 +318,7 @@ }, "keyVersion": { "type": "label", - "description": "v0.1.1" + "description": "v0.2.0" }, "keyLicenseText": { "type": "label", diff --git a/fish@kriegcc/package.json b/fish@kriegcc/package.json index b4b0f0a34e6..a1e55354ba2 100644 --- a/fish@kriegcc/package.json +++ b/fish@kriegcc/package.json @@ -1,6 +1,6 @@ { "name": "fish-kriegcc", - "version": "0.1.1", + "version": "0.2.0", "description": "Displays a small fish in your panel and does nothing useful whatsoever beyond that.", "scripts": { "prebuild": "node scripts/set-version.cjs", @@ -15,16 +15,16 @@ "license": "GPL-3.0-or-later", "devDependencies": { "@ci-types/cjs": "^6.0.2-5", - "@eslint/js": "^9.8.0", - "eslint": "^9.8.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-no-relative-import-paths": "^1.5.5", - "prettier": "3.3.3", - "ts-loader": "^9.5.1", + "@eslint/js": "^9.18.0", + "eslint": "^9.18.0", + "eslint-config-prettier": "^10.0.1", + "eslint-plugin-no-relative-import-paths": "^1.6.1", + "prettier": "3.4.2", + "ts-loader": "^9.5.2", "ts-node": "^10.9.2", - "typescript": "^5.4.5", - "typescript-eslint": "^8.0.0", - "webpack": "^5.91.0", - "webpack-cli": "^5.1.4" + "typescript": "^5.7.3", + "typescript-eslint": "^8.20.0", + "webpack": "^5.97.1", + "webpack-cli": "^6.0.1" } } diff --git a/fish@kriegcc/src/AnimatedFish/AnimatedFish.ts b/fish@kriegcc/src/AnimatedFish/AnimatedFish.ts index 1e5f2fa1066..f43f82a7986 100644 --- a/fish@kriegcc/src/AnimatedFish/AnimatedFish.ts +++ b/fish@kriegcc/src/AnimatedFish/AnimatedFish.ts @@ -35,8 +35,6 @@ export const AnimatedFish = GObject.registerClass( public update(props: AnimatedFishProps): void { this.props = props - // remove old animation - this.cleanUp() // create new one this.initAnimation() } diff --git a/fish@kriegcc/src/AnimatedFish/Animation/cairo-surface/Animation.ts b/fish@kriegcc/src/AnimatedFish/Animation/cairo-surface/Animation.ts index 0ad4f022ac1..c8d502dda61 100644 --- a/fish@kriegcc/src/AnimatedFish/Animation/cairo-surface/Animation.ts +++ b/fish@kriegcc/src/AnimatedFish/Animation/cairo-surface/Animation.ts @@ -79,7 +79,7 @@ export const Animation = GObject.registerClass( // Initializes the data required for painting and box sizing, taking into account the specified rendering options (if any). // The method for reading the image into a Pixbuf (see utility function) can throw an error if the provided parameters are invalid. - // For example, an error may occur if the dimensions become negative due to excessively large margins. + // For example, an error may occur if the dimensions become negative due to excessively large margin. try { this.loadRenderData() } catch (error) { diff --git a/fish@kriegcc/src/FishApplet/ErrorManager/FishAppletErrorManager.ts b/fish@kriegcc/src/FishApplet/ErrorManager/FishAppletErrorManager.ts index a441bf3fc3e..51c741b3fd6 100644 --- a/fish@kriegcc/src/FishApplet/ErrorManager/FishAppletErrorManager.ts +++ b/fish@kriegcc/src/FishApplet/ErrorManager/FishAppletErrorManager.ts @@ -9,9 +9,7 @@ export type FishAppletError = { message: string } -type ErrorDictionary = { - [key in ErrorLocation]?: FishAppletError[] -} +type ErrorDictionary = Partial> /** * Stores errors and is used to manage the applet's state (normal / error). diff --git a/fish@kriegcc/src/FishApplet/FishApplet.ts b/fish@kriegcc/src/FishApplet/FishApplet.ts index 0d2b510b0e0..0a78f049ce5 100644 --- a/fish@kriegcc/src/FishApplet/FishApplet.ts +++ b/fish@kriegcc/src/FishApplet/FishApplet.ts @@ -1,4 +1,4 @@ -import { AnimatedFish, AnimatedFishProps, AnimationRotation, RenderOptions } from "AnimatedFish" +import { AnimatedFish, AnimatedFishProps, RenderOptions } from "AnimatedFish" import { FishMessagePopupMenu, BasePopupMenu, @@ -13,15 +13,18 @@ import { Metadata, AppletSettingsProps } from "types" import { ErrorIcon } from "utils/icons" import { + determineRenderOptionsFromSettings, expandHomeDir, + getMargin, getThemeAppearance, - getThemeNodeOfClass, isFoolsDay, isHorizontalOriented, + mapNumberToAnimationRotation, + mapStringToAnimationScalingMode, openWebsite, runCommandAsyncIO, } from "utils/common" -import { logger } from "utils/logging" +import { logger, mapStringToLogLevel } from "utils/logging" import { NotificationButton, showNotification } from "utils/notification" import { _ } from "utils/translation" @@ -29,7 +32,7 @@ import { ErrorLocation, FishAppletError, FishAppletErrorManager } from "./ErrorM import { FISH_APPLET_CINNAMON_SPICES_WEBSITE, KNOWN_USEFUL_PROGRAMS, REPORT_BUGS_INSTRUCTIONS_WEBSITE } from "consts" -const { Applet } = imports.ui.applet +const { Applet, AllowedLayout } = imports.ui.applet const { AppletSettings } = imports.ui.settings const { PopupMenuManager } = imports.ui.popupMenu const { SignalManager } = imports.misc.signalManager @@ -64,11 +67,13 @@ export class FishApplet extends Applet { private signalManager!: imports.misc.signalManager.SignalManager // popup menu - // initialized in helper function initPopupMenu() + // initialized in helper function initApplet() private menuManager!: imports.ui.popupMenu.PopupMenuManager - // either shows fortune message or error (or a special popup on fools day) + // either shows fortune message or error (or a special popup on Fool's Day) private messagePopup!: BasePopupMenu + private lastCommandOutput: string + constructor(metadata: Metadata, orientation: imports.gi.St.Side, panelHeight: number, instanceId: number) { super(orientation, panelHeight, instanceId) @@ -78,23 +83,30 @@ export class FishApplet extends Applet { this.panelHeight = panelHeight this.instanceId = instanceId + // allow applet to be also placed on vertical panel + this.setAllowedLayout(AllowedLayout.BOTH) + // add instead of set to not remove the default applet-box style this.actor.add_style_class_name("fish-applet") - // setup fools day check + // setup Fool's Day check this.isFoolsDay = false this.foolsDayTimeoutId = 0 this.startPeriodicFoolsDayCheck() this.errorManager = new FishAppletErrorManager() + this.lastCommandOutput = "" + this.bindSettings() + this.updateLogLevel() this.initApplet() } public override on_panel_height_changed(): void { this.panelHeight = this._panelHeight this.initAnimation() + this.updateApplet() } public override on_applet_removed_from_panel(): void { @@ -111,8 +123,8 @@ export class FishApplet extends Applet { public override on_orientation_changed(orientation: imports.gi.St.Side): void { this.orientation = orientation - const isRotated = this.settingsObject.rotate - this.updateRotate(isRotated) + const isFlipSidewaysOnVerticalPanel = this.settingsObject.flipSidewaysOnVerticalPanel + this.updateFlipSidewaysOnVerticalPanel(isFlipSidewaysOnVerticalPanel) } private initApplet(): void { @@ -129,8 +141,12 @@ export class FishApplet extends Applet { this.signalManager.connect(themeManager, "theme-set", this.changeTheme.bind(this), this) this.initAnimation() + + this.menuManager = new PopupMenuManager(this) this.updateMessagePopup() - this.updateName() // MessagePopup needs to be initialized before! + + // inits the tooltip + this.updateName() // TODO: the call here is to check at startup the defined command. // However the "useful command" warning is always shown then if one of it is in use. @@ -138,7 +154,7 @@ export class FishApplet extends Applet { this.updateCommand() } - // decides which popup type to set: error or "fortune" message (or fools day) + // decides which popup type to set: error or "fortune" message (or Fool's Day) private updateMessagePopup(): void { let popupMenuType: PopupMenuType @@ -173,6 +189,7 @@ export class FishApplet extends Applet { launcher: this, orientation: this.orientation, name: this.settingsObject.name, + message: this.lastCommandOutput, onSpeakAgain: this.runCommand.bind(this), onClose: () => this.messagePopup.close(true), }, @@ -215,20 +232,15 @@ export class FishApplet extends Applet { } } - // reset menu manager and create new the new popup with the defined props from above - if (this.menuManager) { - this.menuManager.destroy() + // remove old popup menu + if (this.messagePopup) { + this.menuManager.removeMenu(this.messagePopup) + this.messagePopup.destroy() } - this.menuManager = new PopupMenuManager(this) - // returns a popup menu instance with respective popup menu type (fishMessage, error, foolsday) + + // create and add the new one this.messagePopup = PopupMenuFactory.createPopupMenu(popupMenuProps) this.menuManager.addMenu(this.messagePopup) - - // for fish message popup, need to run command already once so that its result will be shown in the popup - // TODO: maybe do on applet click instead .. - if (popupMenuType === "FishMessage") { - this.runCommand() - } } private isTargetPopupMenuAlreadyActive(targetPopupMenuTyp: PopupMenuType): boolean { @@ -273,6 +285,7 @@ export class FishApplet extends Applet { if (this.messagePopup instanceof FishMessagePopupMenu) { this.messagePopup.updateMessage(message) } + this.lastCommandOutput = message }, (error) => { this.handleError(error, "commandExecution") @@ -294,7 +307,11 @@ export class FishApplet extends Applet { "pausePerFrameInSeconds", this.updateAnimationPause.bind(this), ) - this.settings.bind("keyRotate", "rotate", this.updateRotate.bind(this)) + this.settings.bind( + "keyFlipSidewaysOnVerticalPanel", + "flipSidewaysOnVerticalPanel", + this.updateFlipSidewaysOnVerticalPanel.bind(this), + ) // TODO: the line below does not work. See TODO in ImageChooser.py // this.settings.bind("keyImagePath", "imagePath", this.updateAnimationImage.bind(this)) // workaround: @@ -303,6 +320,24 @@ export class FishApplet extends Applet { this.settingsObject.imagePath = newValue this.updateAnimationImage(newValue) }) + + // advanced settings + // animation + this.settings.bind("keyAnimationScalingMode", "animationScalingMode", this.updateAnimationScalingMode.bind(this)) + this.settings.bind("keyAnimationAutoMargin", "autoAnimationMargin", this.updateAnimationAutoMargin.bind(this)) + this.settings.bind("keyAnimationMargin", "customAnimationMargin", this.updateAnimationMargin.bind(this)) + this.settings.bind("keyAnimationHeight", "customAnimationHeight", this.updateCustomAnimationHeight.bind(this)) + this.settings.bind("keyAnimationWidth", "customAnimationWidth", this.updateCustomAnimationWidth.bind(this)) + this.settings.bind( + "keyAnimationPreserveAspectRatio", + "preserveAnimationAspectRatio", + this.updatePreserveAnimationAspectRatio.bind(this), + ) + this.settings.bind("keyAnimationRotation", "animationRotation", this.updateAnimationRotation.bind(this)) + // developer options + this.settings.bind("keyDeveloperOptionsEnabled", "developerOptionsEnabled") + this.settings.bind("keyLogLevel", "logLevel", this.updateLogLevel.bind(this)) + this.settings.bind("keyForceFoolsDay", "forceFoolsDay", this.updateForceFoolsDay.bind(this)) } // ------------------------------------------------------------------------------------------------- @@ -389,65 +424,33 @@ If you prefer not to install any additional packages, you can change the command } } - // Sets the size of the animation to fit into the panel private determineAnimationRenderOptions(): RenderOptions { - let isRotated = this.settingsObject.rotate - // Guard to allow rotation only on vertical panel (as stated in setting's description). Maybe remove in future. - if (isRotated && isHorizontalOriented(this.orientation)) { - isRotated = false - } - - let height = undefined - let width = undefined - let rotation: AnimationRotation | undefined = undefined - - const margin = this.getAppletMargin() - const isInHorizontalPanel = isHorizontalOriented(this.orientation) - - if (isInHorizontalPanel) { - if (isRotated) { - width = this.panelHeight - margin - height = undefined - } else { - width = undefined - height = this.panelHeight - margin - } - } else { - // on a vertical panel - if (isRotated) { - width = undefined - height = this.panelHeight - margin - } else { - width = this.panelHeight - margin - height = undefined - } - } - - if (isRotated) { - rotation = 90 - } - - const renderOptions: RenderOptions = { - height, - width, - rotation, - } - return renderOptions + return determineRenderOptionsFromSettings({ + isInHorizontalPanel: isHorizontalOriented(this.orientation), + panelHeight: this.panelHeight, + scalingMode: mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode), + margin: this.getAppletMargin(), + customHeight: this.settingsObject.customAnimationHeight, + customWidth: this.settingsObject.customAnimationWidth, + isPreserveAspectRatio: this.settingsObject.preserveAnimationAspectRatio, + isFlipSidewaysOnVerticalPanel: this.settingsObject.flipSidewaysOnVerticalPanel, + rotation: mapNumberToAnimationRotation(this.settingsObject.animationRotation), + }) } private initAnimation(): void { - const configuration: AnimatedFishProps = { - imagePath: this.settingsObject.imagePath, - frames: this.settingsObject.frames, - pausePerFrameInMs: Math.floor(this.settingsObject.pausePerFrameInSeconds * 1000), - renderOptions: this.determineAnimationRenderOptions(), - isFoolsDay: this.isFoolsDay, - } - - // delete previous error if there were any - this.errorManager.deleteError("animation") - try { + // delete previous error if there were any + this.errorManager.deleteError("animation") + + const configuration: AnimatedFishProps = { + imagePath: this.settingsObject.imagePath, + frames: this.settingsObject.frames, + pausePerFrameInMs: Math.floor(this.settingsObject.pausePerFrameInSeconds * 1000), + renderOptions: this.determineAnimationRenderOptions(), + isFoolsDay: this.isFoolsDay, + } + if (this.animatedFish === undefined) { this.animatedFish = new AnimatedFish(configuration) } else { @@ -509,10 +512,10 @@ If you prefer not to install any additional packages, you can change the command } } - private updateRotate(rotate: boolean): void { - // Guard to allow rotation only on vertical panel (as stated in setting's description). Maybe remove in future. - if (rotate && isHorizontalOriented(this.orientation)) { - logger.logWarning("Rotation works only when the applet is placed on a vertical panel.") + private updateFlipSidewaysOnVerticalPanel(isFlipSidewaysOnVerticalPanel: boolean): void { + // Maybe remove this option in future. There is now a dedicated rotation option in advance settings. + if (isFlipSidewaysOnVerticalPanel && isHorizontalOriented(this.orientation)) { + logger.logWarning("Flip sideways option works only when the applet is placed on a vertical panel.") return } @@ -532,6 +535,105 @@ If you prefer not to install any additional packages, you can change the command } } + // ------------------------------------------------------------------------------------------------- + // Callback functions of advanced settings: + // Mostly, the changes are applied via a re-init (call of initAnimation). + // Some advanced settings depend on each other, e.g. it does not make sense to adjust the margin value when auto margin is enabled. + // The updated settings values (e.g. height, width) will be used then (inside "determineRenderOptions" method). + // Afterwards, an updateApplet is necessary to clear any possible error states (e.g. recover from invalid values) and to update the popup menu. + // TODO: Consider consolidating most functions here because they do essentially the same (init and update call). + + private updateAnimationScalingMode(): void { + this.initAnimation() + this.updateApplet() + } + + private updateAnimationAutoMargin(): void { + // This guard should not be necessary, as the option is hidden in the settings menu when auto-fit is not selected. + const scalingMode = mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode) + if (scalingMode !== "AutoFit") { + logger.logDebug("Margin options only apply when the 'auto-fit' animation scaling option is enabled.") + } else { + this.initAnimation() + this.updateApplet() + } + } + + private updateAnimationMargin(): void { + // The guards here should not be necessary as well. + const scalingMode = mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode) + if (scalingMode !== "AutoFit") { + logger.logDebug("Margin options only apply when the 'auto-fit' animation scaling option is enabled.") + } else if (this.settingsObject.autoAnimationMargin) { + // This should already be handled by the dependency option of the related spinbutton setting widget (see: settings-schema.json -> keyAnimationMargin). + logger.logDebug("The 'auto-margin' option is turned on, so the custom margin value is ignored.") + } else { + this.initAnimation() + this.updateApplet() + } + } + + private updateCustomAnimationHeight(): void { + // This guard should not be necessary, as the option is hidden in the settings menu when not applicable. + const scalingMode = mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode) + if (scalingMode !== "Custom") { + logger.logDebug("Custom height options only apply when the 'custom' animation scaling option is enabled.") + } else { + this.initAnimation() + this.updateApplet() + } + } + + private updateCustomAnimationWidth(): void { + // This guard should not be necessary, as the option is hidden in the settings menu when not applicable. + const scalingMode = mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode) + if (scalingMode !== "Custom") { + logger.logDebug("Custom width options only apply when the 'custom' animation scaling option is enabled.") + } else { + this.initAnimation() + this.updateApplet() + } + } + + private updatePreserveAnimationAspectRatio(): void { + // This guard should not be necessary, as the option is hidden in the settings menu when not applicable. + const scalingMode = mapStringToAnimationScalingMode(this.settingsObject.animationScalingMode) + if (scalingMode !== "Custom") { + logger.logDebug( + "The 'Preserve aspect ratio' option only apply when the 'custom' animation scaling option is used.", + ) + } else { + this.initAnimation() + this.updateApplet() + } + } + + private updateAnimationRotation(): void { + this.initAnimation() + this.updateApplet() + } + + // developer options + private updateLogLevel(): void { + const logLevel = mapStringToLogLevel(this.settingsObject.logLevel) + logger.setLogLevel(logLevel) + } + private updateForceFoolsDay(): void { + const isActivated = this.settingsObject.forceFoolsDay + if (isActivated) { + this.stopPeriodicFoolsDayCheck() + this.isFoolsDay = true + // need to re-init applet with Fool's Day animation and popup + this.initAnimation() + this.updateApplet() + } else { + // function will once directly do a check and re-inits the applet correctly again + this.startPeriodicFoolsDayCheck() + } + } + + // ------------------------------------------------------------------------------------------------- + // Applet is in a normal state. Show the fish. private updateApplet(): void { if (this.errorManager.hasErrors()) { @@ -577,7 +679,7 @@ If you prefer not to install any additional packages, you can change the command private async checkIfFoolsDay(): Promise { const prev = this.isFoolsDay this.isFoolsDay = await isFoolsDay() - // Fools day has just began or is now over. Need to re-init animation and popup. + // Fool's Day has just began or is now over. Need to re-init animation and popup. if (prev !== this.isFoolsDay) { if (this.isFoolsDay) { this.animatedFish?.enableIsFoolsDay() @@ -589,7 +691,9 @@ If you prefer not to install any additional packages, you can change the command } private startPeriodicFoolsDayCheck(): void { - // check immediately + // before starting a new timeout, stop previous if any + this.stopPeriodicFoolsDayCheck() + // check once immediately this.checkIfFoolsDay() // TODO: Mainloop is marked as "deprecated". What to use instead? // Use GLib functions directly (like in Animation.ts)? @@ -633,13 +737,10 @@ If you prefer not to install any additional packages, you can change the command return getThemeAppearance(DEFAULT_APPLET_CLASS_NAME) === "Dark" ? true : false } - // reads and calculate margins from active CSS stylesheet, element "applet-box" private getAppletMargin(): number { - const themeNode = getThemeNodeOfClass(DEFAULT_APPLET_CLASS_NAME) - const margin = - themeNode.get_horizontal_padding() + - themeNode.get_border_width(imports.gi.St.Side.TOP) + - themeNode.get_border_width(imports.gi.St.Side.BOTTOM) - return margin + if (this.settingsObject.autoAnimationMargin) { + return getMargin(DEFAULT_APPLET_CLASS_NAME) + } + return this.settingsObject.customAnimationMargin } } diff --git a/fish@kriegcc/src/consts/version.ts b/fish@kriegcc/src/consts/version.ts index e2a9bca46db..0cb0166df71 100644 --- a/fish@kriegcc/src/consts/version.ts +++ b/fish@kriegcc/src/consts/version.ts @@ -1,2 +1,2 @@ // This file is auto-generated by set-version.cjs -export const APPLET_VERSION = "0.1.1" +export const APPLET_VERSION = "0.2.0" diff --git a/fish@kriegcc/src/types/types.ts b/fish@kriegcc/src/types/types.ts index f451e23937f..2bf5c92873c 100644 --- a/fish@kriegcc/src/types/types.ts +++ b/fish@kriegcc/src/types/types.ts @@ -9,5 +9,18 @@ export type AppletSettingsProps = { imagePath: string frames: number pausePerFrameInSeconds: number - rotate: boolean + flipSidewaysOnVerticalPanel: boolean + // advanced settings + // animation + animationScalingMode: string + autoAnimationMargin: boolean + customAnimationMargin: number + customAnimationHeight: number + customAnimationWidth: number + preserveAnimationAspectRatio: boolean + animationRotation: number + // developer options + developerOptionsEnabled: boolean + logLevel: string + forceFoolsDay: boolean } diff --git a/fish@kriegcc/src/utils/common/index.ts b/fish@kriegcc/src/utils/common/index.ts index b7a8fc62570..463c36985a6 100644 --- a/fish@kriegcc/src/utils/common/index.ts +++ b/fish@kriegcc/src/utils/common/index.ts @@ -2,3 +2,4 @@ export * from "./common" export * from "./command" export * from "./foolsDay" export * from "./theme" +export * from "./renderOptions" diff --git a/fish@kriegcc/src/utils/common/renderOptions.ts b/fish@kriegcc/src/utils/common/renderOptions.ts new file mode 100644 index 00000000000..aa026313057 --- /dev/null +++ b/fish@kriegcc/src/utils/common/renderOptions.ts @@ -0,0 +1,152 @@ +import { AnimationRotation, RenderOptions } from "AnimatedFish" + +export type AnimationScalingMode = "AutoFit" | "PreserveOriginal" | "Custom" + +export type RenderOptionSettings = { + isInHorizontalPanel: boolean + panelHeight: number + scalingMode: AnimationScalingMode + margin: number + customHeight: number + customWidth: number + isPreserveAspectRatio: boolean + isFlipSidewaysOnVerticalPanel: boolean + rotation: AnimationRotation +} + +export function mapStringToAnimationScalingMode(mode: string): AnimationScalingMode { + if (mode === "AutoFit" || mode === "PreserveOriginal" || mode === "Custom") { + return mode + } + throw new Error(`Invalid animation scaling mode value: ${mode}`) +} + +export function mapNumberToAnimationRotation(rotation: number): AnimationRotation { + if (rotation === 0 || rotation === 90 || rotation === 180 || rotation === 270) { + return rotation + } + throw new Error(`Invalid rotation value: ${rotation}`) +} + +// Calculates the animation's render options (size and rotation) by taking all settings into account. +export function determineRenderOptionsFromSettings(props: RenderOptionSettings): RenderOptions { + const { + isInHorizontalPanel, + panelHeight, + scalingMode, + margin, + customHeight, + customWidth, + isPreserveAspectRatio, + isFlipSidewaysOnVerticalPanel, + rotation, + } = props + + const adjustedRotation = isFlipSidewaysOnVerticalPanel ? getSidewaysFlippedRotation(rotation) : rotation + // Initialize render options with default values. + const renderOptions: RenderOptions = { + height: undefined, + width: undefined, + rotation: adjustedRotation, + } + + switch (scalingMode) { + case "AutoFit": + { + // Auto-fit: + // + // - Original dimensions cannot be preserved. + // - Aspect ratio is always preserved (implicitly). + // - Custom height/width values are ignored. + // - Margins are taken into account. + // + // For vertical panels: + // - `panelHeight` represents the panel's width. + // - Behavior based on `rotation`: + // 1. If no rotation (0°) or flipped upside down (180°): + // - Set width based on `panelHeight`, leave height undefined. + // 2. If rotated sideways (90° or 270°): + // - Set width based on `panelHeight`, leave height undefined. + const sizeLimit = panelHeight - margin + applyAutoFit(renderOptions, sizeLimit, isInHorizontalPanel, adjustedRotation) + } + break + case "PreserveOriginal": + // Preserve original dimensions: + // + // - Auto-fit cannot be applied. + // - Custom height/width values are ignored. + // - Aspect ratio is always preserved (implicitly). + // - Rotation has no influence. + // + // For vertical panels: + // - No additional adjustments needed. + applyPreserveAnimationOriginalDimensions(renderOptions) + break + case "Custom": + // Use custom dimensions: + // + // - Auto-fit cannot be applied. + // - Original dimensions cannot be preserved. + // - Aspect ratio can optionally be preserved, overriding custom width values. + // + // For vertical panels: + // - Currently, no adjustments are made. However, `isPreserveAspectRatio`, + // `isInHorizontalPanel`, and `rotation` could be used to set either + // height or width to undefined in the future (similar to auto-fit option). + applyCustomDimensions(renderOptions, customHeight, customWidth, isPreserveAspectRatio) + break + } + + return renderOptions +} + +function getSidewaysFlippedRotation(rotation: AnimationRotation): AnimationRotation { + switch (rotation) { + case 0: + return 90 + case 180: + return 270 + // Already flipped sideways, no change needed + case 90: + case 270: + return rotation + } +} + +function applyAutoFit( + renderOptions: RenderOptions, + limit: number, + isInHorizontalPanel: boolean, + rotation: AnimationRotation, +): void { + const isRotatedSideways = rotation === 90 || rotation === 270 + + // Determine which dimension to set based on panel orientation and rotation. Ignore the custom dimensions and uses the provided limit instead. + const isHeightConstrained = (isInHorizontalPanel && !isRotatedSideways) || (!isInHorizontalPanel && isRotatedSideways) + + renderOptions.height = isHeightConstrained ? limit : undefined + renderOptions.width = isHeightConstrained ? undefined : limit +} + +function applyPreserveAnimationOriginalDimensions(renderOptions: RenderOptions): void { + // This is achieved by not providing any constraints on dimension. Pixbuf later will then use the original ones. + renderOptions.height = undefined + renderOptions.width = undefined +} + +function applyCustomDimensions( + renderOptions: RenderOptions, + customHeight: number, + customWidth: number, + isPreserveAspectRatio: boolean, +): void { + renderOptions.height = customHeight + renderOptions.width = customWidth + + // Ignores the provided custom width value. + if (isPreserveAspectRatio) { + // This is achieved by simply unsetting width in render options which means it is not constrained then. See: `Pixbuf.new_from_file_at_scale`. + renderOptions.width = undefined + } +} diff --git a/fish@kriegcc/src/utils/common/theme.ts b/fish@kriegcc/src/utils/common/theme.ts index 1325701929d..477caf0eada 100644 --- a/fish@kriegcc/src/utils/common/theme.ts +++ b/fish@kriegcc/src/utils/common/theme.ts @@ -67,3 +67,13 @@ export function invertColor(color: imports.gi.Clutter.Color): imports.gi.Clutter }) return invertedColor } + +// reads and calculate margin of provided element in active CSS stylesheet +export function getMargin(className: string): number { + const themeNode = getThemeNodeOfClass(className) + const margin = + themeNode.get_horizontal_padding() + + themeNode.get_border_width(imports.gi.St.Side.TOP) + + themeNode.get_border_width(imports.gi.St.Side.BOTTOM) + return margin +} diff --git a/fish@kriegcc/src/utils/logging/Logger.ts b/fish@kriegcc/src/utils/logging/Logger.ts index 69a539e4e4e..34d5e7bff10 100644 --- a/fish@kriegcc/src/utils/logging/Logger.ts +++ b/fish@kriegcc/src/utils/logging/Logger.ts @@ -3,6 +3,13 @@ const { isError } = imports.ui.main export type LogLevel = "Info" | "Debug" | "Warning" | "Error" +export function mapStringToLogLevel(logLevel: string): LogLevel { + if (logLevel === "Info" || logLevel === "Debug" || logLevel === "Warning" || logLevel === "Error") { + return logLevel + } + throw new Error(`Invalid log level value: ${logLevel}`) +} + const DEFAULT_LOG_LEVEL = "Info" const logLevelPriority: Record = { Error: 1, diff --git a/fish@kriegcc/src/utils/pixbuf/image.ts b/fish@kriegcc/src/utils/pixbuf/image.ts index 94a283d4e7c..c42e1dd1972 100644 --- a/fish@kriegcc/src/utils/pixbuf/image.ts +++ b/fish@kriegcc/src/utils/pixbuf/image.ts @@ -61,6 +61,15 @@ export function getPixbufFromFileAtScale( throw new Error(`File path is null.`) } + // The new_from_file_at_scale method does not throw an error but has an assertion: ('height > 0 || height == -1') and ('width > 0 || width == -1'). + // Therefore, check parameters in advance. + if (height !== -1 && height < 1) { + throw new Error(`Invalid image height value: ${height}`) + } + if (width !== -1 && width < 1) { + throw new Error(`Invalid image width value: ${width}`) + } + const pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filePath, width, height, preserveAspectRatio) if (!pixbuf) { throw new Error(`Failed to load image from file: ${file}`)