Skip to content

Commit

Permalink
combine imports
Browse files Browse the repository at this point in the history
  • Loading branch information
nnyyxxxx committed Oct 16, 2024
1 parent a2d435f commit bd737e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/gui.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use gtk::prelude::*;
use gtk::{Application, ApplicationWindow, Button, FlowBox, Image, ScrolledWindow};
use gtk::{prelude::*, Application, ApplicationWindow, Button, FlowBox, Image, ScrolledWindow};
use std::cell::RefCell;
use std::path::PathBuf;
use std::rc::Rc;
Expand Down Expand Up @@ -34,7 +33,7 @@ pub fn build_ui(app: &Application) {

let flowbox_ref = Rc::new(RefCell::new(flowbox));

let choose_folder_button = Button::with_label("Choose Image Folder");
let choose_folder_button = Button::with_label("Change wallpaper folder");
let flowbox_clone = Rc::clone(&flowbox_ref);
let window_weak = window.downgrade();
choose_folder_button.connect_clicked(move |_| {
Expand All @@ -53,7 +52,7 @@ pub fn build_ui(app: &Application) {

fn choose_folder(window: &ApplicationWindow, flowbox: &Rc<RefCell<FlowBox>>) {
let dialog = gtk::FileChooserDialog::new(
Some("Choose Image Folder"),
Some("Change wallpaper folder"),
Some(window),
gtk::FileChooserAction::SelectFolder,
&[
Expand Down
3 changes: 1 addition & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
mod gui;

use gtk::prelude::*;
use gtk::Application;
use gtk::{prelude::*, Application};
use std::process::Command;

fn main() {
Expand Down

0 comments on commit bd737e3

Please sign in to comment.