mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
Bump minimum GTK version to 3.24 (#2112)
This commit is contained in:
@@ -114,7 +114,7 @@ set(OPENSSL_MINIMUM 0.9.7)
|
||||
set(CYASSL_MINIMUM 3.0)
|
||||
set(POLARSSL_MINIMUM 1.2)
|
||||
set(ZLIB_MINIMUM 1.2.3)
|
||||
set(GTK_MINIMUM 3.4.0)
|
||||
set(GTK_MINIMUM 3.24.0)
|
||||
set(GLIB_MINIMUM 2.50.1)
|
||||
set(GIO_MINIMUM 2.26.0)
|
||||
set(LIBAPPINDICATOR_MINIMUM 0.4.90)
|
||||
|
||||
@@ -773,19 +773,11 @@ FilterBar::Impl::Impl(FilterBar& widget, tr_session* session, Glib::RefPtr<Gtk::
|
||||
show_lb_->set_mnemonic_widget(*activity_);
|
||||
widget_.pack_start(*show_lb_, false, false, 0);
|
||||
widget_.pack_start(*activity_, true, true, 0);
|
||||
#if GTK_CHECK_VERSION(3, 12, 0)
|
||||
activity_->set_margin_end(GUI_PAD);
|
||||
#else
|
||||
activity_->set_margin_right(GUI_PAD);
|
||||
#endif
|
||||
|
||||
/* add the tracker combobox */
|
||||
widget_.pack_start(*tracker_, true, true, 0);
|
||||
#if GTK_CHECK_VERSION(3, 12, 0)
|
||||
tracker_->set_margin_end(GUI_PAD);
|
||||
#else
|
||||
tracker_->set_margin_right(GUI_PAD);
|
||||
#endif
|
||||
|
||||
/* add the entry field */
|
||||
entry_ = Gtk::make_managed<Gtk::Entry>();
|
||||
|
||||
@@ -45,11 +45,7 @@ void HigWorkarea::add_section_title(guint& row, Glib::ustring const& section_tit
|
||||
void HigWorkarea::add_wide_control(guint& row, Gtk::Widget& w)
|
||||
{
|
||||
w.set_hexpand(true);
|
||||
#if GTK_CHECK_VERSION(3, 12, 0)
|
||||
w.set_margin_start(18);
|
||||
#else
|
||||
w.set_margin_left(18);
|
||||
#endif
|
||||
attach(w, 0, row, 2, 1);
|
||||
++row;
|
||||
}
|
||||
@@ -71,11 +67,7 @@ Gtk::CheckButton* HigWorkarea::add_wide_checkbutton(guint& row, Glib::ustring co
|
||||
|
||||
void HigWorkarea::add_label_w(guint row, Gtk::Widget& w)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3, 12, 0)
|
||||
w.set_margin_start(18);
|
||||
#else
|
||||
w.set_margin_left(18);
|
||||
#endif
|
||||
|
||||
if (auto* label = dynamic_cast<Gtk::Label*>(&w); label != nullptr)
|
||||
{
|
||||
|
||||
@@ -108,12 +108,7 @@ namespace
|
||||
void on_popup_menu(GdkEventButton* event)
|
||||
{
|
||||
auto* menu = gtr_action_get_widget<Gtk::Menu>("/main-window-popup");
|
||||
|
||||
#if GTK_CHECK_VERSION(3, 22, 0)
|
||||
menu->popup_at_pointer(reinterpret_cast<GdkEvent*>(event));
|
||||
#else
|
||||
menu->popup(event != nullptr ? event->button : 0, event != nullptr ? event->time : 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool tree_view_search_equal_func(
|
||||
@@ -215,11 +210,7 @@ MainWindow::Impl::~Impl()
|
||||
|
||||
void MainWindow::Impl::onYinYangClicked(Gtk::Button* button)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3, 22, 0)
|
||||
status_menu_->popup_at_widget(button, Gdk::GRAVITY_NORTH_EAST, Gdk::GRAVITY_SOUTH_EAST, nullptr);
|
||||
#else
|
||||
status_menu_->popup(0, gtk_get_current_event_time());
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::Impl::status_menu_toggled_cb(Gtk::CheckMenuItem* menu_item, std::string const& val)
|
||||
@@ -435,11 +426,7 @@ void MainWindow::Impl::onOptionsClicked(Gtk::Button* button)
|
||||
|
||||
(gtr_pref_flag_get(TR_KEY_ratio_limit_enabled) ? ratio_on_item_ : ratio_off_item_)->set_active(true);
|
||||
|
||||
#if GTK_CHECK_VERSION(3, 22, 0)
|
||||
options_menu_->popup_at_widget(button, Gdk::GRAVITY_NORTH_WEST, Gdk::GRAVITY_SOUTH_WEST, nullptr);
|
||||
#else
|
||||
options_menu_->popup(0, gtk_get_current_event_time());
|
||||
#endif
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
@@ -68,13 +68,9 @@ void SystemTrayIcon::Impl::activated()
|
||||
gtr_action_activate("toggle-main-window");
|
||||
}
|
||||
|
||||
void SystemTrayIcon::Impl::popup([[maybe_unused]] guint button, [[maybe_unused]] guint when)
|
||||
void SystemTrayIcon::Impl::popup(guint /*button*/, guint /*when*/)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3, 22, 0)
|
||||
menu_->popup_at_pointer(nullptr);
|
||||
#else
|
||||
menu_->popup(button, when);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SystemTrayIcon::Impl::refresh()
|
||||
|
||||
Reference in New Issue
Block a user