diff --git a/CMakeLists.txt b/CMakeLists.txt index 536a90aef..69a55ca56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/gtk/FilterBar.cc b/gtk/FilterBar.cc index a1d8d5dd3..78cd17ffd 100644 --- a/gtk/FilterBar.cc +++ b/gtk/FilterBar.cc @@ -773,19 +773,11 @@ FilterBar::Impl::Impl(FilterBar& widget, tr_session* session, Glib::RefPtrset_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(); diff --git a/gtk/HigWorkarea.cc b/gtk/HigWorkarea.cc index 723e114ac..f9874c846 100644 --- a/gtk/HigWorkarea.cc +++ b/gtk/HigWorkarea.cc @@ -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(&w); label != nullptr) { diff --git a/gtk/MainWindow.cc b/gtk/MainWindow.cc index 75f3aa82d..f5af86061 100644 --- a/gtk/MainWindow.cc +++ b/gtk/MainWindow.cc @@ -108,12 +108,7 @@ namespace void on_popup_menu(GdkEventButton* event) { auto* menu = gtr_action_get_widget("/main-window-popup"); - -#if GTK_CHECK_VERSION(3, 22, 0) menu->popup_at_pointer(reinterpret_cast(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 } /*** diff --git a/gtk/SystemTrayIcon.cc b/gtk/SystemTrayIcon.cc index 54cd6d8b8..5b0fadb39 100644 --- a/gtk/SystemTrayIcon.cc +++ b/gtk/SystemTrayIcon.cc @@ -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()