Browse Source

Added tab-style exception for Ubuntu

merge-requests/365/head
eidheim 10 years ago
parent
commit
a8a48a4991
  1. 4
      src/CMakeLists.txt
  2. 2
      src/menu.cc
  3. 5
      src/notebook.cc

4
src/CMakeLists.txt

@ -10,13 +10,13 @@ if(APPLE)
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig")
endif()
if(UNIX) #Checking if compiling on Ubuntu that has a buggy menu system
if(UNIX) #Checking if compiling on Ubuntu that for instance has a buggy menu system
find_program(LSB_RELEASE_BIN lsb_release)
if(LSB_RELEASE_BIN)
execute_process(COMMAND ${LSB_RELEASE_BIN} -is
OUTPUT_VARIABLE DISTRIBUTION OUTPUT_STRIP_TRAILING_WHITESPACE)
if((DISTRIBUTION STREQUAL Ubuntu) OR (DISTRIBUTION STREQUAL LinuxMint))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJUCI_UBUNTU_BUGGED_MENU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJUCI_UBUNTU")
endif()
endif()
endif()

2
src/menu.cc

@ -7,7 +7,7 @@
Menu::Menu() {
auto accels=Config::get().menu.keys;
for(auto &accel: accels) {
#ifdef JUCI_UBUNTU_BUGGED_MENU
#ifdef JUCI_UBUNTU
size_t pos=0;
std::string second=accel.second;
while((pos=second.find('<', pos))!=std::string::npos) {

5
src/notebook.cc

@ -52,8 +52,13 @@ Notebook::TabLabel::TabLabel(const std::string &title) : Gtk::Box(Gtk::ORIENTATI
Notebook::Notebook() : Gtk::Notebook(), last_index(-1) {
Gsv::init();
//Ubuntu forces its own theme
std::string data = ".notebook {\n"
#ifdef JUCI_UBUNTU
"padding: 1px;\n"
#else
"padding: 4px;\n"
#endif
"-GtkNotebook-tab-overlap: 0px;\n"
"-GtkNotebook-show-border: 0;\n"
"}";

Loading…
Cancel
Save