mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
rename variable
This commit is contained in:
parent
005b7574ca
commit
3152416713
1 changed files with 8 additions and 8 deletions
|
|
@ -38,8 +38,8 @@ impl Titan for gtk::Box {
|
||||||
let control = control.clone();
|
let control = control.clone();
|
||||||
let file = file.clone();
|
let file = file.clone();
|
||||||
let text = text.clone();
|
let text = text.clone();
|
||||||
move |_, _, i| {
|
move |_, _, tab_number| {
|
||||||
if i == 0 {
|
if tab_number == 0 {
|
||||||
control.update(Some(text.len()), Some(text.count()))
|
control.update(Some(text.len()), Some(text.count()))
|
||||||
} else {
|
} else {
|
||||||
control.update(file.size(), None)
|
control.update(file.size(), None)
|
||||||
|
|
@ -78,8 +78,8 @@ impl Titan for gtk::Box {
|
||||||
move |this| {
|
move |this| {
|
||||||
use gtk::prelude::WidgetExt;
|
use gtk::prelude::WidgetExt;
|
||||||
this.set_sensitive(false); // lock
|
this.set_sensitive(false); // lock
|
||||||
let page = notebook.current_page().unwrap();
|
let tab_number = notebook.current_page().unwrap();
|
||||||
match page {
|
match tab_number {
|
||||||
0 => text.header(),
|
0 => text.header(),
|
||||||
1 => file.header(),
|
1 => file.header(),
|
||||||
_ => panic!(),
|
_ => panic!(),
|
||||||
|
|
@ -89,7 +89,7 @@ impl Titan for gtk::Box {
|
||||||
let text = text.clone();
|
let text = text.clone();
|
||||||
let file = file.clone();
|
let file = file.clone();
|
||||||
move |header| {
|
move |header| {
|
||||||
match page {
|
match tab_number {
|
||||||
0 => text.set_header(header),
|
0 => text.set_header(header),
|
||||||
1 => file.set_header(header),
|
1 => file.set_header(header),
|
||||||
_ => panic!(),
|
_ => panic!(),
|
||||||
|
|
@ -104,14 +104,14 @@ impl Titan for gtk::Box {
|
||||||
move |this| {
|
move |this| {
|
||||||
use control::Upload;
|
use control::Upload;
|
||||||
this.set_uploading();
|
this.set_uploading();
|
||||||
let page = notebook.current_page().unwrap();
|
let tab_number = notebook.current_page().unwrap();
|
||||||
callback(
|
callback(
|
||||||
match page {
|
match tab_number {
|
||||||
0 => text.header(),
|
0 => text.header(),
|
||||||
1 => file.header(),
|
1 => file.header(),
|
||||||
_ => panic!(),
|
_ => panic!(),
|
||||||
},
|
},
|
||||||
match page {
|
match tab_number {
|
||||||
0 => text.bytes(),
|
0 => text.bytes(),
|
||||||
1 => file.bytes().unwrap(),
|
1 => file.bytes().unwrap(),
|
||||||
_ => panic!(),
|
_ => panic!(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue