Hello,

I've prepared a new version of tagaini jisho and wrote a small patch to
disable the autocheck for new versions (#673118). Upstream has fixed the
layout glitch in the preferences windows three years ago already (#672718)

The diff of the debian dir is attached to this mail. I've used the plan
.tar.gz from the tagaini jisho website and simply renamed it to
tagainijisho_1.0.3.orig.tar.gz

Copy the debian dir from 1.0.2-1 and apply the attached patch. Feel free
to modify it to your needs.

Greetings
Patrick
diff -Nurwd tagainijisho-1.0.2/debian/changelog tagainijisho-1.0.3/debian/changelog
--- tagainijisho-1.0.2/debian/changelog	2014-04-18 11:17:56.000000000 +0200
+++ tagainijisho-1.0.3/debian/changelog	2016-01-24 17:14:14.459767987 +0100
@@ -1,3 +1,11 @@
+tagainijisho (1.0.3-1) unstable; urgency=medium
+
+  * New upstream release (Closes: #801599) 
+  * GUI Bugs are fixed upstream (Closes: #672718)
+  * Update Check is disabled (Closes: #673118)
+
+ -- Patrick Winnertz <win...@debian.org>  Sat, 23 Jan 2016 18:47:39 +0100
+
 tagainijisho (1.0.2-1) unstable; urgency=medium
 
   * New upstream release
diff -Nurwd tagainijisho-1.0.2/debian/patches/remove-update-check.patch tagainijisho-1.0.3/debian/patches/remove-update-check.patch
--- tagainijisho-1.0.2/debian/patches/remove-update-check.patch	1970-01-01 01:00:00.000000000 +0100
+++ tagainijisho-1.0.3/debian/patches/remove-update-check.patch	2016-01-24 17:28:43.038879272 +0100
@@ -0,0 +1,366 @@
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ tagainijisho (1.0.3-1) unstable; urgency=medium
+ .
+   * New upstream release (Closes: #801599)
+   * GUI Bugs are fixed upstream (Closes: #672718)
+   * Update Check is disabled (Closes: #673118)
+Author: Patrick Winnertz <win...@debian.org>
+Bug-Debian: https://bugs.debian.org/672718
+Bug-Debian: https://bugs.debian.org/673118
+Bug-Debian: https://bugs.debian.org/801599
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+Index: tagainijisho-1.0.3/src/gui/GeneralPreferences.ui
+===================================================================
+--- tagainijisho-1.0.3.orig/src/gui/GeneralPreferences.ui
++++ tagainijisho-1.0.3/src/gui/GeneralPreferences.ui
+@@ -123,59 +123,6 @@
+     </widget>
+    </item>
+    <item>
+-    <widget class="QGroupBox" name="updatesGroupBox">
+-     <property name="title">
+-      <string>Updates</string>
+-     </property>
+-     <layout class="QVBoxLayout" name="verticalLayout_2">
+-      <item>
+-       <layout class="QHBoxLayout" name="horizontalLayout">
+-        <item>
+-         <widget class="QCheckBox" name="checkForUpdates">
+-          <property name="text">
+-           <string>Check for updates</string>
+-          </property>
+-         </widget>
+-        </item>
+-        <item>
+-         <widget class="QSpinBox" name="checkInterval">
+-          <property name="specialValueText">
+-           <string>every day</string>
+-          </property>
+-          <property name="suffix">
+-           <string> days</string>
+-          </property>
+-          <property name="prefix">
+-           <string>every </string>
+-          </property>
+-          <property name="minimum">
+-           <number>1</number>
+-          </property>
+-          <property name="maximum">
+-           <number>365</number>
+-          </property>
+-         </widget>
+-        </item>
+-       </layout>
+-      </item>
+-      <item>
+-       <widget class="QCheckBox" name="checkForBetaUpdates">
+-        <property name="text">
+-         <string>Also check for development versions</string>
+-        </property>
+-       </widget>
+-      </item>
+-      <item>
+-       <widget class="QLabel" name="nextCheck">
+-        <property name="text">
+-         <string>Next check:</string>
+-        </property>
+-       </widget>
+-      </item>
+-     </layout>
+-    </widget>
+-   </item>
+-   <item>
+     <widget class="QGroupBox" name="advancedGroupBox">
+      <property name="title">
+       <string>Entries cache (advanced)</string>
+@@ -227,9 +174,6 @@
+   <tabstop>guiLanguage</tabstop>
+   <tabstop>dictLanguage</tabstop>
+   <tabstop>firstDayOfWeek</tabstop>
+-  <tabstop>checkForUpdates</tabstop>
+-  <tabstop>checkInterval</tabstop>
+-  <tabstop>checkForBetaUpdates</tabstop>
+   <tabstop>cacheSizeDefault</tabstop>
+   <tabstop>cacheSize</tabstop>
+  </tabstops>
+Index: tagainijisho-1.0.3/src/gui/MainWindow.cc
+===================================================================
+--- tagainijisho-1.0.3.orig/src/gui/MainWindow.cc
++++ tagainijisho-1.0.3/src/gui/MainWindow.cc
+@@ -57,19 +57,19 @@
+ #define MAINWINDOW_STATE_VERSION 0
+ 
+ MainWindow *MainWindow::_instance = 0;
+-UpdateChecker *_updateChecker = 0;
+-UpdateChecker *_betaUpdateChecker = 0;
++//UpdateChecker *_updateChecker = 0;
++//UpdateChecker *_betaUpdateChecker = 0;
+ 
+ PreferenceItem<QString> MainWindow::applicationFont("mainWindow", "defaultFont", "");
+-PreferenceItem<bool> MainWindow::autoCheckUpdates("mainWindow", "autoCheckUpdates", true);
+-PreferenceItem<bool> MainWindow::autoCheckBetaUpdates("mainWindow", "autoCheckBetaUpdates", false);
+-PreferenceItem<int> MainWindow::updateCheckInterval("mainWindow", "updateCheckInterval", 3);
++//PreferenceItem<bool> MainWindow::autoCheckUpdates("mainWindow", "autoCheckUpdates", true);
++//PreferenceItem<bool> MainWindow::autoCheckBetaUpdates("mainWindow", "autoCheckBetaUpdates", false);
++//PreferenceItem<int> MainWindow::updateCheckInterval("mainWindow", "updateCheckInterval", 3);
+ 
+ PreferenceItem<QByteArray> MainWindow::windowGeometry("mainWindow", "geometry", "");
+ PreferenceItem<QByteArray> MainWindow::windowState("mainWindow", "state", "");
+ 
+-PreferenceItem<QDateTime> MainWindow::lastUpdateCheck("mainWindow", "lastUpdateCheck", QDateTime(QDate(2000, 1, 1)));
+-PreferenceItem<bool> MainWindow::donationReminderDisplayed("mainWindow", "donationReminderDisplayed", false, true);
++//PreferenceItem<QDateTime> MainWindow::lastUpdateCheck("mainWindow", "lastUpdateCheck", QDateTime(QDate(2000, 1, 1)));
++//PreferenceItem<bool> MainWindow::donationReminderDisplayed("mainWindow", "donationReminderDisplayed", false, true);
+ PreferenceItem<QDateTime> MainWindow::firstRunTime("mainWindow", "firstRunTime", QDateTime::currentDateTime(), true);
+ 
+ DockTitleBar::DockTitleBar(QWidget *widget, QDockWidget *parent) : QWidget(parent)
+@@ -115,25 +115,25 @@ MainWindow::MainWindow(QWidget *parent)
+ 	setupListWidget();
+ 	
+ 	// Updates checker
+-	_updateChecker = new UpdateChecker("/updates/latestversion.php", this);
+-	_betaUpdateChecker = new UpdateChecker("/updates/latestbetaversion.php", this);
++	//_updateChecker = new UpdateChecker("/updates/latestversion.php", this);
++	//_betaUpdateChecker = new UpdateChecker("/updates/latestbetaversion.php", this);
+ 	// Message has to be queued here because of a bug in Qt 4.4 that will
+ 	// make the QHttp::requestFinished signal being emitted twice if the
+ 	// slot does not return after a couple of seconds. This problem should be
+ 	// fixed in Qt 4.5.
+-	connect(_updateChecker, SIGNAL(updateAvailable(const QString &)),
+-		this, SLOT(updateAvailable(const QString &)), Qt::QueuedConnection);
+-	connect(_betaUpdateChecker, SIGNAL(updateAvailable(const QString &)),
+-		this, SLOT(betaUpdateAvailable(const QString &)), Qt::QueuedConnection);
+-	connect(&_updateTimer, SIGNAL(timeout()), this, SLOT(updateCheck()));
++	//connect(_updateChecker, SIGNAL(updateAvailable(const QString &)),
++	//	this, SLOT(updateAvailable(const QString &)), Qt::QueuedConnection);
++	//connect(_betaUpdateChecker, SIGNAL(updateAvailable(const QString &)),
++	//	this, SLOT(betaUpdateAvailable(const QString &)), Qt::QueuedConnection);
++	//connect(&_updateTimer, SIGNAL(timeout()), this, SLOT(updateCheck()));
+ 	// Check every 10 minutes if the update check delay expired
+-	_updateTimer.setInterval(600000);
+-	_updateTimer.setSingleShot(false);
+-	_updateTimer.start();
++	//_updateTimer.setInterval(600000);
++	//_updateTimer.setSingleShot(false);
++	//_updateTimer.start();
+ 
+ 	// And perform our startup checks
+-	donationReminderCheck();
+-	updateCheck();
++	//donationReminderCheck();
++	//updateCheck();
+ }
+ 
+ void MainWindow::closeEvent(QCloseEvent *event)
+@@ -196,40 +196,6 @@ void MainWindow::setupClipboardSearchSho
+ 	_searchMenu->addAction(_enableClipboardInputAction);
+ }
+ 
+-void MainWindow::updateCheck()
+-{
+-	if (autoCheckUpdates.value()) {
+-		QDateTime dt(lastUpdateCheck.value());
+-		if (!dt.isValid() || dt.addDays(updateCheckInterval.value()) <= QDateTime::currentDateTime()) {
+-			_updateChecker->checkForUpdates();
+-			if (autoCheckBetaUpdates.value()) _betaUpdateChecker->checkForUpdates();
+-			lastUpdateCheck.set(QDateTime::currentDateTime());
+-		}
+-	}
+-}
+-
+-void MainWindow::donationReminderCheck()
+-{
+-	if (!donationReminderDisplayed.value()) {
+-		// Display the reminder if two weeks passed since the first usage
+-		if (QDateTime::currentDateTime() > firstRunTime.value().addDays(14)) {
+-			QMessageBox messageBox(QMessageBox::Information, tr("Please consider supporting Tagaini Jisho"),
+-					tr("You have now been using Tagaini Jisho for a short while. If you like it, please show your support by making a donation that expresses your appreciation of this software. While Tagaini is free, its development has a cost and your support will have a positive influence on its future. You can donate via Paypal or credit card.\n\nThis message is a one-time reminder and will not appear anymore - you can still donate later by choosing the corresponding option in the Help menu."),
+-					QMessageBox::NoButton, this);
+-			QPushButton donateButton(tr("Donate!"));
+-			donateButton.setIcon(QIcon(QPixmap(":/images/icons/donate.png")));
+-			messageBox.addButton(&donateButton, QMessageBox::AcceptRole);
+-			QPushButton laterButton(tr("Nah"));
+-			messageBox.addButton(&laterButton, QMessageBox::RejectRole);
+-			if (messageBox.exec() == QMessageBox::AcceptRole) {
+-				donate();
+-			}
+-			
+-			donationReminderDisplayed.setValue(true);
+-		}
+-	}
+-}
+-
+ void MainWindow::exportUserData()
+ {
+ 	QString to(QFileDialog::getSaveFileName(this, tr("Export user data..."), "export.dat"));
+@@ -349,36 +315,6 @@ void MainWindow::askQuestion()
+ 	QDesktopServices::openUrl(QUrl("http://groups.google.com/group/tagaini-jisho";));
+ }
+ 
+-void MainWindow::updateAvailable(const QString &version)
+-{
+-	QMessageBox messageBox(QMessageBox::Information, tr("An update is available!"),
+-			tr("Version %1 of Tagaini Jisho is available. Do you want to download it now?").arg(version),
+-			QMessageBox::NoButton, this);
+-	QPushButton downloadButton(tr("Let's go!"));
+-	messageBox.addButton(&downloadButton, QMessageBox::AcceptRole);
+-	QPushButton laterButton(tr("Maybe later"));
+-	messageBox.addButton(&laterButton, QMessageBox::RejectRole);
+-	if (messageBox.exec() == QMessageBox::AcceptRole) {
+-		QDesktopServices::openUrl(QUrl("http://www.tagaini.net/download";));
+-	}
+-	_updateTimer.stop();
+-}
+-
+-void MainWindow::betaUpdateAvailable(const QString &version)
+-{
+-	QMessageBox messageBox(QMessageBox::Information, tr("A development update is available!"),
+-			tr("Development version %1 of Tagaini Jisho is available. Do you want to download it now?").arg(version),
+-			QMessageBox::NoButton, this);
+-	QPushButton downloadButton(tr("Let's go!"));
+-	messageBox.addButton(&downloadButton, QMessageBox::AcceptRole);
+-	QPushButton laterButton(tr("Maybe later"));
+-	messageBox.addButton(&laterButton, QMessageBox::RejectRole);
+-	if (messageBox.exec() == QMessageBox::AcceptRole) {
+-		QDesktopServices::openUrl(QUrl("http://www.tagaini.net/download";));
+-	}
+-	_updateTimer.stop();
+-}
+-
+ void MainWindow::populateMenu(QMenu *menu, int parentId)
+ {
+ 	SQLite::Query query(Database::connection());
+Index: tagainijisho-1.0.3/src/gui/MainWindow.h
+===================================================================
+--- tagainijisho-1.0.3.orig/src/gui/MainWindow.h
++++ tagainijisho-1.0.3/src/gui/MainWindow.h
+@@ -105,10 +105,6 @@ protected slots:
+ 	void bugReport();
+ 	void featureRequest();
+ 	void askQuestion();
+-	void updateAvailable(const QString &version);
+-	void betaUpdateAvailable(const QString &version);
+-	void updateCheck();
+-	void donationReminderCheck();
+ 
+ 	void populateSavedSearchesMenu();
+ 	void populateSubMenu();
+@@ -131,13 +127,13 @@ public:
+ 	QMenu *helpMenu() { return _helpMenu; }
+ 
+ 	static PreferenceItem<QString> applicationFont;
+-	static PreferenceItem<bool> autoCheckUpdates;
+-	static PreferenceItem<bool> autoCheckBetaUpdates;
+-	static PreferenceItem<int> updateCheckInterval;
+-	static PreferenceItem<QDateTime> lastUpdateCheck;
++	//static PreferenceItem<bool> autoCheckUpdates;
++	//static PreferenceItem<bool> autoCheckBetaUpdates;
++	//static PreferenceItem<int> updateCheckInterval;
++	//static PreferenceItem<QDateTime> lastUpdateCheck;
+ 	// Keep track of when the user started the program for the first time
+ 	// so that we can bother him with a donation reminder
+-	static PreferenceItem<bool> donationReminderDisplayed;
++	//static PreferenceItem<bool> donationReminderDisplayed;
+ 	static PreferenceItem<QDateTime> firstRunTime;
+ 	
+ 	SearchWidget *searchWidget() { return _searchWidget; }
+Index: tagainijisho-1.0.3/src/gui/PreferencesWindow.cc
+===================================================================
+--- tagainijisho-1.0.3.orig/src/gui/PreferencesWindow.cc
++++ tagainijisho-1.0.3/src/gui/PreferencesWindow.cc
+@@ -161,8 +161,8 @@ GeneralPreferences::GeneralPreferences(Q
+ 	firstDayOfWeek->addItem(tr("Monday"), Qt::Monday);
+ 	firstDayOfWeek->addItem(tr("Sunday"), Qt::Sunday);
+ 
+-	connect(checkForUpdates, SIGNAL(stateChanged(int)), this, SLOT(onCheckUpdatesChecked(int)));
+-	connect(checkInterval, SIGNAL(valueChanged(int)), this, SLOT(updateNextCheckLabel()));
++	//connect(checkForUpdates, SIGNAL(stateChanged(int)), this, SLOT(onCheckUpdatesChecked(int)));
++	//connect(checkInterval, SIGNAL(valueChanged(int)), this, SLOT(updateNextCheckLabel()));
+ 
+ 	connect(cacheSizeDefault, SIGNAL(toggled(bool)), this, SLOT(onCacheSizeDefaultChecked(bool)));
+ }
+@@ -187,36 +187,14 @@ void GeneralPreferences::refresh()
+ 
+ 	firstDayOfWeek->setCurrentIndex(firstDayOfWeek->findData(RelativeDate::firstDayOfWeek.value()));
+ 
+-	checkForUpdates->setChecked(MainWindow::autoCheckUpdates.value());
+-	checkForBetaUpdates->setChecked(MainWindow::autoCheckBetaUpdates.value());
+-	checkInterval->setValue(MainWindow::updateCheckInterval.value());
++	//checkForUpdates->setChecked(MainWindow::autoCheckUpdates.value());
++	//checkForBetaUpdates->setChecked(MainWindow::autoCheckBetaUpdates.value());
++	//checkInterval->setValue(MainWindow::updateCheckInterval.value());
+ 
+ 	cacheSize->setValue(EntriesCache::cacheSize.value());
+ 	cacheSizeDefault->setChecked(EntriesCache::cacheSize.isDefault());
+ }
+ 
+-void GeneralPreferences::onCheckUpdatesChecked(int checked)
+-{ 
+-	if (checked) {
+-		checkInterval->setEnabled(true);
+-	}
+-	else {
+-		checkInterval->setEnabled(false);
+-	}
+-	updateNextCheckLabel();	
+-}
+-
+-void GeneralPreferences::updateNextCheckLabel()
+-{
+-	QDateTime dt(MainWindow::lastUpdateCheck.value());
+-	int updateCheckInterval = checkInterval->value();
+-
+-	if (checkForUpdates->isChecked()) {
+-		nextCheck->setText(tr("Next check: %1").arg(dt.addDays(updateCheckInterval).toString()));
+-	} else {
+-		nextCheck->setText("");
+-	}
+-}
+ 
+ void GeneralPreferences::onCacheSizeDefaultChecked(bool checked)
+ {
+@@ -249,9 +227,9 @@ void GeneralPreferences::applySettings()
+ 	RelativeDate::firstDayOfWeek.set(static_cast<Qt::DayOfWeek>(firstDayOfWeek->itemData(firstDayOfWeek->currentIndex()).toInt()));
+ 
+ 	// Updates check
+-	MainWindow::autoCheckUpdates.set(checkForUpdates->isChecked());
+-	MainWindow::autoCheckBetaUpdates.set(checkForBetaUpdates->isChecked());
+-	MainWindow::updateCheckInterval.set(checkInterval->value());
++	//MainWindow::autoCheckUpdates.set(checkForUpdates->isChecked());
++	//MainWindow::autoCheckBetaUpdates.set(checkForBetaUpdates->isChecked());
++	//MainWindow::updateCheckInterval.set(checkInterval->value());
+ 
+ 	// Cache size
+ 	if (cacheSizeDefault->isChecked()) EntriesCache::cacheSize.reset();
+Index: tagainijisho-1.0.3/src/gui/PreferencesWindow.h
+===================================================================
+--- tagainijisho-1.0.3.orig/src/gui/PreferencesWindow.h
++++ tagainijisho-1.0.3/src/gui/PreferencesWindow.h
+@@ -89,8 +89,6 @@ public slots:
+ 	void applySettings();
+ 	void refresh();
+ 
+-	void onCheckUpdatesChecked(int checked);
+-	void updateNextCheckLabel();
+ 	void onCacheSizeDefaultChecked(bool checked);
+ 
+ public:
diff -Nurwd tagainijisho-1.0.2/debian/patches/series tagainijisho-1.0.3/debian/patches/series
--- tagainijisho-1.0.2/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ tagainijisho-1.0.3/debian/patches/series	2016-01-24 17:19:35.198488248 +0100
@@ -0,0 +1 @@
+remove-update-check.patch

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to