~cypheon/elfelli

bd5c7015d4fc692dd0509f0da7d104c0bea71cd5 — Johann Rudloff 22 days ago 949efda
Remove use of deprecated gtkmm-2.4 API, require gtkmm-2.4 ≥ 2.18
3 files changed, 5 insertions(+), 6 deletions(-)

M CMakeLists.txt
M src/Application.cpp
M src/SimulationCanvas.cpp
M CMakeLists.txt => CMakeLists.txt +1 -1
@@ 8,7 8,7 @@ include(FindGettext)
include(FindPkgConfig)
include(GNUInstallDirs)

pkg_check_modules(GTKMM REQUIRED gtkmm-2.4>=2.8 librsvg-2.0)
pkg_check_modules(GTKMM REQUIRED gtkmm-2.4>=2.18 librsvg-2.0)

set (CMAKE_CXX_STANDARD 11)


M src/Application.cpp => src/Application.cpp +3 -4
@@ 440,17 440,16 @@ Widget *Application::build_object_toolbar()
  al->add(*manage(tb));
  al->set_padding(2, 2, 0, 0);

  Tooltips *tips = manage(new Tooltips);
  Button *btn;
  Image *img;

  btn = manage(new Button);
  img = new Image(Stock::REMOVE, Gtk::ICON_SIZE_SMALL_TOOLBAR);
  btn->unset_flags(CAN_FOCUS);
  btn->set_can_focus(false);
  btn->set_image(*manage(img));
  btn->set_relief(RELIEF_NONE);
  btn->signal_clicked().connect(sigc::mem_fun(*this, &Application::on_remove_selected_activate));
  tips->set_tip(*btn, _("Remove this object"));
  btn->set_tooltip_text(_("Remove this object"));
  tb->pack_start(*btn, false, false);

  int width = img->size_request().width + 4 + 2*btn->get_style()->get_xthickness();


@@ 466,7 465,7 @@ Widget *Application::build_object_toolbar()
  charge_spin->signal_value_changed().connect(sigc::mem_fun(*this, &Application::on_charge_value_changed));
  charge_spin->set_range(SimulationCanvas::MIN_CHARGE, SimulationCanvas::MAX_CHARGE);
  charge_spin->set_increments(SimulationCanvas::CHARGE_STEP_SMALL, SimulationCanvas::CHARGE_STEP);
  tips->set_tip(*charge_spin, _("Change the absolute value of this object's charge"));
  charge_spin->set_tooltip_text(_("Change the absolute value of this object's charge"));

  charge_box->pack_start(*charge_spin);
  Alignment *charge_al = manage(new Alignment);

M src/SimulationCanvas.cpp => src/SimulationCanvas.cpp +1 -1
@@ 518,7 518,7 @@ void SimulationCanvas::after_realize_event()

  get_pixmap()->draw_rectangle(gc_white, true, 0, 0, get_width(), get_height());

  set_flags(get_flags() | Gtk::CAN_FOCUS);
  set_can_focus(true);
}

bool SimulationCanvas::on_configure_event(GdkEventConfigure *event)