diff --git a/carousel.js b/carousel.js index 6b0c2943..ab0f6035 100644 --- a/carousel.js +++ b/carousel.js @@ -43,11 +43,6 @@ export default class Carousel { } _create_gallery() { - Utils.randomIntervals.forEach((x) => { - let item = this._create_random_item(x.value, _(x.title)); - this.flowBox.insert(item, -1); - }); - this.imageList.forEach((image) => { let item = this._create_gallery_item(image); this.flowBox.insert(item, -1); @@ -134,27 +129,6 @@ export default class Carousel { return item; } - _create_random_item(interval, title) { - let buildable = new Gtk.Builder(); - - // grab appropriate object from UI file - buildable.add_objects_from_file(this.extensionPath + '/ui/carousel4.ui', ["flowBoxRandom"]); - - let randomLabel = buildable.get_object('randomLabel'); - randomLabel.set_text(title); - let filename = 'random'; - let applyButton = buildable.get_object('randomButton'); - - applyButton.connect('clicked', (widget) => { - this.settings.set_string('random-interval-mode', interval); - this.settings.set_boolean('random-mode-enabled', true); - this.log('gallery selected random with interval '+interval+' ('+title+')'); - }); - - let item = buildable.get_object('flowBoxRandom'); - return item; - } - _create_placeholder_item() { let buildable = new Gtk.Builder(); this.flowBox.set_max_children_per_line(1); @@ -226,4 +200,4 @@ export default class Carousel { if (this.settings.get_boolean('debug-logging')) console.log("BingWallpaper extension: " + msg); // disable to keep the noise down in journal } -}; \ No newline at end of file +}; diff --git a/locale/en/LC_MESSAGES/BingWallpaper.mo b/locale/en/LC_MESSAGES/BingWallpaper.mo new file mode 100644 index 00000000..c4708b8f Binary files /dev/null and b/locale/en/LC_MESSAGES/BingWallpaper.mo differ diff --git a/locale/en/LC_MESSAGES/BingWallpaper.po b/locale/en/LC_MESSAGES/BingWallpaper.po new file mode 100644 index 00000000..a432ef66 --- /dev/null +++ b/locale/en/LC_MESSAGES/BingWallpaper.po @@ -0,0 +1,431 @@ +# +# Wartybix <34974060+Wartybix@users.noreply.github.com>, 2024. +# +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Project-Id-Version: unnamed project\n" +"Last-Translator: Wartybix <34974060+Wartybix@users.noreply.github.com>\n" +"Language-Team: English\n" +"Language: en\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"PO-Revision-Date: 2024-11-05 13:57+0000\n" +"X-Generator: Gtranslator 46.1\n" + +#: ui/prefsadw.ui.h:1 extension.js:145 +msgid "Settings" +msgstr "" + +#: ui/prefsadw.ui.h:2 +msgid "Indicator" +msgstr "" + +#: ui/prefsadw.ui.h:3 +msgid "Hide Indicator" +msgstr "" + +#: ui/prefsadw.ui.h:4 +msgid "Whether to hide the panel indicator" +msgstr "" + +#: ui/prefsadw.ui.h:5 +msgid "Desktop notifications" +msgstr "Desktop Notifications" + +#: ui/prefsadw.ui.h:6 +msgid "Enable notifications on new images" +msgstr "" + +#: ui/prefsadw.ui.h:7 +msgid "Indicator icon" +msgstr "Indicator Icon" + +#: ui/prefsadw.ui.h:8 +msgid "Select from alternate tray icons" +msgstr "" + +#: ui/prefsadw.ui.h:9 +msgid "Download folder" +msgstr "Download Folder" + +#: ui/prefsadw.ui.h:10 +msgid "Open or change wallpaper downloads folder" +msgstr "" + +#: ui/prefsadw.ui.h:11 +msgid "Wallpaper" +msgstr "" + +#: ui/prefsadw.ui.h:12 +msgid "Set wallpaper" +msgstr "Set Wallpaper" + +#: ui/prefsadw.ui.h:13 +msgid "Whether to set wallpaper automatically" +msgstr "" + +#: ui/prefsadw.ui.h:14 +msgid "Shuffle wallpaper" +msgstr "Shuffle Wallpaper" + +#: ui/prefsadw.ui.h:15 +msgid "Randomly select wallpaper from collection" +msgstr "" + +#: ui/prefsadw.ui.h:16 +msgid "Shuffle interval" +msgstr "Shuffle Interval" + +#: ui/prefsadw.ui.h:17 +msgid "How frequently to shuffle wallpapers" +msgstr "" + +#: ui/prefsadw.ui.h:18 +msgid "Downloads" +msgstr "" + +#: ui/prefsadw.ui.h:19 +msgid "Lock screen" +msgstr "Lock Screen" + +#: ui/prefsadw.ui.h:20 +msgid "Lockscreen blur" +msgstr "Lockscreen Blur" + +#: ui/prefsadw.ui.h:21 +msgid "Dynamic lockscreen blur" +msgstr "Dynamic Lockscreen Blur" + +#: ui/prefsadw.ui.h:22 +msgid "Whether to enable dynamic blur mode on lock screen" +msgstr "" + +#: ui/prefsadw.ui.h:23 +msgid "Blur strength" +msgstr "Blur Strength" + +#: ui/prefsadw.ui.h:24 +msgid "Blur strength when login prompt is not visible" +msgstr "" + +#: ui/prefsadw.ui.h:25 +msgid "Wallpaper brightness" +msgstr "Wallpaper Brightness" + +#: ui/prefsadw.ui.h:26 +msgid "Dim wallpaper when login prompt is not visible" +msgstr "" + +#: ui/prefsadw.ui.h:27 +msgid "Presets" +msgstr "" + +#: ui/prefsadw.ui.h:28 +msgid "Gallery" +msgstr "" + +#: ui/prefsadw.ui.h:29 +msgid "Debug" +msgstr "" + +#: ui/prefsadw.ui.h:30 +msgid "Debug options" +msgstr "Debug Options" + +#: ui/prefsadw.ui.h:31 +msgid "Debug logging" +msgstr "Debug Logging" + +#: ui/prefsadw.ui.h:32 +msgid "Enable logging to system journal" +msgstr "" + +#: ui/prefsadw.ui.h:33 +msgid "Advanced options" +msgstr "Advanced Options" + +#: ui/prefsadw.ui.h:34 extension.js:159 +msgid "Always show new images" +msgstr "Always Show New Images" + +#: ui/prefsadw.ui.h:35 +msgid "Switch to new images when available (unless on random mode)" +msgstr "" + +#: ui/prefsadw.ui.h:36 +msgid "Purge on trash" +msgstr "Purge on Trash" + +#: ui/prefsadw.ui.h:37 +msgid "Trashing an image will remove it from database and disk" +msgstr "" + +#: ui/prefsadw.ui.h:38 +msgid "Screen resolution" +msgstr "Screen Resolution" + +#: ui/prefsadw.ui.h:39 +msgid "Override automatic resolution selection" +msgstr "" + +#: ui/prefsadw.ui.h:40 +msgid "Random interval" +msgstr "Random Interval" + +#: ui/prefsadw.ui.h:41 +msgid "Custom shuffle interval when enabled" +msgstr "" + +#: ui/prefsadw.ui.h:42 +msgid "Delete older images" +msgstr "Delete Older Images" + +#: ui/prefsadw.ui.h:43 +msgid "Automatically delete older images (excludes favourites)" +msgstr "" + +#: ui/prefsadw.ui.h:44 +msgid "Number of days to keep images" +msgstr "Number of Days to Keep Images" + +#: ui/prefsadw.ui.h:45 +msgid "Keep images for this number of days (favourites are kept forever)" +msgstr "" + +#: ui/prefsadw.ui.h:46 +msgid "Always export Bing data" +msgstr "Always Export Bing Data" + +#: ui/prefsadw.ui.h:47 +msgid "Export Bing JSON when image data changes" +msgstr "" + +#: ui/prefsadw.ui.h:48 +msgid "Bing JSON data" +msgstr "Bing JSON Data" + +#: ui/prefsadw.ui.h:49 +msgid "About" +msgstr "" + +#: ui/prefsadw.ui.h:50 +msgid "Bing Wallpaper" +msgstr "" + +#: ui/prefsadw.ui.h:51 +msgid "New wallpaper images everyday from Bing" +msgstr "" + +#: ui/prefsadw.ui.h:52 +msgid "Maintained by Michael Carroll" +msgstr "" + +#: ui/prefsadw.ui.h:53 +msgid "Version" +msgstr "" + +#: ui/prefsadw.ui.h:54 +msgid "Release notes" +msgstr "Release Notes" + +#: ui/prefsadw.ui.h:55 +msgid "GNOME extensions page" +msgstr "GNOME Extensions Page" + +#: ui/prefsadw.ui.h:56 +msgid "Source code" +msgstr "Source Code" + +#: ui/prefsadw.ui.h:57 +msgid "Report an issue" +msgstr "Report an Issue" + +#: ui/prefsadw.ui.h:58 +msgid "Contributors" +msgstr "" + +#: ui/prefsadw.ui.h:59 +msgid "License" +msgstr "" + +#: ui/prefsadw.ui.h:60 prefs.js:117 +msgid "Change folder" +msgstr "Change Folder..." + +#: ui/prefsadw.ui.h:61 +msgid "Select new wallpaper download folder" +msgstr "" + +#: ui/carousel4.ui.h:1 +msgid "Favorite" +msgstr "" + +#: ui/carousel4.ui.h:2 +msgid "Apply" +msgstr "" + +#: ui/carousel4.ui.h:3 +msgid "View" +msgstr "" + +#: ui/carousel4.ui.h:4 +msgid "Info" +msgstr "" + +#: ui/carousel4.ui.h:5 +msgid "Delete" +msgstr "" + +#: ui/carousel4.ui.h:6 +msgid "" +msgstr "" + +#: ui/carousel4.ui.h:7 extension.js:160 +msgid "Image shuffle mode" +msgstr "Image Shuffle Mode" + +#: ui/carousel4.ui.h:8 +msgid "Load image gallery" +msgstr "Load Image Gallery" + +#: ui/intervals.utils.js.h:2 +msgid "on the hour" +msgstr "On the Hour" + +#: ui/intervals.utils.js.h:5 +msgid "every day at midnight" +msgstr "Every Day at Midnight" + +#: ui/intervals.utils.js.h:8 +msgid "Sunday at midnight" +msgstr "Sunday at Midnight" + +#: ui/intervals.utils.js.h:11 +msgid "User defined interval" +msgstr "User-Defined Interval" + +#: extension.js:136 +msgid "" +msgstr "" + +#: extension.js:137 extension.js:138 extension.js:148 extension.js:150 +msgid "Awaiting refresh..." +msgstr "" + +#: extension.js:139 +msgid "Copy image to clipboard" +msgstr "" + +#: extension.js:140 +msgid "Copy image URL to clipboard" +msgstr "" + +#: extension.js:141 +msgid "Open image folder" +msgstr "" + +#: extension.js:142 extension.js:158 +msgid "Set background image" +msgstr "" + +#: extension.js:143 +msgid "Set lock screen image" +msgstr "" + +#: extension.js:144 +msgid "Refresh Now" +msgstr "" + +#: extension.js:146 +msgid "Open in image viewer" +msgstr "" + +#: extension.js:147 +msgid "Open Bing image information page" +msgstr "" + +#: extension.js:156 +msgid "Quick settings" +msgstr "Quick Settings" + +#: extension.js:161 +msgid "Image shuffle only favorites" +msgstr "Image Shuffle Only Favorites" + +#: extension.js:163 +msgid "Show image count" +msgstr "" + +#: extension.js:164 +msgid "Image shuffle only UHD resolutions" +msgstr "Image Shuffle Only UHD Resolutions" + +#: extension.js:361 +msgid "Next refresh" +msgstr "" + +#: extension.js:363 +msgid "Last refresh" +msgstr "" + +#: extension.js:366 +msgid "Next shuffle" +msgstr "" + +#: extension.js:856 extension.js:944 +msgid "Bing Wallpaper of the Day for" +msgstr "" + +#: extension.js:982 +msgid "No wallpaper available" +msgstr "" + +#: extension.js:983 +msgid "No picture for today." +msgstr "" + +#: prefs.js:109 +msgid "Open folder" +msgstr "Open Folder" + +#: prefs.js:132 +msgid "Default" +msgstr "" + +#: prefs.js:140 +msgid "No blur, slight dim" +msgstr "No Blur, Slight Dim" + +#: prefs.js:148 +msgid "Slight blur & dim" +msgstr "Slight Blur & Dim" + +#: prefs.js:165 +msgid "Import" +msgstr "" + +#: prefs.js:173 +msgid "Export" +msgstr "" + +#: prefs.js:241 +msgid "Select wallpaper download folder" +msgstr "" + +#: utils.js:134 +msgid "Error fetching change log: " +msgstr "" + +#: utils.js:400 utils.js:403 +msgid "minutes" +msgstr "" + +#: utils.js:406 +msgid "days" +msgstr "" + +#: utils.js:409 +msgid "hours" +msgstr "" diff --git a/locale/en_AU/LC_MESSAGES/BingWallpaper.mo b/locale/en_AU/LC_MESSAGES/BingWallpaper.mo deleted file mode 100644 index 854350cb..00000000 Binary files a/locale/en_AU/LC_MESSAGES/BingWallpaper.mo and /dev/null differ diff --git a/locale/en_AU/LC_MESSAGES/BingWallpaper.po b/locale/en_AU/LC_MESSAGES/BingWallpaper.po deleted file mode 100644 index 7c1da44c..00000000 --- a/locale/en_AU/LC_MESSAGES/BingWallpaper.po +++ /dev/null @@ -1,275 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-09 18:16+1000\n" -"PO-Revision-Date: 2021-05-09 19:08+1000\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.1\n" -"Last-Translator: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Language: en_AU\n" - -#: Settings.ui.h:1 Settings4.ui.h:2 -msgid "Hide the indicator" -msgstr "Hide the indicator" - -#: Settings.ui.h:2 Settings4.ui.h:3 -msgid "Indicator icon" -msgstr "Indicator icon" - -#: Settings.ui.h:3 Settings4.ui.h:4 -msgid "Enable desktop notifications" -msgstr "Enable desktop notifications" - -#: Settings.ui.h:4 Settings4.ui.h:5 extension.js:129 -msgid "Set background image" -msgstr "Set background image" - -#: Settings.ui.h:5 Settings4.ui.h:6 extension.js:130 -msgid "Set lock screen image" -msgstr "Set lock screen image" - -#: Settings.ui.h:6 Settings4.ui.h:7 -msgid "Download folder" -msgstr "Download folder" - -#: Settings.ui.h:7 Settings4.ui.h:1 -msgid "Bing Wallpaper pictures folder" -msgstr "Bing Wallpaper images folder" - -#: Settings.ui.h:8 Settings4.ui.h:9 -msgid "Delete previously downloaded wallpapers" -msgstr "Delete previously downloaded images" - -#: Settings.ui.h:9 Settings4.ui.h:10 -msgid "Days to store wallpapers before deleting" -msgstr "Days to store images before deleting" - -#: Settings.ui.h:10 Settings4.ui.h:11 -msgid "Bing locale" -msgstr "Bing locale" - -#: Settings.ui.h:11 Settings4.ui.h:12 -msgid "Default is English - United States" -msgstr "Default is English - United States" - -#: Settings.ui.h:12 Settings4.ui.h:14 -msgid "Screen resolution" -msgstr "Screen resolution" - -#: Settings.ui.h:13 Settings4.ui.h:15 -msgid "Override automatic resolution selection" -msgstr "Override automatic resolution selection" - -#: Settings.ui.h:14 Settings4.ui.h:13 -msgid "Selected image" -msgstr "Selected image" - -#: Settings.ui.h:15 Settings4.ui.h:16 extension.js:132 -msgid "Settings" -msgstr "Settings" - -#: Settings.ui.h:16 Settings4.ui.h:17 -msgid "Use custom blur and brightness" -msgstr "Customise blur and brightness" - -#: Settings.ui.h:17 Settings4.ui.h:18 -msgid "Override GDM3 lockscreen effects" -msgstr "Override GDM3 lockscreen effects" - -#: Settings.ui.h:18 Settings4.ui.h:19 -msgid "Blur can improve readability of login prompt" -msgstr "Blur can improve readability of login prompt" - -#: Settings.ui.h:19 Settings4.ui.h:20 -msgid "Background blur intensity" -msgstr "Background blur intensity" - -#: Settings.ui.h:20 Settings4.ui.h:21 -msgid "Can improve contrast of login prompt" -msgstr "May improve contrast of login prompt" - -#: Settings.ui.h:21 Settings4.ui.h:22 -msgid "Background brightness" -msgstr "Background brightness" - -#: Settings.ui.h:22 Settings4.ui.h:23 -msgid "Presets" -msgstr "Presets" - -#: Settings.ui.h:23 Settings4.ui.h:24 -msgid "Commonly used presets" -msgstr "Suggested presets" - -#: Settings.ui.h:24 Settings4.ui.h:25 -msgid "No blur, slight dim" -msgstr "No blur, slight dim" - -#: Settings.ui.h:25 Settings4.ui.h:26 -msgid "GNOME default" -msgstr "GNOME default" - -#: Settings.ui.h:26 Settings4.ui.h:27 -msgid "Slight blur, slight dim" -msgstr "Slight blur, slight dim" - -#: Settings.ui.h:27 Settings4.ui.h:28 -msgid "Lock Screen" -msgstr "Lock Screen" - -#: Settings.ui.h:28 Settings4.ui.h:29 -msgid "New wallpaper images everyday from Bing" -msgstr "New wallpaper images everyday from Bing" - -#: Settings.ui.h:29 Settings4.ui.h:30 -msgid "Gnome shell extension version " -msgstr "GNOME shell extension version " - -#: Settings.ui.h:30 Settings4.ui.h:31 -msgid "https://github.com/neffo/bing-wallpaper-gnome-extension" -msgstr "https://github.com/neffo/bing-wallpaper-gnome-extension" - -#: Settings.ui.h:31 Settings4.ui.h:32 -msgid "Maintained by Michael Carroll" -msgstr "Maintained by Michael Carroll" - -#: Settings.ui.h:32 Settings4.ui.h:33 -msgid "" -"Show your support to the author on Flattr or Github " -"Sponsors." -msgstr "" -"Show your support to the author on Flattr or Github " -"Sponsors." - -#: Settings.ui.h:33 Settings4.ui.h:34 -msgid "Changes since last version" -msgstr "Changes since last version" - -#: Settings.ui.h:34 Settings4.ui.h:35 -msgid "Based on NASA APOD Gnome shell extension by Elia Argentieri" -msgstr "Based on NASA APOD Gnome shell extension by Elia Argentieri" - -#: Settings.ui.h:35 Settings4.ui.h:36 -msgid "" -"This program comes with ABSOLUTELY NO WARRANTY.\n" -"See the GNU General " -"Public License, version 3 or later for details." -msgstr "" -"This program comes with ABSOLUTELY NO WARRANTY.\n" -"See the GNU General " -"Public License, version 3 or later for details." - -#: Settings.ui.h:37 Settings4.ui.h:38 -msgid "About" -msgstr "About" - -#: Settings4.ui.h:8 -msgid "Open folder" -msgstr "Open folder" - -#: extension.js:117 -msgid "" -msgstr "" - -#: extension.js:119 extension.js:121 extension.js:123 -msgid "Awaiting refresh..." -msgstr "Awaiting refresh..." - -#: extension.js:126 -msgid "Copy image to clipboard" -msgstr "Copy image to clipboard" - -#: extension.js:127 -msgid "Copy image URL to clipboard" -msgstr "Copy image URL to clipboard" - -#: extension.js:128 -msgid "Open image folder" -msgstr "Open image folder" - -#: extension.js:131 -msgid "Refresh Now" -msgstr "Refresh Now" - -#: extension.js:137 -msgid "Thumbnail disabled on Wayland" -msgstr "Thumbnail disabled on Wayland" - -#: extension.js:203 -msgid "Next refresh" -msgstr "Next refresh" - -#: extension.js:490 extension.js:527 -msgid "Bing Wallpaper of the Day for" -msgstr "Bing Wallpaper of the Day for" - -#: extension.js:495 -msgid "Set as wallpaper" -msgstr "Set as wallpaper" - -#: extension.js:498 -msgid "More info on Bing.com" -msgstr "More info on Bing.com" - -#: extension.js:553 -msgid "No wallpaper available" -msgstr "No wallpaper available" - -#: extension.js:554 -msgid "No picture for today." -msgstr "No wallpaper available" - -#: prefs.js:173 -msgid "Most recent image" -msgstr "Most recent image" - -#: prefs.js:174 -msgid "Random image" -msgstr "Randomize image" - -#: prefs.js:190 prefs.js:206 -msgid "Disabled on current GNOME version" -msgstr "Disabled on current GNOME version" - -#: utils.js:139 -msgid "Fetching data..." -msgstr "Fetching data..." - -#: utils.js:150 -msgid "Market not available in your region" -msgstr "Market not available in your region" - -#: utils.js:154 -msgid "A network error occured" -msgstr "A network error occured" - -#: utils.js:159 -msgid "Too many requests in 5 seconds" -msgstr "Too many requests in 5 seconds" - -#: utils.js:186 -msgid "No change log found for this release" -msgstr "No change log found for this release" - -#: utils.js:366 utils.js:369 -msgid "minutes" -msgstr "minutes" - -#: utils.js:372 -msgid "days" -msgstr "days" - -#: utils.js:375 -msgid "hours" -msgstr "hours" diff --git a/prefs.js b/prefs.js index 228a4678..ea4f3d08 100644 --- a/prefs.js +++ b/prefs.js @@ -82,7 +82,7 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen const debug_page = buildable.get_object('debug_page'); const json_actionrow = buildable.get_object('json_actionrow'); const about_page = buildable.get_object('about_page'); - const version_button = buildable.get_object('version_button'); + const version_row = buildable.get_object('version_row'); const change_log = buildable.get_object('change_log'); window.add(settings_page); @@ -104,18 +104,12 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen // add wallpaper folder open and change buttons const openBtn = new Gtk.Button( { - child: new Adw.ButtonContent({ - icon_name: 'folder-pictures-symbolic', - label: _('Open folder'), - },), + label: _('Open folder'), valign: Gtk.Align.CENTER, halign: Gtk.Align.CENTER, }); const changeBtn = new Gtk.Button( { - child: new Adw.ButtonContent({ - icon_name: 'folder-download-symbolic', - label: _('Change folder'), - },), + label: _('Change folder'), valign: Gtk.Align.CENTER, halign: Gtk.Align.CENTER, }); @@ -127,26 +121,17 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen brightnessAdjustment.set_value(settings.get_int('lockscreen-blur-brightness')); const defaultBtn = new Gtk.Button( { - child: new Adw.ButtonContent({ - icon_name: 'emblem-default-symbolic', - label: _('Default'), - },), + label: _('Default'), valign: Gtk.Align.CENTER, halign: Gtk.Align.CENTER, }); const noBlurBtn = new Gtk.Button( { - child: new Adw.ButtonContent({ - icon_name: 'emblem-default-symbolic', - label: _('No blur, slight dim'), - },), + label: _('No blur, slight dim'), valign: Gtk.Align.CENTER, halign: Gtk.Align.CENTER, }); const slightBlurBtn = new Gtk.Button( { - child: new Adw.ButtonContent({ - icon_name: 'emblem-default-symbolic', - label: _('Slight blur & dim'), - },), + label: _('Slight blur & dim'), valign: Gtk.Align.CENTER, halign: Gtk.Align.CENTER, }); @@ -160,18 +145,12 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen // these buttons either export or import saved JSON data const buttonImportData = new Gtk.Button( { - child: new Adw.ButtonContent({ - icon_name: 'document-send-symbolic', - label: _('Import'), - },), + label: _('Import'), valign: Gtk.Align.CENTER, halign: Gtk.Align.CENTER, }); const buttonExportData = new Gtk.Button( { - child: new Adw.ButtonContent({ - icon_name: 'document-save-symbolic', - label: _('Export'), - },), + label: _('Export'), valign: Gtk.Align.CENTER, halign: Gtk.Align.CENTER, }); @@ -179,7 +158,7 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen json_actionrow.add_suffix(buttonImportData); json_actionrow.add_suffix(buttonExportData); - version_button.set_label(this.metadata.version.toString()); + version_row.set_subtitle(this.metadata.version.toString()); try { httpSession = new Soup.Session(); @@ -189,17 +168,18 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen log("Error creating httpSession: " + e); } const icon_image = buildable.get_object('icon_image'); + const app_icon_image = buildable.get_object('app_icon_image'); // check that these are valid (can be edited through dconf-editor) Utils.validate_resolution(settings); - Utils.validate_icon(settings, this.path, icon_image); + Utils.validate_icon(settings, this.path, icon_image, app_icon_image); Utils.validate_interval(settings); // Indicator & notifications settings.bind('hide', hideSwitch, 'active', Gio.SettingsBindFlags.DEFAULT); settings.bind('notify', notifySwitch, 'active', Gio.SettingsBindFlags.DEFAULT); settings.connect('changed::icon-name', () => { - Utils.validate_icon(settings, this.path, icon_image); + Utils.validate_icon(settings, this.path, icon_image, app_icon_image); iconEntry.set_value(1 + Utils.icon_list.indexOf(settings.get_string('icon-name'))); }); diff --git a/ui/carousel4.ui b/ui/carousel4.ui index 4953091e..3df7cb6b 100644 --- a/ui/carousel4.ui +++ b/ui/carousel4.ui @@ -68,6 +68,9 @@ Author: Michael Carroll vertical 1 center + Favorite diff --git a/ui/prefsadw.ui b/ui/prefsadw.ui index 2d488056..3efdf8d6 100644 --- a/ui/prefsadw.ui +++ b/ui/prefsadw.ui @@ -23,7 +23,7 @@ Bing Wallpaper GNOME extension by: Michael Carroll - emblem-photos-symbolic + applications-system-symbolic Settings @@ -110,7 +110,7 @@ Bing Wallpaper GNOME extension by: Michael Carroll - applications-system-symbolic + system-lock-screen-symbolic Lock screen @@ -163,7 +163,7 @@ Bing Wallpaper GNOME extension by: Michael Carroll - document-open-recent-symbolic + emblem-photos-symbolic Gallery @@ -286,7 +286,8 @@ Bing Wallpaper GNOME extension by: Michael Carroll - 128 + 64 + 8 presentation - - + @@ -367,6 +362,8 @@ Bing Wallpaper GNOME extension by: Michael Carroll https://extensions.gnome.org/extension/1262/bing-wallpaper-changer/ + GNOME Extensions + GTK_ALIGN_CENTER @@ -386,6 +383,8 @@ Bing Wallpaper GNOME extension by: Michael Carroll https://github.com/neffo/bing-wallpaper-gnome-extension + GitHub + GTK_ALIGN_CENTER @@ -405,6 +404,8 @@ Bing Wallpaper GNOME extension by: Michael Carroll https://github.com/neffo/bing-wallpaper-gnome-extension/issues + GitHub + GTK_ALIGN_CENTER @@ -424,6 +425,8 @@ Bing Wallpaper GNOME extension by: Michael Carroll https://github.com/neffo/bing-wallpaper-gnome-extension/graphs/contributors + GitHub + GTK_ALIGN_CENTER diff --git a/utils.js b/utils.js index 7c9f1ef4..07c67a38 100644 --- a/utils.js +++ b/utils.js @@ -58,7 +58,12 @@ export var randomIntervals = [ {value: 'hourly', title: ('on the hour')}, export var BingImageURL = 'https://www.bing.com/HPImageArchive.aspx'; export var BingParams = { format: 'js', idx: '0' , n: '8' , mbl: '1' , mkt: '' } ; -export function validate_icon(settings, extension_path, icon_image = null) { +export function validate_icon( + settings, + extension_path, + icon_image = null, + app_icon_image = null +) { BingLog('validate_icon()'); let icon_name = settings.get_string('icon-name'); if (icon_name == '' || icon_list.indexOf(icon_name) == -1) { @@ -66,10 +71,11 @@ export function validate_icon(settings, extension_path, icon_image = null) { icon_name = settings.get_string('icon-name'); } // if called from prefs - if (icon_image) { + if (icon_image && app_icon_image) { BingLog('set icon to: ' + extension_path + '/icons/' + icon_name + '.svg'); let pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(extension_path + '/icons/' + icon_name + '.svg', 64, 64); icon_image.set_from_pixbuf(pixbuf); + app_icon_image.set_from_pixbuf(pixbuf); } }