Browse Source

Oldest supported gtk version is now gtk3.14 (debian stable)

merge-requests/365/head
eidheim 10 years ago
parent
commit
41dfc08585
  1. 7
      src/menu.cc
  2. 2
      src/terminal.cc
  3. 9
      src/window.cc

7
src/menu.cc

@ -435,13 +435,8 @@ void Menu::set_keys() {
auto application=Glib::RefPtr<Gtk::Application>::cast_static(gio_application); auto application=Glib::RefPtr<Gtk::Application>::cast_static(gio_application);
for(auto &key: Config::get().menu.keys) { for(auto &key: Config::get().menu.keys) {
if(key.second.size()>0 && actions.find(key.first)!=actions.end()) { if(key.second.size()>0 && actions.find(key.first)!=actions.end())
#if GTK_VERSION_GE(3, 12)
application->set_accel_for_action("app."+key.first, key.second); application->set_accel_for_action("app."+key.first, key.second);
#else
application->add_accelerator(key.second, "app."+key.first); //For Ubuntu 14...
#endif
}
} }
} }

2
src/terminal.cc

@ -310,9 +310,7 @@ void Terminal::async_print(size_t line_nr, const std::string &message) {
} }
void Terminal::configure() { void Terminal::configure() {
#if GTKMM_MAJOR_VERSION>3 || (GTKMM_MAJOR_VERSION==3 && GTKMM_MINOR_VERSION>=12)
link_tag->property_foreground_rgba()=get_style_context()->get_color(Gtk::StateFlags::STATE_FLAG_LINK); link_tag->property_foreground_rgba()=get_style_context()->get_color(Gtk::StateFlags::STATE_FLAG_LINK);
#endif
if(Config::get().terminal.font.size()>0) { if(Config::get().terminal.font.size()>0) {
override_font(Pango::FontDescription(Config::get().terminal.font)); override_font(Pango::FontDescription(Config::get().terminal.font));

9
src/window.cc

@ -47,12 +47,7 @@ Window::Window() {
auto info_and_status_hbox=Gtk::manage(new Gtk::HBox()); auto info_and_status_hbox=Gtk::manage(new Gtk::HBox());
info_and_status_hbox->pack_start(Notebook::get().info, Gtk::PACK_SHRINK); info_and_status_hbox->pack_start(Notebook::get().info, Gtk::PACK_SHRINK);
#if GTK_VERSION_GE(3, 12)
info_and_status_hbox->set_center_widget(Project::debug_status_label()); info_and_status_hbox->set_center_widget(Project::debug_status_label());
#else
Project::debug_status_label().set_halign(Gtk::Align::ALIGN_CENTER);
info_and_status_hbox->pack_start(Project::debug_status_label());
#endif
info_and_status_hbox->pack_end(Notebook::get().status, Gtk::PACK_SHRINK); info_and_status_hbox->pack_end(Notebook::get().status, Gtk::PACK_SHRINK);
terminal_scrolled_window.add(Terminal::get()); terminal_scrolled_window.add(Terminal::get());
@ -65,7 +60,6 @@ Window::Window() {
vpaned.pack1(directory_and_notebook_panes, true, false); vpaned.pack1(directory_and_notebook_panes, true, false);
vpaned.pack2(*terminal_vbox, true, true); vpaned.pack2(*terminal_vbox, true, true);
#if GTKMM_MAJOR_VERSION>3 || (GTKMM_MAJOR_VERSION==3 && GTKMM_MINOR_VERSION>=14)
auto overlay_vbox=Gtk::manage(new Gtk::VBox()); auto overlay_vbox=Gtk::manage(new Gtk::VBox());
auto overlay_hbox=Gtk::manage(new Gtk::HBox()); auto overlay_hbox=Gtk::manage(new Gtk::HBox());
overlay_vbox->set_hexpand(false); overlay_vbox->set_hexpand(false);
@ -82,9 +76,6 @@ Window::Window() {
overlay->set_overlay_pass_through(*overlay_hbox, true); overlay->set_overlay_pass_through(*overlay_hbox, true);
#endif #endif
add(*overlay); add(*overlay);
#else
add(vpaned);
#endif
show_all_children(); show_all_children();
Info::get().hide(); Info::get().hide();

Loading…
Cancel
Save