Skip to content

Instantly share code, notes, and snippets.

@jscinoz
Last active December 18, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jscinoz/5796284 to your computer and use it in GitHub Desktop.
Save jscinoz/5796284 to your computer and use it in GitHub Desktop.
Treesheets (http://www.treesheets.com) Ebuild
--- src/system.h
+++ src/system.h
@@ -169,7 +169,7 @@
void LoadTut()
{
- LoadDB(frame->exepath+L"/examples/tutorial.cts");
+ LoadDB(L"/usr/share/treesheets/examples/tutorial.cts");
}
Cell *&InitDB(int sizex, int sizey = 0)
--- src/myframe.h
+++ src/myframe.h
@@ -72,8 +72,8 @@
wxIconBundle icons;
wxIcon iconbig;
- icon .LoadFile(exepath+L"/images/icon16.png", wxBITMAP_TYPE_PNG);
- iconbig.LoadFile(exepath+L"/images/icon32.png", wxBITMAP_TYPE_PNG);
+ icon .LoadFile(L"/usr/share/treesheets/images/icon16.png", wxBITMAP_TYPE_PNG);
+ iconbig.LoadFile(L"/usr/share/treesheets/images/icon32.png", wxBITMAP_TYPE_PNG);
#ifdef WIN32
int iconsmall = ::GetSystemMetrics(SM_CXSMICON);
int iconlarge = ::GetSystemMetrics(SM_CXICON);
@@ -84,9 +84,9 @@
icons.AddIcon(iconbig);
SetIcons(icons);
- if(!line_nw.LoadFile(exepath+L"/images/render/line_nw.png", wxBITMAP_TYPE_PNG) ||
- !line_sw.LoadFile(exepath+L"/images/render/line_sw.png", wxBITMAP_TYPE_PNG) ||
- !foldicon.LoadFile(exepath+L"/images/nuvola/fold.png"))
+ if(!line_nw.LoadFile(L"/usr/share/treesheets/images/render/line_nw.png", wxBITMAP_TYPE_PNG) ||
+ !line_sw.LoadFile(L"/usr/share/treesheets/images/render/line_sw.png", wxBITMAP_TYPE_PNG) ||
+ !foldicon.LoadFile(L"/usr/share/treesheets/images/nuvola/fold.png"))
{
wxMessageBox(L"Error loading core data file (TreeSheets not installed correctly?)", L"Initialization Error", wxOK, this);
// FIXME: what is the correct way to exit?
@@ -462,7 +462,7 @@
#define SEPARATOR tb->AddSeparator()
#endif
- wxString iconpath = exepath + (iconset ? L"/images/webalys/toolbar/" : L"/images/nuvola/toolbar/");
+ wxString iconpath = wxString(L"/usr/share/treesheets") + (iconset ? L"/images/webalys/toolbar/" : L"/images/nuvola/toolbar/");
tb->SetToolBitmapSize(iconset ? wxSize(18, 18) : wxSize(22, 22));
AddTBIcon(tb, L"New (CTRL+n)", A_NEW, iconpath+L"filenew.png");
@@ -498,7 +498,7 @@
tb->AddControl(new ColorDropdown(tb, A_BORDCOLOR, 6));
tb->AddSeparator();
tb->AddControl(new wxStaticText(tb, wxID_ANY, L"Image "));
- wxString imagepath = exepath + L"/images/nuvola/dropdown/";
+ wxString imagepath = L"/usr/share/treesheets/images/nuvola/dropdown/";
idd = new ImageDropdown(tb, imagepath);
tb->AddControl(idd);
tb->Realize();
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit eutils git-2 wxwidgets
DESCRIPTION="Open source free form data organizer"
HOMEPAGE="http://www.treesheets.com"
EGIT_REPO_URI="git://github.com/aardappel/treesheets.git"
LICENSE="ZLIB"
SLOT="0"
DEPEND="x11-libs/wxGTK:2.9[X]"
RDEPEND="${DEPEND}"
WX_GTK_VER="2.9"
src_prepare() {
epatch "${FILESDIR}/${P}-fixpaths.patch"
}
src_compile() {
$(tc-getCXX) $(wx-config --cxxflags --libs all) ${CXXFLAGS} \
-o TS/treesheets src/*.cpp || die "Compile failed!"
}
src_install() {
dobin TS/treesheets
dodoc TS/docs/*.txt
dohtml -r TS/docs/{images,*.html}
dodir /usr/share/treesheets
insinto /usr/share/treesheets
doins -r TS/{examples,images}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment