Bind sensitivity properties in .ui files (#4128)

This commit is contained in:
Mike Gelfand 2022-11-09 21:46:23 +01:00 committed by GitHub
parent 8b3fea9adf
commit 1e32e44f60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 60 additions and 92 deletions

View File

@ -87,7 +87,7 @@ public:
TR_DISABLE_COPY_MOVE(Impl)
private:
void onSourceToggled2(Gtk::CheckButton* tb, PathButton* chooser);
void onSourceToggled(Gtk::CheckButton* tb, PathButton* chooser);
void onChooserChosen(PathButton* chooser);
void onResponse(int response);
@ -343,16 +343,6 @@ void MakeDialog::Impl::onResponse(int response)
****
***/
namespace
{
void onSourceToggled(Gtk::CheckButton* tb, Gtk::Widget* widget)
{
widget->set_sensitive(tb->get_active());
}
} // namespace
void MakeDialog::Impl::updatePiecesLabel()
{
auto const filename = builder_ ? builder_->top() : ""sv;
@ -410,7 +400,7 @@ void MakeDialog::Impl::onChooserChosen(PathButton* chooser)
setFilename(chooser->get_filename());
}
void MakeDialog::Impl::onSourceToggled2(Gtk::CheckButton* tb, PathButton* chooser)
void MakeDialog::Impl::onSourceToggled(Gtk::CheckButton* tb, PathButton* chooser)
{
if (tb->get_active())
{
@ -526,14 +516,9 @@ MakeDialog::Impl::Impl(MakeDialog& dialog, Glib::RefPtr<Gtk::Builder> const& bui
destination_chooser_->set_filename(Glib::get_user_special_dir(TR_GLIB_USER_DIRECTORY(DESKTOP)));
folder_radio_->set_active(false);
folder_radio_->signal_toggled().connect([this]() { onSourceToggled2(folder_radio_, folder_chooser_); });
folder_radio_->signal_toggled().connect([this]() { onSourceToggled(folder_radio_, folder_chooser_); });
folder_chooser_->signal_selection_changed().connect([this]() { onChooserChosen(folder_chooser_); });
folder_chooser_->set_sensitive(false);
file_radio_->set_active(true);
file_radio_->signal_toggled().connect([this]() { onSourceToggled2(file_radio_, file_chooser_); });
file_radio_->signal_toggled().connect([this]() { onSourceToggled(file_radio_, file_chooser_); });
file_chooser_->signal_selection_changed().connect([this]() { onChooserChosen(file_chooser_); });
@ -542,14 +527,6 @@ MakeDialog::Impl::Impl(MakeDialog& dialog, Glib::RefPtr<Gtk::Builder> const& bui
piece_size_scale_->set_visible(false);
piece_size_scale_->signal_value_changed().connect([this]() { onPieceSizeUpdated(); });
comment_check_->set_active(false);
comment_entry_->set_sensitive(false);
comment_check_->signal_toggled().connect([this]() { onSourceToggled(comment_check_, comment_entry_); });
source_check_->set_active(false);
source_entry_->set_sensitive(false);
source_check_->signal_toggled().connect([this]() { onSourceToggled(source_check_, source_entry_); });
#if GTKMM_CHECK_VERSION(4, 0, 0)
auto drop_controller = Gtk::DropTarget::create(GDK_TYPE_FILE_LIST, Gdk::DragAction::COPY);
drop_controller->signal_drop().connect(sigc::mem_fun(*this, &Impl::on_drag_data_received), false);

View File

@ -193,11 +193,6 @@ void init_chooser_button(PathButton& button, tr_quark const key, Glib::RefPtr<Se
button.signal_selection_changed().connect([&button, key, core]() { chosen_cb(&button, key, core); });
}
void target_cb(Gtk::CheckButton* tb, Gtk::Widget* target)
{
target->set_sensitive(tb->get_active());
}
} // namespace
/****
@ -258,8 +253,6 @@ DownloadingPage::DownloadingPage(
init_check_button(*l, TR_KEY_watch_dir_enabled, core_);
auto* w = gtr_get_widget_derived<PathButton>(builder, "watch_dir_chooser");
init_chooser_button(*w, TR_KEY_watch_dir, core_);
w->set_sensitive(gtr_pref_flag_get(TR_KEY_watch_dir_enabled));
l->signal_toggled().connect([l, w]() { target_cb(l, w); });
}
init_check_button(
@ -302,8 +295,6 @@ DownloadingPage::DownloadingPage(
init_check_button(*l, TR_KEY_incomplete_dir_enabled, core_);
auto* w = gtr_get_widget_derived<PathButton>(builder, "incomplete_dir_chooser");
init_chooser_button(*w, TR_KEY_incomplete_dir, core_);
w->set_sensitive(gtr_pref_flag_get(TR_KEY_incomplete_dir_enabled));
l->signal_toggled().connect([l, w]() { target_cb(l, w); });
}
{
@ -311,8 +302,6 @@ DownloadingPage::DownloadingPage(
init_check_button(*l, TR_KEY_script_torrent_done_enabled, core_);
auto* w = gtr_get_widget_derived<PathButton>(builder, "download_done_script_chooser");
init_chooser_button(*w, TR_KEY_script_torrent_done_filename, core_);
w->set_sensitive(gtr_pref_flag_get(TR_KEY_script_torrent_done_enabled));
l->signal_toggled().connect([l, w]() { target_cb(l, w); });
}
on_core_prefs_changed(TR_KEY_download_dir);
@ -350,8 +339,6 @@ SeedingPage::SeedingPage(
init_check_button(*w, TR_KEY_ratio_limit_enabled, core_);
auto* w2 = gtr_get_widget<Gtk::SpinButton>(builder, "stop_seeding_ratio_spin");
init_spin_button_double(*w2, TR_KEY_ratio_limit, core_, 0, 1000, .05);
w2->set_sensitive(gtr_pref_flag_get(TR_KEY_ratio_limit_enabled));
w->signal_toggled().connect([w, w2]() { target_cb(w, w2); });
}
{
@ -359,17 +346,13 @@ SeedingPage::SeedingPage(
init_check_button(*w, TR_KEY_idle_seeding_limit_enabled, core_);
auto* w2 = gtr_get_widget<Gtk::SpinButton>(builder, "stop_seeding_timeout_spin");
init_spin_button(*w2, TR_KEY_idle_seeding_limit, core_, 1, 40320, 5);
w2->set_sensitive(gtr_pref_flag_get(TR_KEY_idle_seeding_limit_enabled));
w->signal_toggled().connect([w, w2]() { target_cb(w, w2); });
}
{
auto* l = gtr_get_widget<Gtk::CheckButton>(builder, "seeding_done_script_check");
init_check_button(*l, TR_KEY_script_torrent_done_seeding_enabled, core_);
auto* w = gtr_get_widget_derived<PathButton>(builder, "seeding_done_script_choose");
auto* w = gtr_get_widget_derived<PathButton>(builder, "seeding_done_script_chooser");
init_chooser_button(*w, TR_KEY_script_torrent_done_seeding_filename, core_);
w->set_sensitive(gtr_pref_flag_get(TR_KEY_script_torrent_done_seeding_enabled));
l->signal_toggled().connect([l, w]() { target_cb(l, w); });
}
}
@ -566,22 +549,16 @@ PrivacyPage::PrivacyPage(
init_check_button(*check_, TR_KEY_blocklist_enabled, core_);
auto* const e = gtr_get_widget<Gtk::Entry>(builder, "blocklist_url_entry");
init_entry(*e, TR_KEY_blocklist_url, core_);
check_->signal_toggled().connect([this, e]() { target_cb(check_, e); });
target_cb(check_, e);
updateBlocklistText();
updateBlocklistButton_->set_data("session", core_->get_session());
updateBlocklistButton_->signal_clicked().connect([this]() { onBlocklistUpdate(); });
target_cb(check_, updateBlocklistButton_);
check_->signal_toggled().connect([this]() { target_cb(check_, label_); });
target_cb(check_, label_);
updateBlocklistButton_->set_sensitive(check_->get_active());
e->signal_changed().connect([this, e]() { on_blocklist_url_changed(e); });
on_blocklist_url_changed(e);
auto* update_check = gtr_get_widget<Gtk::CheckButton>(builder, "blocklist_autoupdate_check");
init_check_button(*update_check, TR_KEY_blocklist_updates_enabled, core_);
check_->signal_toggled().connect([this, update_check]() { target_cb(check_, update_check); });
target_cb(check_, update_check);
}
} // namespace
@ -653,7 +630,6 @@ private:
Gtk::CheckButton* whitelist_tb_;
Glib::RefPtr<Gtk::ListStore> store_;
std::vector<Gtk::Widget*> widgets_;
std::vector<Gtk::Widget*> auth_widgets_;
std::vector<Gtk::Widget*> whitelist_widgets_;
};
@ -714,11 +690,6 @@ void RemotePage::refreshRPCSensitivity()
auto const have_addr = sel->get_selected();
auto const n_rules = store_->children().size();
for (auto* const widget : widgets_)
{
widget->set_sensitive(rpc_active);
}
for (auto* const widget : auth_widgets_)
{
widget->set_sensitive(rpc_active && auth_active);
@ -752,18 +723,14 @@ RemotePage::RemotePage(BaseObjectType* cast_item, Glib::RefPtr<Gtk::Builder> con
init_check_button(*rpc_tb_, TR_KEY_rpc_enabled, core_);
rpc_tb_->signal_toggled().connect([this]() { refreshRPCSensitivity(); });
auto* const open_button = gtr_get_widget<Gtk::Button>(builder, "open_web_client_button");
widgets_.push_back(open_button);
open_button->signal_clicked().connect(&onLaunchClutchCB);
/* port */
auto* port_spin = gtr_get_widget<Gtk::SpinButton>(builder, "rpc_port_spin");
init_spin_button(*port_spin, TR_KEY_rpc_port, core_, 0, USHRT_MAX, 1);
widgets_.push_back(port_spin);
widgets_.push_back(gtr_get_widget<Gtk::Label>(builder, "rpc_port_label"));
/* require authentication */
init_check_button(*auth_tb_, TR_KEY_rpc_authentication_required, core_);
widgets_.push_back(auth_tb_);
auth_tb_->signal_toggled().connect([this]() { refreshRPCSensitivity(); });
/* username */
@ -780,7 +747,6 @@ RemotePage::RemotePage(BaseObjectType* cast_item, Glib::RefPtr<Gtk::Builder> con
/* require authentication */
init_check_button(*whitelist_tb_, TR_KEY_rpc_whitelist_enabled, core_);
widgets_.push_back(whitelist_tb_);
whitelist_tb_->signal_toggled().connect([this]() { refreshRPCSensitivity(); });
/* access control list */
@ -833,8 +799,6 @@ public:
TR_DISABLE_COPY_MOVE(SpeedPage)
private:
void refreshSchedSensitivity();
static void init_time_combo(Gtk::ComboBox& combo, Glib::RefPtr<Session> const& core, tr_quark key);
static void init_week_combo(Gtk::ComboBox& combo, Glib::RefPtr<Session> const& core, tr_quark key);
@ -842,20 +806,8 @@ private:
private:
Glib::RefPtr<Session> core_;
std::vector<Gtk::Widget*> sched_widgets_;
};
void SpeedPage::refreshSchedSensitivity()
{
bool const sched_enabled = gtr_pref_flag_get(TR_KEY_alt_speed_time_enabled);
for (auto* const w : sched_widgets_)
{
w->set_sensitive(sched_enabled);
}
}
void SpeedPage::init_time_combo(Gtk::ComboBox& combo, Glib::RefPtr<Session> const& core, tr_quark const key)
{
class TimeModelColumns : public Gtk::TreeModelColumnRecord
@ -938,9 +890,6 @@ SpeedPage::SpeedPage(BaseObjectType* cast_item, Glib::RefPtr<Gtk::Builder> const
auto* const w2 = gtr_get_widget<Gtk::SpinButton>(builder, "upload_limit_spin");
init_spin_button(*w2, TR_KEY_speed_limit_up, core_, 0, INT_MAX, 5);
w2->set_sensitive(gtr_pref_flag_get(TR_KEY_speed_limit_up_enabled));
w->signal_toggled().connect([w, w2]() { target_cb(w, w2); });
}
{
@ -950,9 +899,6 @@ SpeedPage::SpeedPage(BaseObjectType* cast_item, Glib::RefPtr<Gtk::Builder> const
auto* const w2 = gtr_get_widget<Gtk::SpinButton>(builder, "download_limit_spin");
init_spin_button(*w2, TR_KEY_speed_limit_down, core_, 0, INT_MAX, 5);
w2->set_sensitive(gtr_pref_flag_get(TR_KEY_speed_limit_down_enabled));
w->signal_toggled().connect([w, w2]() { target_cb(w, w2); });
}
{
@ -974,25 +920,16 @@ SpeedPage::SpeedPage(BaseObjectType* cast_item, Glib::RefPtr<Gtk::Builder> const
{
auto* start_combo = gtr_get_widget<Gtk::ComboBox>(builder, "alt_speed_start_time_combo");
init_time_combo(*start_combo, core_, TR_KEY_alt_speed_time_begin);
sched_widgets_.push_back(start_combo);
sched_widgets_.push_back(gtr_get_widget<Gtk::Label>(builder, "alt_speed_to_label"));
auto* end_combo = gtr_get_widget<Gtk::ComboBox>(builder, "alt_speed_end_time_combo");
init_time_combo(*end_combo, core_, TR_KEY_alt_speed_time_end);
sched_widgets_.push_back(end_combo);
auto* w = gtr_get_widget<Gtk::CheckButton>(builder, "alt_schedule_time_check");
init_check_button(*w, TR_KEY_alt_speed_time_enabled, core_);
w->signal_toggled().connect([this]() { refreshSchedSensitivity(); });
}
auto* week_combo = gtr_get_widget<Gtk::ComboBox>(builder, "alt_speed_days_combo");
init_week_combo(*week_combo, core_, TR_KEY_alt_speed_time_day);
sched_widgets_.push_back(week_combo);
sched_widgets_.push_back(gtr_get_widget<Gtk::Label>(builder, "alt_speed_days_label"));
refreshSchedSensitivity();
}
} // namespace

View File

@ -915,6 +915,7 @@
<child>
<object class="GtkSpinButton" id="download_limit_spin">
<property name="visible">True</property>
<property name="sensitive" bind-source="download_limit_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
@ -926,6 +927,7 @@
<child>
<object class="GtkSpinButton" id="upload_limit_spin">
<property name="visible">True</property>
<property name="sensitive" bind-source="upload_limit_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>

View File

@ -129,6 +129,7 @@
<child>
<object class="GtkFileChooserButton" id="source_folder_button">
<property name="visible">True</property>
<property name="sensitive" bind-source="source_folder_radio" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="action">select-folder</property>
@ -159,6 +160,7 @@
<child>
<object class="GtkFileChooserButton" id="source_file_button">
<property name="visible">True</property>
<property name="sensitive" bind-source="source_file_radio" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="title" translatable="yes"/>
@ -344,6 +346,7 @@ To add a new primary URL, add it after a blank line.</property>
<child>
<object class="GtkEntry" id="comment_entry">
<property name="visible">True</property>
<property name="sensitive" bind-source="comment_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
@ -370,6 +373,7 @@ To add a new primary URL, add it after a blank line.</property>
<child>
<object class="GtkEntry" id="source_entry">
<property name="visible">True</property>
<property name="sensitive" bind-source="source_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>

View File

@ -122,6 +122,7 @@
<child>
<object class="GtkSpinButton" id="upload_limit_spin">
<property name="visible">True</property>
<property name="sensitive" bind-source="upload_limit_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
@ -133,6 +134,7 @@
<child>
<object class="GtkSpinButton" id="download_limit_spin">
<property name="visible">True</property>
<property name="sensitive" bind-source="download_limit_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
@ -271,6 +273,7 @@
<child>
<object class="GtkLabel" id="alt_speed_days_label">
<property name="visible">True</property>
<property name="sensitive" bind-source="alt_schedule_time_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">_On days:</property>
<property name="use-underline">True</property>
@ -313,6 +316,7 @@
<child>
<object class="GtkComboBox" id="alt_speed_start_time_combo">
<property name="visible">True</property>
<property name="sensitive" bind-source="alt_schedule_time_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="wrap-width">4</property>
@ -326,6 +330,7 @@
<child>
<object class="GtkLabel" id="alt_speed_to_label">
<property name="visible">True</property>
<property name="sensitive" bind-source="alt_schedule_time_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" comments="Label goes between two time selectors, e.g. &quot;limit speeds from [time] to [time]&quot;">_to</property>
<property name="use-underline">True</property>
@ -340,6 +345,7 @@
<child>
<object class="GtkComboBox" id="alt_speed_end_time_combo">
<property name="visible">True</property>
<property name="sensitive" bind-source="alt_schedule_time_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="wrap-width">4</property>
@ -359,6 +365,7 @@
<child>
<object class="GtkComboBox" id="alt_speed_days_combo">
<property name="visible">True</property>
<property name="sensitive" bind-source="alt_schedule_time_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
@ -500,6 +507,7 @@
<child>
<object class="GtkFileChooserButton" id="watch_dir_chooser">
<property name="visible">True</property>
<property name="sensitive" bind-source="watch_dir_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="action">select-folder</property>
@ -735,6 +743,7 @@
<child>
<object class="GtkFileChooserButton" id="incomplete_dir_chooser">
<property name="visible">True</property>
<property name="sensitive" bind-source="incomplete_dir_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="action">select-folder</property>
@ -748,6 +757,7 @@
<child>
<object class="GtkFileChooserButton" id="download_done_script_chooser">
<property name="visible">True</property>
<property name="sensitive" bind-source="download_done_script_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="title" translatable="yes"/>
@ -859,6 +869,7 @@
<child>
<object class="GtkSpinButton" id="stop_seeding_ratio_spin">
<property name="visible">True</property>
<property name="sensitive" bind-source="stop_seeding_ratio_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
@ -870,6 +881,7 @@
<child>
<object class="GtkSpinButton" id="stop_seeding_timeout_spin">
<property name="visible">True</property>
<property name="sensitive" bind-source="stop_seeding_timeout_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
@ -879,8 +891,9 @@
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="seeding_done_script_choose">
<object class="GtkFileChooserButton" id="seeding_done_script_chooser">
<property name="visible">True</property>
<property name="sensitive" bind-source="seeding_done_script_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="title" translatable="yes"/>
@ -1031,6 +1044,7 @@
<object class="GtkCheckButton" id="blocklist_autoupdate_check">
<property name="label" translatable="yes">Enable _automatic updates</property>
<property name="visible">True</property>
<property name="sensitive" bind-source="blocklist_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="valign">center</property>
@ -1048,6 +1062,7 @@
<object class="GtkEntry" id="blocklist_url_entry">
<property name="width-request">300</property>
<property name="visible">True</property>
<property name="sensitive" bind-source="blocklist_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
@ -1065,6 +1080,7 @@
<child>
<object class="GtkLabel" id="blocklist_stats_label">
<property name="visible">True</property>
<property name="sensitive" bind-source="blocklist_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label">...</property>
@ -1818,6 +1834,7 @@ To add a new primary URL, add it after a blank line.</property>
<object class="GtkButton" id="open_web_client_button">
<property name="label" translatable="yes">_Open web client</property>
<property name="visible">True</property>
<property name="sensitive" bind-source="enable_rpc_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="use-underline">True</property>
@ -1839,6 +1856,7 @@ To add a new primary URL, add it after a blank line.</property>
<child>
<object class="GtkLabel" id="rpc_port_label">
<property name="visible">True</property>
<property name="sensitive" bind-source="enable_rpc_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">HTTP _port:</property>
<property name="use-underline">True</property>
@ -1854,6 +1872,7 @@ To add a new primary URL, add it after a blank line.</property>
<object class="GtkCheckButton" id="enable_rpc_auth_check">
<property name="label" translatable="yes">Use _authentication</property>
<property name="visible">True</property>
<property name="sensitive" bind-source="enable_rpc_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="valign">center</property>
@ -1899,6 +1918,7 @@ To add a new primary URL, add it after a blank line.</property>
<object class="GtkCheckButton" id="rpc_whitelist_check">
<property name="label" translatable="yes">Only allow these IP a_ddresses:</property>
<property name="visible">True</property>
<property name="sensitive" bind-source="enable_rpc_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="valign">center</property>
@ -1944,6 +1964,7 @@ To add a new primary URL, add it after a blank line.</property>
<child>
<object class="GtkSpinButton" id="rpc_port_spin">
<property name="visible">True</property>
<property name="sensitive" bind-source="enable_rpc_check" bind-property="active" bind-flags="sync-create">False</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>

View File

@ -659,6 +659,7 @@
</child>
<child>
<object class="GtkSpinButton" id="download_limit_spin">
<property name="sensitive" bind-source="download_limit_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="focusable">1</property>
<property name="hexpand">1</property>
<layout>
@ -669,6 +670,7 @@
</child>
<child>
<object class="GtkSpinButton" id="upload_limit_spin">
<property name="sensitive" bind-source="upload_limit_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="focusable">1</property>
<property name="hexpand">1</property>
<layout>

View File

@ -63,6 +63,7 @@
</child>
<child>
<object class="gtkmm__CustomObject_10PathButton" id="source_folder_button">
<property name="sensitive" bind-source="source_folder_radio" bind-property="active" bind-flags="sync-create">0</property>
<property name="hexpand">1</property>
<property name="action">select-folder</property>
<layout>
@ -86,6 +87,7 @@
</child>
<child>
<object class="gtkmm__CustomObject_10PathButton" id="source_file_button">
<property name="sensitive" bind-source="source_file_radio" bind-property="active" bind-flags="sync-create">0</property>
<property name="hexpand">1</property>
<property name="title" translatable="1"></property>
<layout>
@ -219,6 +221,7 @@ To add a new primary URL, add it after a blank line.</property>
</child>
<child>
<object class="GtkEntry" id="comment_entry">
<property name="sensitive" bind-source="comment_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="focusable">1</property>
<property name="hexpand">1</property>
<layout>
@ -241,6 +244,7 @@ To add a new primary URL, add it after a blank line.</property>
</child>
<child>
<object class="GtkEntry" id="source_entry">
<property name="sensitive" bind-source="source_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="focusable">1</property>
<property name="hexpand">1</property>
<layout>

View File

@ -61,6 +61,7 @@
</child>
<child>
<object class="GtkSpinButton" id="upload_limit_spin">
<property name="sensitive" bind-source="upload_limit_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="focusable">1</property>
<property name="hexpand">1</property>
<layout>
@ -71,6 +72,7 @@
</child>
<child>
<object class="GtkSpinButton" id="download_limit_spin">
<property name="sensitive" bind-source="download_limit_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="focusable">1</property>
<property name="hexpand">1</property>
<layout>
@ -163,6 +165,7 @@
</child>
<child>
<object class="GtkLabel" id="alt_speed_days_label">
<property name="sensitive" bind-source="alt_schedule_time_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="label" translatable="1">_On days:</property>
<property name="use-underline">1</property>
<property name="mnemonic-widget">alt_speed_days_combo</property>
@ -199,11 +202,13 @@
<property name="spacing">12</property>
<child>
<object class="GtkComboBox" id="alt_speed_start_time_combo">
<property name="sensitive" bind-source="alt_schedule_time_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkLabel" id="alt_speed_to_label">
<property name="sensitive" bind-source="alt_schedule_time_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="label" translatable="1" comments="Label goes between two time selectors, e.g. &quot;limit speeds from [time] to [time]&quot;">_to</property>
<property name="use-underline">1</property>
<property name="mnemonic-widget">alt_speed_end_time_combo</property>
@ -211,6 +216,7 @@
</child>
<child>
<object class="GtkComboBox" id="alt_speed_end_time_combo">
<property name="sensitive" bind-source="alt_schedule_time_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="hexpand">1</property>
</object>
</child>
@ -222,6 +228,7 @@
</child>
<child>
<object class="GtkComboBox" id="alt_speed_days_combo">
<property name="sensitive" bind-source="alt_schedule_time_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="hexpand">1</property>
<layout>
<property name="column">1</property>
@ -330,6 +337,7 @@
</child>
<child>
<object class="gtkmm__CustomObject_10PathButton" id="watch_dir_chooser">
<property name="sensitive" bind-source="watch_dir_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="hexpand">1</property>
<property name="action">select-folder</property>
<property name="title" translatable="1"></property>
@ -498,6 +506,7 @@
</child>
<child>
<object class="gtkmm__CustomObject_10PathButton" id="incomplete_dir_chooser">
<property name="sensitive" bind-source="incomplete_dir_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="hexpand">1</property>
<property name="action">select-folder</property>
<property name="title" translatable="1"></property>
@ -509,6 +518,7 @@
</child>
<child>
<object class="gtkmm__CustomObject_10PathButton" id="download_done_script_chooser">
<property name="sensitive" bind-source="download_done_script_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="hexpand">1</property>
<property name="title" translatable="1"></property>
<layout>
@ -588,6 +598,7 @@
</child>
<child>
<object class="GtkSpinButton" id="stop_seeding_ratio_spin">
<property name="sensitive" bind-source="stop_seeding_ratio_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="focusable">1</property>
<property name="hexpand">1</property>
<layout>
@ -598,6 +609,7 @@
</child>
<child>
<object class="GtkSpinButton" id="stop_seeding_timeout_spin">
<property name="sensitive" bind-source="stop_seeding_timeout_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="focusable">1</property>
<property name="hexpand">1</property>
<layout>
@ -607,7 +619,8 @@
</object>
</child>
<child>
<object class="gtkmm__CustomObject_10PathButton" id="seeding_done_script_choose">
<object class="gtkmm__CustomObject_10PathButton" id="seeding_done_script_chooser">
<property name="sensitive" bind-source="seeding_done_script_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="hexpand">1</property>
<property name="title" translatable="1"></property>
<layout>
@ -705,6 +718,7 @@
</child>
<child>
<object class="GtkCheckButton" id="blocklist_autoupdate_check">
<property name="sensitive" bind-source="blocklist_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="label" translatable="1">Enable _automatic updates</property>
<property name="focusable">1</property>
<property name="valign">center</property>
@ -719,6 +733,7 @@
</child>
<child>
<object class="GtkEntry" id="blocklist_url_entry">
<property name="sensitive" bind-source="blocklist_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="width-request">300</property>
<property name="focusable">1</property>
<property name="hexpand">1</property>
@ -734,6 +749,7 @@
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="blocklist_stats_label">
<property name="sensitive" bind-source="blocklist_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="hexpand">1</property>
<property name="label">...</property>
<property name="xalign">0</property>
@ -1250,6 +1266,7 @@ To add a new primary URL, add it after a blank line.</property>
</child>
<child>
<object class="GtkButton" id="open_web_client_button">
<property name="sensitive" bind-source="enable_rpc_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="label" translatable="1">_Open web client</property>
<property name="focusable">1</property>
<property name="receives-default">1</property>
@ -1265,6 +1282,7 @@ To add a new primary URL, add it after a blank line.</property>
</child>
<child>
<object class="GtkLabel" id="rpc_port_label">
<property name="sensitive" bind-source="enable_rpc_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="label" translatable="1">HTTP _port:</property>
<property name="use-underline">1</property>
<property name="mnemonic-widget">rpc_port_spin</property>
@ -1277,6 +1295,7 @@ To add a new primary URL, add it after a blank line.</property>
</child>
<child>
<object class="GtkCheckButton" id="enable_rpc_auth_check">
<property name="sensitive" bind-source="enable_rpc_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="label" translatable="1">Use _authentication</property>
<property name="focusable">1</property>
<property name="valign">center</property>
@ -1315,6 +1334,7 @@ To add a new primary URL, add it after a blank line.</property>
</child>
<child>
<object class="GtkCheckButton" id="rpc_whitelist_check">
<property name="sensitive" bind-source="enable_rpc_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="label" translatable="1">Only allow these IP a_ddresses:</property>
<property name="focusable">1</property>
<property name="valign">center</property>
@ -1354,6 +1374,7 @@ To add a new primary URL, add it after a blank line.</property>
</child>
<child>
<object class="GtkSpinButton" id="rpc_port_spin">
<property name="sensitive" bind-source="enable_rpc_check" bind-property="active" bind-flags="sync-create">0</property>
<property name="focusable">1</property>
<property name="hexpand">1</property>
<layout>