Browse Source

Version 0.91

Nikola Kotur 6 years ago
parent
commit
22e2cda947

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+2006-07-24 Nikola Kotur <kotnik@ns-linux.org
+
+	* Fixed non-existent dictionary crashing bug
+
 2006-02-24 Nikola Kotur <kotnik@ns-linux.org>
 
 	* Improved speed.

+ 1 - 1
Makefile.in

@@ -778,7 +778,7 @@ dist-hook:
 .NOEXPORT:
 
 #>+ 2
-KDE_DIST=stamp-h.in subdirs nkrecnik.kdevelop Makefile.in nkrecnik.kdevelop.pcs configure.files config.h.in configure.in Makefile.cvs aclocal.m4 Doxyfile nkrecnik.kdevses configure Makefile.am acinclude.m4 
+KDE_DIST=stamp-h.in subdirs nkrecnik.kdevelop Makefile.in nkrecnik.kdevelop.pcs configure.files config.h.in configure.in Makefile.cvs aclocal.m4 Doxyfile nkrecnik.kdevses Makefile.am configure acinclude.m4 
 
 #>+ 2
 docs-am:

+ 2 - 2
README

@@ -3,7 +3,7 @@ scroll to read instructions in English
 ---------------------------------------------------------------------------
 
 
-Ovo je izdanje 0.90 NK Recnika, englesko-srpskog i srpsko-engleskog recnika.
+Ovo je izdanje 0.91 NK Recnika, englesko-srpskog i srpsko-engleskog recnika.
 Copyright (C) 2004, Nikola Kotur <kotnik@ns-linux.org>
 
 NK Recnik je jednostavan englesko-srpski i srpsko-engleski recnik.
@@ -28,7 +28,7 @@ Pogledajte fajl INSTALL radi opsirnijeg objasnjenja. (look at INSTALL)
 =--------------------------------------------------------------------------
 
 
-This if release 0.90 of NK Recnik, English-Serbian and Serbian-English
+This if release 0.91 of NK Recnik, English-Serbian and Serbian-English
 dictionary.  Copyright (C) 2004, Nikola Kotur <kotnik@ns-linux.org>
 
 NK Recnik plain and simple English-Serbian and Serbian-English

+ 0 - 27
admin/CVS/Entries

@@ -1,27 +0,0 @@
-/ChangeLog/1.1.1.1/Mon Jun 28 15:45:34 2004//
-/Doxyfile.am/1.1.1.1/Mon Jun 28 15:45:34 2004//
-/Doxyfile.global/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/Makefile.common/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/acinclude.m4.in/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/am_edit/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/bcheck.pl/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/compile/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/conf.change.pl/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/config.guess/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/config.pl/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/config.sub/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/configure.in.bot.end/1.1.1.1/Mon Jun 28 15:45:34 2004//
-/configure.in.min/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/cvs-clean.pl/1.1.1.1/Mon Jun 28 15:45:34 2004//
-/cvs.sh/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/debianrules/1.1.1.1/Mon Jun 28 15:45:34 2004//
-/depcomp/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/detect-autoconf.sh/1.1.1.1/Mon Jun 28 15:45:34 2004//
-/install-sh/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/libtool.m4.in/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/ltmain.sh/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/missing/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/mkinstalldirs/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/nmcheck/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/ylwrap/1.1.1.1/Mon Jun 28 15:45:34 2004//
-D

+ 0 - 1
admin/CVS/Repository

@@ -1 +0,0 @@
-nkrecnik/admin

+ 0 - 1
admin/CVS/Root

@@ -1 +0,0 @@
-/usr/local/cvsroot/

+ 0 - 4
data/CVS/Entries

@@ -1,4 +0,0 @@
-/Makefile.am/1.2/Tue Jul 20 16:26:45 2004//
-/Makefile.in/1.2/Sat Aug 14 11:48:00 2004//
-/dict.dat/1.4/Fri Oct 15 16:11:53 2004//
-D

+ 0 - 1
data/CVS/Repository

@@ -1 +0,0 @@
-nkrecnik/data

+ 0 - 1
data/CVS/Root

@@ -1 +0,0 @@
-/usr/local/cvsroot/

+ 0 - 3
doc/CVS/Entries

@@ -1,3 +0,0 @@
-/Makefile.am/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/Makefile.in/1.1.1.1/Mon Jun 28 15:45:33 2004//
-D/en////

+ 0 - 1
doc/CVS/Repository

@@ -1 +0,0 @@
-nkrecnik/doc

+ 0 - 1
doc/CVS/Root

@@ -1 +0,0 @@
-/usr/local/cvsroot/

+ 0 - 4
doc/en/CVS/Entries

@@ -1,4 +0,0 @@
-/Makefile.am/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/Makefile.in/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/index.docbook/1.1.1.1/Mon Jun 28 15:45:33 2004//
-D

+ 0 - 1
doc/en/CVS/Repository

@@ -1 +0,0 @@
-nkrecnik/doc/en

+ 0 - 1
doc/en/CVS/Root

@@ -1 +0,0 @@
-/usr/local/cvsroot/

+ 1 - 1
nkrecnik.kdevelop

@@ -3,7 +3,7 @@
   <general>
     <author>Nikola Kotur</author>
     <email>kotnik@ns-linux.org</email>
-    <version>0.90</version>
+    <version>0.91</version>
     <projectmanagement>KDevKDEAutoProject</projectmanagement>
     <primarylanguage>C++</primarylanguage>
     <keywords>

BIN
nkrecnik.kdevelop.pcs


+ 7 - 13
nkrecnik.kdevses

@@ -1,22 +1,16 @@
 <?xml version = '1.0' encoding = 'UTF-8'?>
 <!DOCTYPE KDevPrjSession>
 <KDevPrjSession>
- <DocsAndViews NumberOfDocuments="5" >
-  <Doc0 NumberOfViews="1" URL="file:///home/kotnik/work/nkrecnik-0.90/src/mcdict.cpp" >
-   <View0 line="37" Type="Source" />
+ <DocsAndViews NumberOfDocuments="3" >
+  <Doc0 NumberOfViews="1" URL="file:///home/kotnik/projects/nkrecnik/src/mcdict.cpp" >
+   <View0 Type="Source" />
   </Doc0>
-  <Doc1 NumberOfViews="1" URL="file:///home/kotnik/work/nkrecnik-0.90/src/mcdict.h" >
-   <View0 line="60" Type="Source" />
+  <Doc1 NumberOfViews="1" URL="file:///home/kotnik/projects/nkrecnik/src/mcdict.h" >
+   <View0 Type="Source" />
   </Doc1>
-  <Doc2 NumberOfViews="1" URL="file:///home/kotnik/work/nkrecnik-0.90/src/nkrecnik.cpp" >
-   <View0 line="212" Type="Source" />
+  <Doc2 NumberOfViews="1" URL="file:///home/kotnik/projects/nkrecnik/src/nkrecnik.cpp" >
+   <View0 line="197" Type="Source" />
   </Doc2>
-  <Doc3 NumberOfViews="1" URL="file:///home/kotnik/work/nkrecnik-0.90/src/nkrecnik.h" >
-   <View0 line="69" Type="Source" />
-  </Doc3>
-  <Doc4 NumberOfViews="1" URL="file:///home/kotnik/recnik.c" >
-   <View0 line="70" Type="Source" />
-  </Doc4>
  </DocsAndViews>
  <pluginList>
   <kdevdebugger>

+ 0 - 4
po/CVS/Entries

@@ -1,4 +0,0 @@
-/Makefile.am/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/Makefile.in/1.2/Sat Aug 14 11:49:15 2004//
-/sr.po/1.2/Thu Jul 22 20:42:17 2004//
-D

+ 0 - 1
po/CVS/Repository

@@ -1 +0,0 @@
-nkrecnik/po

+ 0 - 1
po/CVS/Root

@@ -1 +0,0 @@
-/usr/local/cvsroot/

+ 0 - 16
src/CVS/Entries

@@ -1,16 +0,0 @@
-/hi16-app-nkrecnik.png/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/hi32-app-nkrecnik.png/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/main.cpp/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/nkrecnik.desktop/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/nkrecnik.lsm/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/nkrecnikui.rc/1.1.1.1/Mon Jun 28 15:45:33 2004//
-/Makefile.am/1.2/Tue Jul 13 12:46:25 2004//
-/Makefile.in/1.2/Sat Aug 14 11:50:59 2004//
-/mcconf.cpp/1.3/Thu Jul 22 14:32:42 2004//
-/mcconf.h/1.3/Thu Jul 22 14:32:27 2004//
-/mcdict.cpp/1.3/Thu Jul 22 16:29:34 2004//
-/mcdict.h/1.3/Tue Jul 20 17:38:56 2004//
-/nkrGUI.ui/1.3/Thu Jul 22 21:01:05 2004//
-/nkrecnik.cpp/1.3/Thu Jul 22 16:30:01 2004//
-/nkrecnik.h/1.3/Thu Jul 22 13:58:46 2004//
-D

+ 0 - 1
src/CVS/Repository

@@ -1 +0,0 @@
-nkrecnik/src

+ 0 - 1
src/CVS/Root

@@ -1 +0,0 @@
-/usr/local/cvsroot/

+ 4 - 4
src/Makefile.in

@@ -692,7 +692,7 @@ clean-metasources:
 	-rm -f  nkrecnik.moc
 
 #>+ 2
-KDE_DIST=Makefile.in nkrecnik.lsm nkrGUI.ui.h hi32-app-nkrecnik.png nkrecnikui.rc nkrGUI.ui nkrecnik.desktop Makefile.am hi16-app-nkrecnik.png 
+KDE_DIST=nkrecnik.lsm Makefile.in nkrGUI.ui.h hi32-app-nkrecnik.png nkrecnikui.rc nkrGUI.ui nkrecnik.desktop Makefile.am hi16-app-nkrecnik.png 
 
 #>+ 4
 clean-ui:
@@ -704,14 +704,14 @@ docs-am:
 
 #>+ 10
 install-kde-icons:
-	$(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps
-	$(INSTALL_DATA) $(srcdir)/hi16-app-nkrecnik.png $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps/nkrecnik.png
 	$(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/32x32/apps
 	$(INSTALL_DATA) $(srcdir)/hi32-app-nkrecnik.png $(DESTDIR)$(kde_icondir)/hicolor/32x32/apps/nkrecnik.png
+	$(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps
+	$(INSTALL_DATA) $(srcdir)/hi16-app-nkrecnik.png $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps/nkrecnik.png
 
 uninstall-kde-icons:
-	-rm -f $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps/nkrecnik.png
 	-rm -f $(DESTDIR)$(kde_icondir)/hicolor/32x32/apps/nkrecnik.png
+	-rm -f $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps/nkrecnik.png
 
 #>+ 15
 force-reedit:

+ 1 - 0
src/mcdict.cpp

@@ -36,6 +36,7 @@ McDict::McDict(QString place, int style)
 		case KDE_STYLE:
 			dirs = KGlobal::dirs();
 			dictPath = dirs->findResource("data", "nkrecnik/data/" + place);
+//			qDebug("dictPath= " + dictPath);
 			break;
 		case PLAIN_STYLE:
 			dictPath = place;

+ 29 - 29
src/nkrecnik.cpp

@@ -46,13 +46,13 @@ NKRecnik::NKRecnik(QWidget *parent, const char *name) : nkrGUI(parent, name)
 
 	// Loading default dictionary
 	Dict = new McDict("dict.dat", KDE_STYLE);
-	kdeDict = new McDict("kde-dict.dat", KDE_STYLE);
+// 	kdeDict = new McDict("kde-dict.dat", KDE_STYLE);
 	logger->append("Default dictionary loaded");
 
 	// Loading user dictionary
-	QString updictfile = config->progDir() + "/updictionary.dat";
-	updateDict = new McDict(updictfile, PLAIN_STYLE);
-	logger->append("User dictionary loaded, its: " + updictfile);
+ 	QString updictfile = config->progDir() + "/updictionary.dat";
+ 	updateDict = new McDict(updictfile, PLAIN_STYLE);
+ 	logger->append("User dictionary loaded, its: " + updictfile);
 
 	// Loading additional dictionary.
 	if (config->add_dict != "")
@@ -74,7 +74,7 @@ NKRecnik::NKRecnik(QWidget *parent, const char *name) : nkrGUI(parent, name)
 
 	// Disabling sorting
 	Dict->setSort(false);
-	updateDict->setSort(false);
+// 	updateDict->setSort(false);
 
 	// Setting some options from config file (others in constructor)
 	logger->append("Setting configuration");
@@ -117,9 +117,9 @@ NKRecnik::~NKRecnik()
 {
 	delete config;
 	delete Dict;
-	delete kdeDict;
-	delete updateDict;
-	delete additionalDict;
+// 	delete kdeDict;
+// 	delete updateDict;
+// 	delete additionalDict;
 }
 
 
@@ -130,7 +130,6 @@ void NKRecnik::retPressed()
 {
 	//QTime t;
 	//t.start();
-
 	tabs->setCurrentPage(0);
 	numAllWords = 0;
 	for (int i=0; i < 100; i++)
@@ -146,8 +145,8 @@ void NKRecnik::retPressed()
 	logger->append("Looking for " + queryPhrase + ". Found:");
 	int upNumWords=0, numWords=0, adNumWords=0;
 
-	if (!inKdeMode)
-	{
+// 	if (!inKdeMode)
+// 	{
 		numWords = Dict->find(queryPhrase);
 		if (updateDict->doesExist())
 			upNumWords = updateDict->find(queryPhrase);
@@ -173,10 +172,10 @@ void NKRecnik::retPressed()
 			allWords[numAllWords][1] = additionalDict->getWord(i, 1);
 			++numAllWords;
 		}
-	}
+/* 	}
 	else // So, we're in KDE mode.
-	{
-		numWords = kdeDict->find(queryPhrase);
+ 	{
+ 		numWords = kdeDict->find(queryPhrase);
 		for (int i = 0; i < numWords; i++)
 		{
 			allWords[numAllWords][0] = kdeDict->getWord(i, 0);
@@ -184,7 +183,7 @@ void NKRecnik::retPressed()
 			++numAllWords;
 		}
 	}
-
+*/
 	logger->append(tr2i18n("Found ").setNum(numAllWords));
 
 	if (numAllWords == 0)
@@ -195,7 +194,7 @@ void NKRecnik::retPressed()
 	else
 	{
 		// sort them
-		sortWords(numAllWords);
+// 		sortWords(numAllWords);
 		// show them
 		if (numAllWords > 100) numAllWords = 100; //limitations
 		for (int i = 0; i < numAllWords; i++)
@@ -225,7 +224,7 @@ void NKRecnik::rbEnToogled(int state)
 			table->hideRow(i);
 		}
 		Dict->dictChange(EN2SR);
-		updateDict->dictChange(EN2SR);
+// 		updateDict->dictChange(EN2SR);
 		if (addDictLoaded) additionalDict->dictChange(EN2SR);
 		table->horizontalHeader()->setLabel(0, tr2i18n("English"));
 		table->horizontalHeader()->setLabel(1, tr2i18n("Serbian"));
@@ -245,7 +244,7 @@ void NKRecnik::rbSrToogled(int state)
 			table->hideRow(i);
 		}
 		Dict->dictChange(SR2EN);
-		updateDict->dictChange(SR2EN);
+// 		updateDict->dictChange(SR2EN);
 		if (addDictLoaded) additionalDict->dictChange(SR2EN);
 		table->horizontalHeader()->setLabel(0, tr2i18n("Serbian"));
 		table->horizontalHeader()->setLabel(1, tr2i18n("English"));
@@ -307,8 +306,8 @@ void NKRecnik::inverse()
 		rbSr->setChecked(false);
 		rbEn->setChecked(true);
 		Dict->dictChange(EN2SR);
-		updateDict->dictChange(EN2SR);
-		if (addDictLoaded) additionalDict->dictChange(EN2SR);
+// 		updateDict->dictChange(EN2SR);
+// 		if (addDictLoaded) additionalDict->dictChange(EN2SR);
 		table->horizontalHeader()->setLabel(0, tr2i18n("English"));
 		table->horizontalHeader()->setLabel(1, tr2i18n("Serbian"));
 	}
@@ -317,8 +316,8 @@ void NKRecnik::inverse()
 		rbEn->setChecked(false);
 		rbSr->setChecked(true);
 		Dict->dictChange(SR2EN);
-		updateDict->dictChange(SR2EN);
-		if (addDictLoaded) additionalDict->dictChange(SR2EN);
+// 		updateDict->dictChange(SR2EN);
+// 		if (addDictLoaded) additionalDict->dictChange(SR2EN);
 		table->horizontalHeader()->setLabel(0, tr2i18n("Serbian"));
 		table->horizontalHeader()->setLabel(1, tr2i18n("English"));
 	}
@@ -395,8 +394,8 @@ void NKRecnik::applySetClicked()
 	table->setColumnWidth(1, (tabSize.width() / 2) - widthRight->value());
 
 	// Load Additional dictionary
-	if (addDictLoaded) delete additionalDict;
-	if (lineAddDict->text() != "")
+/*	if (addDictLoaded) delete additionalDict;
+ 	if (lineAddDict->text() != "")
 	{
 		additionalDict = new McDict(lineAddDict->text(), PLAIN_STYLE);
 		additionalDict->setSort(false);
@@ -404,6 +403,7 @@ void NKRecnik::applySetClicked()
 	}
 	else
 		addDictLoaded = false;
+*/
 }
 
 
@@ -426,7 +426,7 @@ void NKRecnik::saveSetClicked()
 	}
 	config->clip_format = lineFormat->text();
 	config->kde_mode = 0;
-	config->add_dict = lineAddDict->text();
+// 	config->add_dict = lineAddDict->text();
 
 	config->saveSettings();
 }
@@ -444,16 +444,16 @@ void NKRecnik::helpSetClicked()
 
 void NKRecnik::browseSetClicked()
 {
-	QString addDictFile;
+	/*QString addDictFile;
 	addDictFile = KFileDialog::getOpenFileName(config->homeDir(), "*.dat | Dictionary file (*.dat)\n", this, "Open Dictionary");
 	logger->append("Opened file: " + addDictFile);
-	lineAddDict->setText(addDictFile);
+	lineAddDict->setText(addDictFile);*/
 }
 
 
 void NKRecnik::updateClicked()
 {
-	if(!updateDict->writeEntry(upEnLine->text(), upSrLine->text()))
+	/*if(!updateDict->writeEntry(upEnLine->text(), upSrLine->text()))
 		QMessageBox::warning(this, tr2i18n("Failed!"), tr2i18n("For some reason, updating was not performed!"),0,0,1);
 	else
 	{
@@ -461,7 +461,7 @@ void NKRecnik::updateClicked()
 		upSrLine->setText("");
 		upEnLine->setText("");
 		upEnLine->setFocus();
-	}
+	}*/
 }
 
 

+ 0 - 3
templates/CVS/Entries

@@ -1,3 +0,0 @@
-/cpp/1.1.1.1/Mon Jun 28 15:45:34 2004//
-/h/1.1.1.1/Mon Jun 28 15:45:34 2004//
-D

+ 0 - 1
templates/CVS/Repository

@@ -1 +0,0 @@
-nkrecnik/templates

+ 0 - 1
templates/CVS/Root

@@ -1 +0,0 @@
-/usr/local/cvsroot/