@@ -21,7 +21,7 @@ const BingImageURL = Utils.BingImageURL;
21
21
22
22
var DESKTOP_SCHEMA = 'org.gnome.desktop.background' ;
23
23
24
- var PREFS_DEFAULT_WIDTH = 700 ;
24
+ var PREFS_DEFAULT_WIDTH = 750 ;
25
25
var PREFS_DEFAULT_HEIGHT = 750 ;
26
26
27
27
export default class BingWallpaperExtensionPreferences extends ExtensionPreferences {
@@ -113,50 +113,8 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen
113
113
const folderDialog = buildable . get_object ( 'folderDialog' ) ;
114
114
const lockscreen_page = buildable . get_object ( 'lockscreen_page' ) ;
115
115
116
- /*const lockscreen_page = new Adw.PreferencesPage({
117
- title: _('Lock screen'),
118
- icon_name: 'applications-system-symbolic',
119
- });*/
120
116
window . add ( lockscreen_page ) ;
121
117
const ls_group = buildable . get_object ( 'ls_group' ) ;
122
- /*
123
- const ls_group = new Adw.PreferencesGroup({
124
- title: _('Lockscreen blur'),
125
- });
126
- */
127
- /*
128
- lockscreen_page.add(ls_group);
129
- const overrideSwitch = new Adw.SwitchRow({
130
- title: _('Dynamic lockscreen blur'),
131
- subtitle: _('Whether to enable dynamic blur mode on lock screen'),
132
- });
133
- const strengthEntry = new Adw.SpinRow({
134
- title: _('Blur strength'),
135
- subtitle: _('Blur strength when login prompt is not visible'),
136
- adjustment: new Gtk.Adjustment({
137
- lower: 0,
138
- upper: 50,
139
- value: settings.get_int('lockscreen-blur-strength'),
140
- page_increment: 10,
141
- step_increment: 1,
142
- }),
143
- });
144
- const brightnessEntry = new Adw.SpinRow({
145
- title: _('Wallpaper brightness'),
146
- subtitle: _('Dim wallpaper when login prompt is not visible'),
147
- adjustment: new Gtk.Adjustment({
148
- lower: 0,
149
- upper: 50,
150
- value: settings.get_int('lockscreen-blur-brightness'),
151
- page_increment: 10,
152
- step_increment: 1,
153
- }),
154
- });
155
- */
156
- /*const blurPresets = new Adw.ActionRow({
157
- title: _('Presets'),
158
- });*/
159
-
160
118
const overrideSwitch = buildable . get_object ( 'overrideSwitch' ) ;
161
119
const blurPresets = buildable . get_object ( 'blurPresets' ) ;
162
120
const strengthEntry = buildable . get_object ( 'strengthEntry' ) ;
@@ -204,8 +162,11 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen
204
162
const gallery_page = buildable . get_object ( 'gallery_page' ) ;
205
163
window . add ( gallery_page ) ;
206
164
165
+ const carouselViewPort = buildable . get_object ( 'carouselViewPort' ) ;
207
166
const carouselFlowBox = buildable . get_object ( 'carouselFlowBox' ) ;
208
167
168
+ //carouselViewPort.set_size(500,500);
169
+
209
170
const debug_page = buildable . get_object ( 'debug_page' ) ;
210
171
window . add ( debug_page ) ;
211
172
@@ -243,57 +204,7 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen
243
204
version_button . set_label ( this . metadata . version . toString ( ) ) ;
244
205
245
206
const change_log = buildable . get_object ( 'change_log' ) ;
246
-
247
-
248
- /*
249
- // Prepare labels and controls
250
- let buildable = new Gtk.Builder();
251
- // GTK4 removes some properties, and builder breaks when it sees them
252
- buildable.add_from_file( this.dir.get_path() + '/ui/Settings4.ui' );
253
- */
254
-
255
-
256
- /*
257
- let box = buildable.get_object('prefs_widget');
258
-
259
- // fix size of prefs window in GNOME shell 40+ (but super racy, so is unreliable)
260
-
261
- buildable.get_object('extension_version').set_text(this.metadata.version.toString());
262
- buildable.get_object('extension_name').set_text(this.metadata.name.toString());
263
-
264
- // assign variables to UI objects we've loaded
265
- let hideSwitch = buildable.get_object('hide');
266
- let iconEntry = buildable.get_object('icon');
267
- let notifySwitch = buildable.get_object('notify');
268
- let bgSwitch = buildable.get_object('background');
269
- let styleEntry = buildable.get_object('background_style');
270
- let fileChooserBtn = buildable.get_object('download_folder');
271
- let fileChooser = buildable.get_object('file_chooser'); // this should only exist on Gtk4
272
- let folderOpenBtn = buildable.get_object('button_open_download_folder');
273
- let marketEntry = buildable.get_object('market');
274
- let resolutionEntry = buildable.get_object('resolution');
275
- let historyEntry = buildable.get_object('history');
276
- icon_image = buildable.get_object('icon_image');
277
- let overrideSwitch = buildable.get_object('lockscreen_override');
278
- let strengthEntry = buildable.get_object('entry_strength');
279
- let brightnessEntry = buildable.get_object('entry_brightness');*/
280
-
281
-
282
- /*
283
- let unsafeSwitch = buildable.get_object('unsafe_switch');
284
- let randomIntervalEntry = buildable.get_object('entry_random_interval');
285
- let change_log = buildable.get_object('change_log');
286
- let buttonGDMdefault = buildable.get_object('button_default_gnome');
287
- let buttonnoblur = buildable.get_object('button_no_blur');
288
- let buttonslightblur = buildable.get_object('button_slight_blur');
289
- let buttonImportData = buildable.get_object('button_json_import');
290
- let buttonExportData = buildable.get_object('button_json_export');
291
- let switchAlwaysExport = buildable.get_object('always_export_switch');
292
- let switchEnableShuffle = buildable.get_object('shuffle_enabled_switch');
293
- let entryShuffleMode = buildable.get_object('shuffle_mode_combo');
294
- let carouselFlowBox = (Gtk.get_major_version() == 4) ? buildable.get_object('carouselFlowBox'): null;
295
- */
296
-
207
+
297
208
try {
298
209
httpSession = new Soup . Session ( ) ;
299
210
httpSession . user_agent = 'User-Agent: Mozilla/5.0 (X11; GNOME Shell/' + Config . PACKAGE_VERSION + '; Linux x86_64; +https://github.com/neffo/bing-wallpaper-gnome-extension ) BingWallpaper Gnome Extension/' + this . metadata . version ;
@@ -312,24 +223,11 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen
312
223
// Indicator & notifications
313
224
settings . bind ( 'hide' , hideSwitch , 'active' , Gio . SettingsBindFlags . DEFAULT ) ;
314
225
settings . bind ( 'notify' , notifySwitch , 'active' , Gio . SettingsBindFlags . DEFAULT ) ;
315
- /*
316
- // add markets to dropdown list (aka a GtkComboText)
317
- Utils.icon_list.forEach((iconname, index) => {
318
- iconEntry.append(iconname, iconname);
319
- });
320
- */
321
- // user selectable indicator icons
322
- // settings.bind('icon-name', iconEntry, 'active_id', Gio.SettingsBindFlags.DEFAULT);
323
226
settings . connect ( 'changed::icon-name' , ( ) => {
324
227
Utils . validate_icon ( settings , this . path , icon_image ) ;
325
228
/*iconEntry.set_selected(Utils.indexOf(settings.get_string('icon-name')));*/
326
229
} ) ;
327
-
328
- /*
329
- iconEntry.connect('changed', (widget) => {
330
- settings.set_string('icon-name', Utils.icon_list[iconEntry.active_id]);
331
- });*/
332
-
230
+
333
231
//iconEntry.set_active_id(settings.get_string('icon-name'));
334
232
335
233
// connect switches to settings changes
@@ -348,7 +246,7 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen
348
246
349
247
// we populate the tab (gtk4+, gnome 40+), this was previously a button to open a new window in gtk3
350
248
// disabled at the moment, needs testing
351
- // carousel = new Carousel(settings, null, null, carouselFlowBox, this.dir.get_path()); // auto load carousel
249
+ carousel = new Carousel ( settings , null , null , carouselFlowBox , this . dir . get_path ( ) ) ; // auto load carousel
352
250
353
251
// this is intended for migrating image folders between computers (or even sharing) or backups
354
252
// we export the Bing JSON data to the image directory, so this folder becomes portable
@@ -420,10 +318,5 @@ export default class BingWallpaperExtensionPreferences extends ExtensionPreferen
420
318
421
319
if ( httpSession )
422
320
Utils . fetch_change_log ( this . metadata . version . toString ( ) , change_log , httpSession ) ;
423
-
424
- /*group.add(box);
425
- page.add(group);
426
-
427
- window.add(page);*/
428
321
}
429
322
}
0 commit comments