From 5350dd78f3b9b78eb437ddd37b97ad80ba7b9184 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Dec 22 2014 10:30:31 +0000 Subject: Patch for toolbar issue, requested by the upstream --- diff --git a/4Pane-HEAD-0005-Make-the-toolbar-the-correct-size-for-its-tools-in-g.patch b/4Pane-HEAD-0005-Make-the-toolbar-the-correct-size-for-its-tools-in-g.patch new file mode 100644 index 0000000..cb7657e --- /dev/null +++ b/4Pane-HEAD-0005-Make-the-toolbar-the-correct-size-for-its-tools-in-g.patch @@ -0,0 +1,93 @@ +From 712bf13e3fb2039cde3b4ee0c2d8c2e49f003a02 Mon Sep 17 00:00:00 2001 +From: dghart +Date: Sun, 21 Dec 2014 15:20:02 +0000 +Subject: [PATCH 1/2] Make the toolbar the correct size for its tools in gtk3 + builds too + +When built against wxWidgets using gtk3, the toolbar was clipping the icons of its tools. This was caused by old code designed to ease the transition between gtk1.2 and 2.0! +Fixed by removing that old code, and allowing the toolbar to size itself naturally. +--- + Externs.h | 2 -- + MyFrame.cpp | 4 ++-- + Redo.cpp | 4 ++-- + config.h | 7 ------- + 4 files changed, 4 insertions(+), 13 deletions(-) + +diff --git a/Externs.h b/Externs.h +index c5213c2..2f0223d 100644 +--- a/Externs.h ++++ b/Externs.h +@@ -86,8 +86,6 @@ extern wxString BITMAPSDIR; + extern wxString RCDIR; + extern wxString HELPDIR; + +-extern int MAINTOOLBARWIDTH; +- + extern wxWindowID NextID; + + #if defined(__WXGTK20__) +diff --git a/MyFrame.cpp b/MyFrame.cpp +index ebae40f..757c043 100644 +--- a/MyFrame.cpp ++++ b/MyFrame.cpp +@@ -547,7 +547,7 @@ CreateMenuBar(MenuBar); SetMenuBar(MenuBar); + + toolbar = NULL; LoadToolbarButtons(); // Toolbar pt1 + +-panelette = new wxPanel(this, -1, wxDefaultPosition, wxSize(-1,MAINTOOLBARWIDTH), wxTAB_TRAVERSAL, wxT("TBPanel")); // & pt2, for MyBitmapButtons ++panelette = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, wxT("TBPanel")); // & pt2, for MyBitmapButtons + sizerTB = new wxBoxSizer(wxHORIZONTAL); + sizerTB->Add(toolbar, 0, wxEXPAND); + sizerTB->Add(panelette, 1, wxEXPAND); +@@ -666,7 +666,7 @@ if (recreating) + toolbar->Destroy(); + } + +-toolbar = new wxToolBar(this, ID_FRAMETOOLBAR ,wxPoint(0,0), wxSize(-1,MAINTOOLBARWIDTH)); ++toolbar = new wxToolBar(this, ID_FRAMETOOLBAR); + + wxBitmap toolBarBitmaps[8]; + +diff --git a/Redo.cpp b/Redo.cpp +index f3cc6bc..f55928e 100644 +--- a/Redo.cpp ++++ b/Redo.cpp +@@ -295,7 +295,7 @@ int offset = 0; // This copes with displays of > + + // We need to pop-up the sidebar menu below the Undo button. WxWidgets doesn't let us locate this, & the mouse pos could be anywhere within the button. + wxPoint pt; // The solution is to cheat, & place it where calcs say it ought to be. This may fail on future resizes etc +-pt.y = MAINTOOLBARWIDTH + 2; // The y pos could be anywhere within the button, so replace with the known toolbar-width, plus a fiddle-factor ++pt.y = MyFrame::mainframe->toolbar->GetSize().GetHeight() + 2; // The y pos could be anywhere within the button, so replace with the known toolbar-height, plus a fiddle-factor + pt.x = (MyFrame::mainframe->buttonsbeforesidebar * 30) + (MyFrame::mainframe->separatorsbeforesidebar * 7); // & we counted the tools as we inserted them + + do +@@ -379,7 +379,7 @@ int offset = 0; // This copes with displays of >1 pa + + // We need to pop-up the sidebar menu below the Redo button. WxWidgets doesn't let us locate this, & the mouse pos could be anywhere within the button. + wxPoint pt; // The solution is to cheat, & place it where calcs say it ought to be. This may fail on future resizes etc +-pt.y = MAINTOOLBARWIDTH + 2; // The y pos could be anywhere within the button, so replace with the known toolbar-width, plus a fiddle-factor ++pt.y = MyFrame::mainframe->toolbar->GetSize().GetHeight() + 2; // The y pos could be anywhere within the button, so replace with the known toolbar-height, plus a fiddle-factor + pt.x = (MyFrame::mainframe->buttonsbeforesidebar * 30) + 30 + 13 // (The extra 30 is for the Undo button, the 13 for the Undo sidebar buttton) + + (MyFrame::mainframe->separatorsbeforesidebar* 7); // We counted the other tools as we inserted them + +diff --git a/config.h b/config.h +index 641d694..b2b7c46 100644 +--- a/config.h ++++ b/config.h +@@ -47,13 +47,6 @@ wxString BITMAPSDIR; + wxString RCDIR; + wxString HELPDIR; + +-#ifdef __WXGTK20__ +-int MAINTOOLBARWIDTH = 38; +-#else +-int MAINTOOLBARWIDTH = 30; +-#endif +- +- + size_t MAX_COMMAND_HISTORY = 25; // How many recent commands from eg grep or locate, should be stored + wxArrayString FilterHistory; + +-- +2.1.0 + diff --git a/4Pane.spec b/4Pane.spec index d766615..9db0986 100644 --- a/4Pane.spec +++ b/4Pane.spec @@ -8,24 +8,27 @@ Name: 4Pane Version: 3.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Multi-pane, detailed-list file manager License: GPLv3 URL: http://www.4pane.co.uk/ Source0: http://downloads.sourceforge.net/fourpane/4pane-%{version}.tar.gz # https://sourceforge.net/p/fourpane/discussion/767206/thread/9daf0cda/ -Patch0: 4Pane-HEAD-0001-When-getting-a-pointer-to-a-menubar-menu-don-t-searc.patch +Patch1: 4Pane-HEAD-0001-When-getting-a-pointer-to-a-menubar-menu-don-t-searc.patch # http://sourceforge.net/p/fourpane/feature-requests/9/ -Patch1: 4Pane-HEAD-0002-Add-the-man-page-to-git.patch +Patch2: 4Pane-HEAD-0002-Add-the-man-page-to-git.patch # http://sourceforge.net/p/fourpane/feature-requests/10/ -Patch2: 4Pane-HEAD-0003-Add-an-appdata-file-see-https-sourceforge.net-p-four.patch -Patch3: 4Pane-HEAD-0004-Correct-the-use-of-DESTDIR-in-the-last-commit.patch +Patch3: 4Pane-HEAD-0003-Add-an-appdata-file-see-https-sourceforge.net-p-four.patch +Patch4: 4Pane-HEAD-0004-Correct-the-use-of-DESTDIR-in-the-last-commit.patch +# Request from the upstream +Patch5: 4Pane-HEAD-0005-Make-the-toolbar-the-correct-size-for-its-tools-in-g.patch BuildRequires: bzip2-devel BuildRequires: xz-devel BuildRequires: wxGTK3-devel BuildRequires: desktop-file-utils +BuildRequires: git %description 4Pane is a multi-pane, detailed-list file manager. It is designed @@ -39,12 +42,29 @@ tools. %prep %setup -q -n 4pane-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 + +cat > .gitignore </dev/null || : %{_datadir}/icons/hicolor/*/apps/%{name}* %changelog +* Mon Dec 22 2014 Mamoru TASAKA - 3.0-6 +- Patch for toolbar issue, requested by the upstream + * Sun Dec 21 2014 Mamoru TASAKA - 3.0-5 - Add man page, appdata (on F-21+)