diff --git a/.gitignore b/.gitignore index bd1a2bc..7c4d871 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/4pane-*.tar.gz +/4pane-3.0.tar.gz diff --git a/4Pane-HEAD-0001-When-getting-a-pointer-to-a-menubar-menu-don-t-searc.patch b/4Pane-HEAD-0001-When-getting-a-pointer-to-a-menubar-menu-don-t-searc.patch new file mode 100644 index 0000000..5b24902 --- /dev/null +++ b/4Pane-HEAD-0001-When-getting-a-pointer-to-a-menubar-menu-don-t-searc.patch @@ -0,0 +1,167 @@ +From 5b4ce2be04f00e001bad6c4d6c59ff3791b1125c Mon Sep 17 00:00:00 2001 +From: dghart +Date: Wed, 10 Dec 2014 20:42:12 +0000 +Subject: [PATCH] When getting a pointer to a menubar menu, don't search by + title + +Using wxMenuBar::FindMenu to find the index of a menu isn't as mnemonic-safe as it should be. There are two problems: +1) If the search string isn't localised, it will fail if there's a translation. +2) Even if it is, there's a potential problem with mnemonic location, as translators are allowed to use a non-default letter. + +This _shouldn't_ matter as wx removes the mnemonic before matching. However it seems that in Japanese, the mnemonic is appended +(e.g. Bookmarks(&B)) +and unsurprisingly wxStripMenuCodes() can't cope with this. So store the position while loading the menubar; which isn't elegant, but it is safe. +--- + Accelerators.cpp | 4 ++++ + Bookmarks.cpp | 13 +++++++++---- + Bookmarks.h | 5 ++++- + Tools.cpp | 14 ++++++++------ + Tools.h | 3 +++ + 5 files changed, 28 insertions(+), 11 deletions(-) + +diff --git a/Accelerators.cpp b/Accelerators.cpp +index eb75627..d470c91 100644 +--- a/Accelerators.cpp ++++ b/Accelerators.cpp +@@ -16,6 +16,7 @@ + + #include "Externs.h" + #include "Configure.h" ++#include "Bookmarks.h" + #include "Accelerators.h" + + +@@ -490,6 +491,9 @@ subitemslistarray[0] = columnitems; subitemslistcount[0] = sizeof(columnitems)/p + + // Make arrays for menus & for submenus + const wxString menutitles[] = { _("&File"), _("&Edit"), _("&View"), _("&Tabs"), _("&Bookmarks"), _("&Archive"), _("&Mount"), _("Too&ls"), _("&Options"), _("&Help") }; ++Bookmarks::SetMenuIndex(4); // *** remember to change these if their position changes! *** ++LaunchMiscTools::SetMenuIndex(7); ++ + const wxString submenutitles[] = { _("&Columns to Display"), _("&Load a Tab Template") }; + int submenID[2]; submenID[0] = SHCUT_FINISH + 1; submenID[1] = LoadTabTemplateMenu; // "Columns to Display" hasn't a set id, so use SHCUT_FINISH+1 + wxMenu* menuarray[ menuno ]; wxMenu* submenuarray[ submenuno ]; +diff --git a/Bookmarks.cpp b/Bookmarks.cpp +index e0e2e7d..65ae21c 100644 +--- a/Bookmarks.cpp ++++ b/Bookmarks.cpp +@@ -318,6 +318,8 @@ END_EVENT_TABLE() + + //-------------------------------------------------------------------------------------------------------------------- + ++int Bookmarks::m_menuindex = -1; ++ + Bookmarks::Bookmarks() + { + LoadBookmarks(); +@@ -336,8 +338,9 @@ MenuStruct.ClearData(); // Make sure the arrays are em + bookmarkID = ID_FIRST_BOOKMARK; // Similarly reset bookmarkID + MenuStruct.ID = GetNextID(); // & use it indirectly to id MenuStruct + +-wxMenu* menu = MenuBar->GetMenu(MenuBar->FindMenu(_("Bookmarks"))); // Find the menu for the group +-if (menu==NULL) { wxLogError(_("Couldn't find menu!?")); return; } ++wxCHECK_RET(m_menuindex > wxNOT_FOUND, wxT("Bookmarks menu index not set")); // Should have been set when the bar was loaded ++wxMenu* menu = MenuBar->GetMenu(m_menuindex); // Find the menu for the group ++if (!menu) { wxLogError(_("Couldn't find menu!?")); return; } + + MenuStruct.pathname = wxT("/Bookmarks"); + MenuStruct.FullLabel.Empty(); // Needed for re-entry during Save/Load +@@ -435,8 +438,10 @@ config->Flush(); + + wxMenuBar* MenuBar = MyFrame::mainframe->GetMenuBar(); // We now have to destroy the menu structure, so it can be born again + if (MenuBar==NULL) { wxLogError(_("Couldn't load Menubar!?")); return; } +- +-wxMenu* mainmenu = MenuBar->GetMenu(MenuBar->FindMenu(_("Bookmarks"))); // Find the menu for the group ++ ++wxCHECK_RET(m_menuindex > wxNOT_FOUND, wxT("Bookmarks menu index not set")); // Should have been set when the bar was loaded ++wxMenu* mainmenu = MenuBar->GetMenu(m_menuindex); // Find the menu for the group ++if (!mainmenu) { wxLogError(_("Couldn't find menu!?")); return; } + + for (size_t count=mainmenu->GetMenuItemCount(); count > 3 ; --count) // Skip the 1st 3 items, they're Add, Manage & a Separator + mainmenu->Destroy(mainmenu->GetMenuItems().Item(count-1)->GetData()); // Destroy all the others, including submenus +diff --git a/Bookmarks.h b/Bookmarks.h +index b476a4d..a52109c 100644 +--- a/Bookmarks.h ++++ b/Bookmarks.h +@@ -173,6 +173,8 @@ bool Cut(wxTreeItemId item); + bool Paste(wxTreeItemId item, bool NoDupCheck=false, bool duplicating=false); + bool Copy(wxTreeItemId item); + ++static void SetMenuIndex(int index) { m_menuindex = index; } ++ + wxDialog* adddlg; // These 2 ptrs are used to access their dialogs from other methods + MyBookmarkDialog* mydlg; + BMClipboard bmclip; // Stores the TreeItemData & structs for pasting +@@ -182,7 +184,8 @@ wxConfigBase* config; + MyBmTree* tree; // The treectrl used in ManageBookmarks + bool m_altered; // Do we have anything to save? + +-unsigned int bookmarkID; // Actually it ID's folders & separators too ++static int m_menuindex; // Passed to wxMenuBar::GetMenu so we can ID the menu without using its label ++unsigned int bookmarkID; // Actually it ID.s folders & separators too + unsigned int GetNextID(){ if (bookmarkID == ID__LAST_BOOKMARK) bookmarkID=ID_FIRST_BOOKMARK; // Recycle + return bookmarkID++; } // Return next vacant bookmarkID + +diff --git a/Tools.cpp b/Tools.cpp +index 60b5879..f5ec1fe 100644 +--- a/Tools.cpp ++++ b/Tools.cpp +@@ -2678,6 +2678,8 @@ BriefLogStatus bls(msg + msgA + msgB); + } + //----------------------------------------------------------------------------------------------------------------------- + ++int LaunchMiscTools::m_menuindex = -1; ++ + void LaunchMiscTools::ClearData() + { + for (int n = (int)ToolArray.GetCount(); n > 0; --n) { UserDefinedTool* item = ToolArray.Item(n-1); delete item; ToolArray.RemoveAt(n-1); } +@@ -2691,9 +2693,9 @@ LoadArrays(); + if (!FolderArray.GetCount()) return; // No data, not event the "Run a Program" menu + + if (tools == NULL) // If so, we're loading the menubar menu, so find it +- { int id = MyFrame::mainframe->GetMenuBar()->FindMenu(_("Too&ls")); // Find the Tools menu id +- if (id == wxNOT_FOUND) return; +- tools = MyFrame::mainframe->GetMenuBar()->GetMenu(id); // Get ptr to the menu itself ++ { wxCHECK_RET(m_menuindex > wxNOT_FOUND, wxT("Tools menu index not set")); // Should have been set when the bar was loaded ++ tools = MyFrame::mainframe->GetMenuBar()->GetMenu(m_menuindex); ++ wxCHECK_RET(tools, wxT("Couldn't find the Tools menu")); + static bool alreadyloaded=false; if (!alreadyloaded) { tools->AppendSeparator(); alreadyloaded=true; } // We don't want multiple separators due to reloads + } + +@@ -2777,9 +2779,9 @@ config->DeleteGroup(wxT("/Tools/Launch")); // Delete current info (oth + Save(wxT("/Tools/Launch"), config); // Recursively save + config->Flush(); + +-int id = MyFrame::mainframe->GetMenuBar()->FindMenu(_("Tools")); // Find the id of the Tools menu proper +-if (id == wxNOT_FOUND) return; +-wxMenu* tools = MyFrame::mainframe->GetMenuBar()->GetMenu(id); // & hence the menu itself ++wxCHECK_RET(m_menuindex > wxNOT_FOUND, wxT("Tools menu index not set")); // Should have been set when the bar was loaded ++wxMenu* tools = MyFrame::mainframe->GetMenuBar()->GetMenu(m_menuindex); ++wxCHECK_RET(tools, wxT("Couldn't find the Tools menu")); + + int sm = tools->FindItem(FolderArray[0]->Label); // Find the id menu of the relevant submenu in the Tools menu + if (sm == wxNOT_FOUND) return; +diff --git a/Tools.h b/Tools.h +index d6a7f58..6554a82 100644 +--- a/Tools.h ++++ b/Tools.h +@@ -494,6 +494,8 @@ ArrayOfUserDefinedTools* GetToolarray(){ return &ToolArray; } + ArrayOfToolFolders* GetFolderArray(){ return &FolderArray; } + size_t GetLastCommand(){ return LastCommandNo; } + ++static void SetMenuIndex(int index) { m_menuindex = index; } ++ + protected: + void Load(wxString name); // Load (sub)menu 'name' from config + void ClearData(); +@@ -505,6 +507,7 @@ bool SetCorrectPaneptrs(const wxChar* &pc, MyGenericDirCtrl* &first, MyGenericDi + ArrayOfUserDefinedTools ToolArray; + ArrayOfToolFolders FolderArray; + int EventId; // Holds the first spare ID, from SHCUT_TOOLS_LAUNCH to SHCUT_TOOLS_LAUNCH_LAST-1 ++static int m_menuindex; // Passed to wxMenuBar::GetMenu so we can ID the menu without using its label + size_t EntriesIndex; + size_t FolderIndex; + size_t LastCommandNo; // Holds the last tool used, so it can be repeated +-- +2.1.0 + diff --git a/4Pane-HEAD-0002-Add-the-man-page-to-git.patch b/4Pane-HEAD-0002-Add-the-man-page-to-git.patch new file mode 100644 index 0000000..1726a00 --- /dev/null +++ b/4Pane-HEAD-0002-Add-the-man-page-to-git.patch @@ -0,0 +1,65 @@ +From 12dcd5315f7c5b8c9487b81ad73a577959633ceb Mon Sep 17 00:00:00 2001 +From: dghart +Date: Fri, 12 Dec 2014 16:43:28 +0000 +Subject: [PATCH 2/4] Add the man page to git + +See https://sourceforge.net/p/fourpane/feature-requests/9/ +--- + 4Pane.1 | 45 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 45 insertions(+) + create mode 100755 4Pane.1 + +diff --git a/4Pane.1 b/4Pane.1 +new file mode 100755 +index 0000000..f7a7644 +--- /dev/null ++++ b/4Pane.1 +@@ -0,0 +1,45 @@ ++.\" Hey, EMACS: -*- nroff -*- ++.\" First parameter, NAME, should be all caps ++.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection ++.\" other parameters are allowed: see man(7), man(1) ++.TH 4PANE 1 "October 27, 2007" ++.\" Please adjust this date whenever revising the manpage. ++.\" ++.\" Some roff macros, for reference: ++.\" .nh disable hyphenation ++.\" .hy enable hyphenation ++.\" .ad l left justify ++.\" .ad b justify to both left and right margins ++.\" .nf disable filling ++.\" .fi enable filling ++.\" .br insert line break ++.\" .sp insert n+1 empty lines ++.\" for manpage-specific macros, see man(7) ++.SH NAME ++4Pane - a detailed-view quad-pane file manager for GTK+ ++.SH SYNOPSIS ++.B 4Pane ++[-d ] [-c ] [-h] [Display from this filepath (optional)...] ++.br ++ ++.SH DESCRIPTION ++This manual page documents only 4Pane\'s rarely-used invocation options (generally you'll just type '4Pane'). ++.br ++A detailed manual is available from within 4Pane, either from the help menu or by pressing F1; and also online at http://4pane.co.uk ++.PP ++.SH OPTIONS ++.TP ++.B \-d, \-\-home\-dir= ++Use as the home directory (optional) ++.TP ++.B \-c, \-\-config\-fpath= ++Use this filepath as 4Pane's configuration file (optional. If the filepath doesn't exist, it will be created) ++.TP ++.B \-h, \-\-help ++Show a summary of options ++.br ++.SH AUTHOR ++4Pane was written by David Hart . ++.PP ++This manual page was written by David Hart , ++(but may be used by others). +-- +2.1.0 + diff --git a/4Pane-HEAD-0003-Add-an-appdata-file-see-https-sourceforge.net-p-four.patch b/4Pane-HEAD-0003-Add-an-appdata-file-see-https-sourceforge.net-p-four.patch new file mode 100644 index 0000000..c7ac8de --- /dev/null +++ b/4Pane-HEAD-0003-Add-an-appdata-file-see-https-sourceforge.net-p-four.patch @@ -0,0 +1,114 @@ +From 3b55430a83dd521dbc7633b3416c2cb54849f243 Mon Sep 17 00:00:00 2001 +From: dghart +Date: Thu, 18 Dec 2014 12:06:26 +0000 +Subject: [PATCH 3/4] Add an appdata file: see + https://sourceforge.net/p/fourpane/feature-requests/10/ + +--- + .build/4Pane.bkl | 15 ++++++++++++--- + 4Pane.appdata.xml | 28 ++++++++++++++++++++++++++++ + Makefile.in | 4 ++++ + 3 files changed, 44 insertions(+), 3 deletions(-) + create mode 100644 4Pane.appdata.xml + +diff --git a/.build/4Pane.bkl b/.build/4Pane.bkl +index 6ec38d9..8b184da 100755 +--- a/.build/4Pane.bkl ++++ b/.build/4Pane.bkl +@@ -153,6 +153,12 @@ + ln -fs 4Pane $(DESTDIR)$(BINDIR)/4pane ;\ + fi; + ++ ++ ++ @if test -d /usr/share/appdata/ ; then \ ++ cp $(DESTDIR)4Pane.appdata.xml /usr/share/appdata/ ;\ ++ fi; ++ + + + @if test $(desktop) = yes || test $(desktop) = install_only ; then \ +@@ -164,18 +170,21 @@ + + + +- ++ + + + @if test $(symlink) = yes || test $(symlink) = uninstall_only; then \ + rm -f $(DESTDIR)$(BINDIR)/4pane ;\ + fi; +- ++ ++ ++ @rm -f /usr/share/appdata/4Pane.appdata.xml ; ++ + + @if test $(desktop) = yes || test $(desktop) = uninstall_only; then \ + rm -f ~/Desktop/4Pane.desktop ;\ + fi; +- ++ + + + +diff --git a/4Pane.appdata.xml b/4Pane.appdata.xml +new file mode 100644 +index 0000000..918ecf5 +--- /dev/null ++++ b/4Pane.appdata.xml +@@ -0,0 +1,28 @@ ++ ++ ++ ++ 4Pane.desktop ++ CC0-1.0 ++ GPL-3.0 ++ 4Pane ++ File manager ++ ++

++ 4Pane is a highly configurable Linux filemanager. It has dual twin-panes, ++ each of which has a directory tree-view pane and a detailed-list pane for ++ files. ++

++

++ In addition to standard file manager things, it offers multiple undo and redo ++ of most operations (including deletions), archive management including ++ 'virtual browsing' inside archives, multiple renaming/duplication of files, ++ a terminal emulator and user-defined tools. ++

++
++ ++ ++ http://www.4Pane.co.uk/4Pane624x351.png ++ ++ ++ http://www.4pane.co.uk ++
+diff --git a/Makefile.in b/Makefile.in +index 7a7b8b2..19ae920 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -106,6 +106,9 @@ install: install_4Pane + @if test $(symlink) = yes || test $(symlink) = install_only ; then \ + ln -fs 4Pane $(DESTDIR)$(bindir)/4pane ;\ + fi; ++ @if test -d /usr/share/appdata/ ; then \ ++ cp $(DESTDIR)4Pane.appdata.xml /usr/share/appdata/ ;\ ++ fi; + @if test $(desktop) = yes || test $(desktop) = install_only ; then \ + if test -d ~/Desktop/ ; then \ + cp -up rc/4Pane.desktop ~/Desktop/4Pane.desktop ;\ +@@ -142,6 +145,7 @@ uninstall: uninstall_4Pane + @if test $(symlink) = yes || test $(symlink) = uninstall_only; then \ + rm -f $(DESTDIR)$(bindir)/4pane ;\ + fi; ++ @rm -f /usr/share/appdata/4Pane.appdata.xml ; + @if test $(desktop) = yes || test $(desktop) = uninstall_only; then \ + rm -f ~/Desktop/4Pane.desktop ;\ + fi; +-- +2.1.0 + diff --git a/4Pane-HEAD-0004-Correct-the-use-of-DESTDIR-in-the-last-commit.patch b/4Pane-HEAD-0004-Correct-the-use-of-DESTDIR-in-the-last-commit.patch new file mode 100644 index 0000000..7ba7cbf --- /dev/null +++ b/4Pane-HEAD-0004-Correct-the-use-of-DESTDIR-in-the-last-commit.patch @@ -0,0 +1,78 @@ +From 1147a5bfa2283df5b98df01c6174203b801e04ea Mon Sep 17 00:00:00 2001 +From: dghart +Date: Fri, 19 Dec 2014 12:34:08 +0000 +Subject: [PATCH 4/4] Correct the use of DESTDIR in the last commit + +--- + .build/4Pane.bkl | 17 +++++++++-------- + Makefile.in | 5 +++-- + 2 files changed, 12 insertions(+), 10 deletions(-) + +diff --git a/.build/4Pane.bkl b/.build/4Pane.bkl +index 8b184da..f018318 100755 +--- a/.build/4Pane.bkl ++++ b/.build/4Pane.bkl +@@ -136,9 +136,9 @@ + + + +- ifneq ($(BZIP2_FLAGS),-DUSE_SYSTEM_BZIP2) +- $(fileList(['sdk/bzip/*.c'])) +- endif ++ ifneq ($(BZIP2_FLAGS),-DUSE_SYSTEM_BZIP2) ++ $(fileList(['sdk/bzip/*.c'])) ++ endif + + + $(BINDIR) +@@ -156,7 +156,8 @@ + + + @if test -d /usr/share/appdata/ ; then \ +- cp $(DESTDIR)4Pane.appdata.xml /usr/share/appdata/ ;\ ++ $(INSTALL_DIR) $(DESTDIR)/usr/share/appdata/ ;\ ++ cp 4Pane.appdata.xml $(DESTDIR)/usr/share/appdata/ ;\ + fi; + + +@@ -177,10 +178,10 @@ + rm -f $(DESTDIR)$(BINDIR)/4pane ;\ + fi; + +- +- @rm -f /usr/share/appdata/4Pane.appdata.xml ; +- +- ++ ++ @rm -f $(DESTDIR)/usr/share/appdata/4Pane.appdata.xml ; ++ ++ + @if test $(desktop) = yes || test $(desktop) = uninstall_only; then \ + rm -f ~/Desktop/4Pane.desktop ;\ + fi; +diff --git a/Makefile.in b/Makefile.in +index 19ae920..c11e531 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -107,7 +107,8 @@ install: install_4Pane + ln -fs 4Pane $(DESTDIR)$(bindir)/4pane ;\ + fi; + @if test -d /usr/share/appdata/ ; then \ +- cp $(DESTDIR)4Pane.appdata.xml /usr/share/appdata/ ;\ ++ $(INSTALL_DIR) $(DESTDIR)/usr/share/appdata/ ;\ ++ cp 4Pane.appdata.xml $(DESTDIR)/usr/share/appdata/ ;\ + fi; + @if test $(desktop) = yes || test $(desktop) = install_only ; then \ + if test -d ~/Desktop/ ; then \ +@@ -145,7 +146,7 @@ uninstall: uninstall_4Pane + @if test $(symlink) = yes || test $(symlink) = uninstall_only; then \ + rm -f $(DESTDIR)$(bindir)/4pane ;\ + fi; +- @rm -f /usr/share/appdata/4Pane.appdata.xml ; ++ @rm -f $(DESTDIR)/usr/share/appdata/4Pane.appdata.xml ; + @if test $(desktop) = yes || test $(desktop) = uninstall_only; then \ + rm -f ~/Desktop/4Pane.desktop ;\ + fi; +-- +2.1.0 + 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-d8b74e4-tmp-file-name.patch b/4Pane-d8b74e4-tmp-file-name.patch deleted file mode 100644 index 2a6d152..0000000 --- a/4Pane-d8b74e4-tmp-file-name.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit d8b74e4df86fb526ee9caad284b9eb3efe528ac5 -Author: dghart -Date: Thu Jan 9 14:14:10 2025 +0000 - - When previewing an svg file, make the string name unguessable; see https://sourceforge.net/p/fourpane/bugs/22/ - - Previewing an svg called foo.svg was creating (briefly) in /tmp a file predictably called foo.png. This might have allowed an attacker to overwrite genuine files. Prevent this by prepending a random string to each name. - -diff --git a/MyTreeCtrl.cpp b/MyTreeCtrl.cpp -index fd19465..d82cfc8 100644 ---- a/MyTreeCtrl.cpp -+++ b/MyTreeCtrl.cpp -@@ -1890,15 +1890,20 @@ void PreviewPopup::DisplayImage(const wxString& fpath) - { - wxLogNull NoErrorMessages; - wxString filepath(fpath); --wxString pngfilepath; -+wxString pngfilepath, rndstr; - wxImage image; - - if (filepath.Right(4) == ".svg") - { void* handle = wxGetApp().GetRsvgHandle(); - if (!handle) return; // Presumably librsvg is not available at present - -- wxFileName fn(filepath); // Create a filepath in /tmp/ to store the .png -- pngfilepath = "/tmp/" + fn.GetName() + ".png"; -+ // Create a filepath in /tmp/ to store the .png -+ rndstr = ""; srand(time(NULL)); -+ wxString allowedchars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; -+ for (size_t n=0; n < 9; ++n) // Make the string name unguessable; see https://sourceforge.net/p/fourpane/bugs/22/ -+ rndstr << wxString::Format("%c", allowedchars[(char)(rand() % 52)]); -+ wxFileName fn(filepath); -+ pngfilepath = "/tmp/" + rndstr + fn.GetName() + ".png"; - if (SvgToPng(filepath, pngfilepath, handle)) - image = wxImage(pngfilepath); - wxRemoveFile(pngfilepath); diff --git a/4Pane.spec b/4Pane.spec index 0d951c8..9db0986 100644 --- a/4Pane.spec +++ b/4Pane.spec @@ -7,32 +7,28 @@ %define _docdir_fmt %{NAME} Name: 4Pane -Version: 8.0 -Release: 14%{?dist} +Version: 3.0 +Release: 6%{?dist} Summary: Multi-pane, detailed-list file manager -# Overall GPL-3.0-only -# 4Pane.appdata.xml CC0-1.0 -# Accelerators.cpp and etc LGPL-2.0-or-later (wxWindows) -# sdk/bzip/LICENSE bzip2-1.0.6 (unused) -# SPDX confirmed -License: GPL-3.0-only AND LGPL-2.0-or-later AND CC0-1.0 +License: GPLv3 URL: http://www.4pane.co.uk/ Source0: http://downloads.sourceforge.net/fourpane/4pane-%{version}.tar.gz -# https://sourceforge.net/p/fourpane/bugs/22/ -# https://sourceforge.net/p/fourpane/git4pane/ci/d8b74e4df86fb526ee9caad284b9eb3efe528ac5/ -# Make files under /tmp unpredictable -Patch0: 4Pane-d8b74e4-tmp-file-name.patch +# https://sourceforge.net/p/fourpane/discussion/767206/thread/9daf0cda/ +Patch1: 4Pane-HEAD-0001-When-getting-a-pointer-to-a-menubar-menu-don-t-searc.patch +# http://sourceforge.net/p/fourpane/feature-requests/9/ +Patch2: 4Pane-HEAD-0002-Add-the-man-page-to-git.patch +# http://sourceforge.net/p/fourpane/feature-requests/10/ +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: gcc-c++ BuildRequires: bzip2-devel BuildRequires: xz-devel -BuildRequires: wxGTK-devel -BuildRequires: /usr/bin/desktop-file-install -BuildRequires: /usr/bin/appstream-util -BuildRequires: gettext +BuildRequires: wxGTK3-devel +BuildRequires: desktop-file-utils BuildRequires: git -BuildRequires: make %description 4Pane is a multi-pane, detailed-list file manager. It is designed @@ -46,9 +42,7 @@ tools. %prep %setup -q -n 4pane-%{version} -%patch -P0 -p1 -b .tmpfile -%if 0 cat > .gitignore </dev/null || : + +%postun +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang %license LICENCE @@ -112,123 +120,15 @@ appstream-util validate-relax --nonet \ %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* -%{_datadir}/metainfo/%{name}.appdata.xml +%if 0%{?fedora} >= 21 +%{_datadir}/appdata/%{name}.appdata.xml +%endif %{_datadir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}* %changelog -* Fri Jan 16 2026 Fedora Release Engineering - 8.0-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Wed Jul 23 2025 Fedora Release Engineering - 8.0-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon Jan 20 2025 Fedora Release Engineering - 8.0-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Thu Jan 16 2025 Fedora Release Engineering - 8.0-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Jan 10 2025 Mamoru TASAKA - 8.0-10 -- Upstream fix to make files under /tmp unpredictable - -* Wed Jul 17 2024 Fedora Release Engineering - 8.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jan 26 2024 Mamoru TASAKA - 8.0-8 -- SPDX migration - -* Mon Jan 22 2024 Fedora Release Engineering - 8.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 8.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Jan 18 2024 Fedora Release Engineering - 8.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jul 19 2023 Fedora Release Engineering - 8.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed Jan 18 2023 Fedora Release Engineering - 8.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Nov 25 2022 Mamoru TASAKA - 8.0-2 -- 8.0 - -* Thu Aug 04 2022 Scott Talbert - 7.0-6 -- Rebuild with wxWidgets 3.2 - -* Wed Jul 20 2022 Fedora Release Engineering - 7.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jan 19 2022 Fedora Release Engineering - 7.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Jul 21 2021 Fedora Release Engineering - 7.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Jan 25 2021 Fedora Release Engineering - 7.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Tue Dec 8 2020 Mamoru TASAKA - 7.0-1 -- 7.0 - -* Mon Jul 27 2020 Fedora Release Engineering - 6.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jan 28 2020 Fedora Release Engineering - 6.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Mon Dec 30 2010 Mamoru TASAKA - 6.0-1 -- 6.0 - -* Wed Jul 24 2019 Fedora Release Engineering - 5.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Thu Jan 31 2019 Fedora Release Engineering - 5.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Jul 12 2018 Fedora Release Engineering - 5.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 07 2018 Fedora Release Engineering - 5.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sun Jan 07 2018 Igor Gnatenko - 5.0-4 -- Remove obsolete scriptlets - -* Wed Aug 02 2017 Fedora Release Engineering - 5.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 5.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Wed Jul 19 2017 Mamoru TASAKA - 5.0-1 -- 5.0 - -* Fri Feb 10 2017 Fedora Release Engineering - 4.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Sun Jun 19 2016 Mamoru TASAKA - 4.0-2 -- Patch from the upstream to fix sizing and color issue with - GTK 3.20 (bug 1345924) - -* Thu Apr 07 2016 Mamoru TASAKA - 4.0-1 -- 4.0 -- Enable hardened build again - -* Wed Feb 03 2016 Fedora Release Engineering - 3.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jun 16 2015 Fedora Release Engineering - 3.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Mon May 4 2015 Mamoru TASAKA - 3.0-7 -- Kill hardened build, does not build - * Mon Dec 22 2014 Mamoru TASAKA - 3.0-6 - Patch for toolbar issue, requested by the upstream diff --git a/sources b/sources index 06a96ed..2ba50da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (4pane-8.0.tar.gz) = 65c7575a08b9dad28c86a71c30c7671ebaf80cd7f89a81b94402ea3a522f0d9922221ac0f0714b851839d51cca70b8905fb109469aab254f2b574863be537fa8 +396f968e3cd77c0d8f56c3d687b9ee32 4pane-3.0.tar.gz