mirror of
https://github.com/transmission/transmission.git
synced 2025-12-19 18:08:31 +00:00
Feature/default focus (#7102)
* Setting default focus in Open URL and Add Tracker dialog box * Additional cleanup to remove duplication of responsibility in setting focus * Removing now un-necessary code in TorrentUrlChooserDialog.ui * Using activates-default property to enable default action in torrent url chooser and tracker adder * removing un-necessary focus * Adding missing property to the accept buttons. * Removing unintended whitespace change in TorrentUrlChooserDialog * Use `True` instead of `1` for booleans (GTK3)
This commit is contained in:
@@ -2341,6 +2341,13 @@ AddTrackerDialog::AddTrackerDialog(
|
||||
set_title(fmt::format(_("{torrent_name} - Add Tracker"), fmt::arg("torrent_name", tr_torrentName(torrent))));
|
||||
set_transient_for(parent);
|
||||
|
||||
auto* const accept = get_widget_for_response(TR_GTK_RESPONSE_TYPE(ACCEPT));
|
||||
#if GTKMM_CHECK_VERSION(4, 0, 0)
|
||||
set_default_widget(*accept);
|
||||
#else
|
||||
set_default(*accept);
|
||||
#endif
|
||||
|
||||
gtr_paste_clipboard_url_into_entry(*url_entry_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user