Skip to content

Commit

Permalink
Add --no-click
Browse files Browse the repository at this point in the history
Closes #32
  • Loading branch information
nik012003 committed Sep 6, 2023
1 parent 87f2412 commit a4b24bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/list_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ fn setup_factory(factory: &SignalListItemFactory, list: &MultiSelection) {
let row = CenterBox::default();

let drag_source = create_drag_source(&row, &list);
let gesture_click = create_gesture_click(&row);
row.add_controller(gesture_click);
if !ARGS.get().unwrap().no_click {
let gesture_click = create_gesture_click(&row);
row.add_controller(gesture_click);
}
row.add_controller(drag_source);

list_item
Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ struct Cli {
#[arg(short = 'A', long)]
all_compact: bool,

/// Show only the number of items and drag them together
#[arg(short = 'n', long)]
no_click: bool,

/// Paths to the files you want to drag
#[arg(value_name = "PATH")]
paths: Vec<PathBuf>,
Expand Down

0 comments on commit a4b24bb

Please sign in to comment.