mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
implement refresh method for update
This commit is contained in:
parent
d869b4b3e7
commit
fac8c14cbd
3 changed files with 18 additions and 3 deletions
|
|
@ -107,7 +107,7 @@ void Navigation::refresh(
|
||||||
navigationHistory->refresh();
|
navigationHistory->refresh();
|
||||||
|
|
||||||
// Toggle update button sensibility
|
// Toggle update button sensibility
|
||||||
navigationUpdate->set_sensitive(
|
navigationUpdate->refresh(
|
||||||
navigationRequest->get_text_length() > 0
|
navigationRequest->get_text_length() > 0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,9 @@ Update::Update(
|
||||||
_("Update")
|
_("Update")
|
||||||
);
|
);
|
||||||
|
|
||||||
/* @TODO
|
|
||||||
set_sensitive(
|
set_sensitive(
|
||||||
false
|
false
|
||||||
); */
|
);
|
||||||
|
|
||||||
signal_clicked().connect(
|
signal_clicked().connect(
|
||||||
[this]
|
[this]
|
||||||
|
|
@ -29,3 +28,15 @@ Update::Update(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Update::refresh(
|
||||||
|
const bool & ENABLED
|
||||||
|
) {
|
||||||
|
set_sensitive(
|
||||||
|
ENABLED
|
||||||
|
);
|
||||||
|
|
||||||
|
action__update->set_enabled(
|
||||||
|
ENABLED
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -17,6 +17,10 @@ namespace app::browser::main::tab::page::navigation
|
||||||
Update(
|
Update(
|
||||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__UPDATE
|
const Glib::RefPtr<Gio::SimpleAction> & ACTION__UPDATE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void refresh(
|
||||||
|
const bool & ENABLED
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue