Skip to content

Commit b3dd346

Browse files
committed
fixes #8, #9, #10
1 parent ccfa6e2 commit b3dd346

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

data/livetikz.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ MimeType=text/x-pgf;text/x-tex;
77
Exec=livetikz %f
88
Icon=livetikz.png
99
Terminal=false
10-
Categories=Office;Editor;
10+
Categories=Office;Development;Science;
1111
Keywords=TikZ;LaTeX;editor;

dist/livetikz_0.3_amd64.deb

784 Bytes
Binary file not shown.

mainwindow.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,11 @@ MainWindow::MainWindow() : currentDoc(NULL), renderProcess(NULL), currentPage(0)
263263
dir = NULL;
264264
templateFile = QUrl(settings.value("template", "").toString());
265265
updateTemplate(templateFile.path());
266-
templateLabel->setText(templateFile.url(QUrl::PreferLocalFile));
266+
if(templateFile.url(QUrl::PreferLocalFile) == "") {
267+
templateLabel->setText("<internal template>");
268+
} else {
269+
templateLabel->setText(templateFile.url(QUrl::PreferLocalFile));
270+
}
267271

268272
texfileWatcher = NULL;
269273

@@ -493,7 +497,7 @@ void MainWindow::updateTemplate(const QString& filename) {
493497
}
494498

495499
void MainWindow::browse() {
496-
QUrl newTemplateFile = QFileDialog::getOpenFileUrl(this, QString("Open template"));
500+
QUrl newTemplateFile = QFileDialog::getOpenFileUrl(this, QString("Open template"), QUrl::fromLocalFile("/usr/share/livetikz/"));
497501
if (newTemplateFile.fileName() != "") {
498502
QString filename = newTemplateFile.url(QUrl::PreferLocalFile);
499503
templateLabel->setText(filename);

makedeb.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ if test `whoami` != "root"; then echo "You need to run this target using fakeroo
33
mkdir -pv livetikz/usr/bin
44
mkdir -pv livetikz/usr/share/doc/livetikz/
55
mkdir -pv livetikz/usr/share/man/man1/
6+
mkdir -pv livetikz/usr/share/applications/
7+
mkdir -pv livetikz/usr/share/icons/hicolor/256x256/apps
8+
mkdir -pv livetikz/usr/share/livetikz
69
cp build/livetikz livetikz/usr/bin
710
strip livetikz/usr/bin/livetikz
811
mkdir -p livetikz/DEBIAN
@@ -11,11 +14,16 @@ echo "initial version" > livetikz/usr/share/doc/livetikz/changelog
1114
echo "Copyright 2020, Michael Schwarz" > livetikz/usr/share/doc/livetikz/copyright
1215
gzip -c -9 -n livetikz/usr/share/doc/livetikz/changelog > livetikz/usr/share/doc/livetikz/changelog.gz
1316
gzip -c -9 -n docs/livetikz.1 > livetikz/usr/share/man/man1/livetikz.1.gz
17+
cp data/livetikz.desktop livetikz/usr/share/applications/
18+
cp data/livetikz.png livetikz/usr/share/icons/hicolor/256x256/apps
1419
rm livetikz/usr/share/doc/livetikz/changelog
20+
cp data/templates/* livetikz/usr/share/livetikz/
1521
chmod -R 0755 livetikz/usr
16-
chmod 0644 livetikz/usr/share/doc/livetikz/copyright
17-
chmod 0644 livetikz/usr/share/doc/livetikz/changelog.gz
22+
chmod 0644 livetikz/usr/share/doc/livetikz/*
1823
chmod 0644 livetikz/usr/share/man/man1/livetikz.1.gz
24+
chmod 0644 livetikz/usr/share/icons/hicolor/256x256/apps/*
25+
chmod 0644 livetikz/usr/share/applications/*
26+
chmod 0644 livetikz/usr/share/livetikz/*
1927
chown -R root:root livetikz/
2028
dpkg-deb --build livetikz
2129
rm -rf livetikz

0 commit comments

Comments
 (0)