Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Improvements #252

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 1 addition & 27 deletions carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
}
};
};
Binary file added locale/en/LC_MESSAGES/BingWallpaper.mo
Binary file not shown.
Loading
Loading