forked from pool/kasumi
228 lines
7.8 KiB
Diff
228 lines
7.8 KiB
Diff
diff -ru kasumi-2.2.orig/KasumiDic.cxx kasumi-2.2/KasumiDic.cxx
|
|
--- kasumi-2.2.orig/KasumiDic.cxx 2006-06-20 16:41:47.000000000 +0200
|
|
+++ kasumi-2.2/KasumiDic.cxx 2007-03-13 18:18:16.000000000 +0100
|
|
@@ -148,7 +148,7 @@
|
|
}
|
|
}
|
|
|
|
-void KasumiDic::removeWord(size_t id)
|
|
+void KasumiDic::removeWord(unsigned int id)
|
|
{
|
|
int flag = 0;
|
|
|
|
diff -ru kasumi-2.2.orig/KasumiDic.hxx kasumi-2.2/KasumiDic.hxx
|
|
--- kasumi-2.2.orig/KasumiDic.hxx 2006-05-26 19:41:25.000000000 +0200
|
|
+++ kasumi-2.2/KasumiDic.hxx 2007-03-13 18:19:11.000000000 +0100
|
|
@@ -56,7 +56,7 @@
|
|
~KasumiDic();
|
|
void store() throw(KasumiException);
|
|
void appendWord(KasumiWord *word); // returns this word's ID
|
|
- void removeWord(size_t id);
|
|
+ void removeWord(unsigned int id);
|
|
|
|
void registerEventListener(KasumiDicEventListener *listener);
|
|
void removeEventListener(KasumiDicEventListener *listener);
|
|
@@ -69,7 +69,7 @@
|
|
void changedSound(KasumiWord *word);
|
|
void changedWordType(KasumiWord *word);
|
|
|
|
-// KasumiWord *getWordWithID(size_t id) throw(KasumiException);
|
|
+// KasumiWord *getWordWithID(unsigned int id) throw(KasumiException);
|
|
// int getUpperBoundOfWordID();
|
|
};
|
|
|
|
diff -ru kasumi-2.2.orig/KasumiDicEventListener.hxx kasumi-2.2/KasumiDicEventListener.hxx
|
|
--- kasumi-2.2.orig/KasumiDicEventListener.hxx 2006-06-26 08:21:40.000000000 +0200
|
|
+++ kasumi-2.2/KasumiDicEventListener.hxx 2007-03-13 18:19:45.000000000 +0100
|
|
@@ -36,7 +36,7 @@
|
|
private:
|
|
public:
|
|
virtual ~KasumiDicEventListener() {};
|
|
- virtual void removedWord(size_t id) = 0;
|
|
+ virtual void removedWord(unsigned int id) = 0;
|
|
virtual void appendedWord(KasumiWord *word) = 0;
|
|
virtual void modifiedWord(KasumiWord *word) = 0;
|
|
};
|
|
diff -ru kasumi-2.2.orig/KasumiMainWindow.cxx kasumi-2.2/KasumiMainWindow.cxx
|
|
--- kasumi-2.2.orig/KasumiMainWindow.cxx 2006-11-28 13:57:16.000000000 +0100
|
|
+++ kasumi-2.2/KasumiMainWindow.cxx 2007-03-13 18:32:15.000000000 +0100
|
|
@@ -435,7 +435,7 @@
|
|
void KasumiMainWindow::ClickedRemoveButton(){
|
|
GtkTreeModel *model = GTK_TREE_MODEL(SortList);
|
|
GtkTreeIter iter;
|
|
- int id;
|
|
+ unsigned int id;
|
|
|
|
if(gtk_tree_selection_get_selected(SortListSelection, &model, &iter)){
|
|
gtk_tree_model_get(model, &iter, COL_ID, &id, -1);
|
|
@@ -476,7 +476,7 @@
|
|
GtkTreeIter iter;
|
|
gtk_tree_model_get_iter(SortList, &iter, editingPath);
|
|
|
|
- size_t id;
|
|
+ unsigned int id;
|
|
gtk_tree_model_get(SortList, &iter, COL_ID, &id, -1);
|
|
|
|
KasumiWord *word = KasumiWord::getWordFromID(id);
|
|
@@ -568,7 +568,7 @@
|
|
if(editingPath == NULL)
|
|
throw KasumiException(string("internal error: editingPath is already freed."), STDERR, KILL);
|
|
gtk_tree_model_get_iter(SortList, &iter, editingPath);
|
|
- size_t id;
|
|
+ unsigned int id;
|
|
gtk_tree_model_get(SortList, &iter, COL_ID, &id, -1);
|
|
KasumiWord *word = KasumiWord::getWordFromID(id);
|
|
|
|
@@ -586,7 +586,7 @@
|
|
GtkTreeIter iter;
|
|
KasumiWord *word;
|
|
GtkTreeIter StartIter;
|
|
- int id;
|
|
+ unsigned int id;
|
|
string searchString = string(gtk_entry_get_text(GTK_ENTRY(mSearchEntry)));
|
|
string comparedString;
|
|
|
|
@@ -692,7 +692,7 @@
|
|
gtk_tree_view_column_set_sort_order(column,order);
|
|
}
|
|
|
|
-void KasumiMainWindow::removedWord(size_t id){
|
|
+void KasumiMainWindow::removedWord(unsigned int id){
|
|
refresh();
|
|
modificationFlag = true;
|
|
}
|
|
@@ -735,7 +735,7 @@
|
|
}
|
|
|
|
void KasumiMainWindow::modifiedWord(KasumiWord *word){
|
|
- size_t id = word->getID();
|
|
+ unsigned int id = word->getID();
|
|
GtkTreeIter *iter = findCorrespondingIter(id);
|
|
|
|
if(iter != NULL)
|
|
@@ -753,8 +753,8 @@
|
|
}
|
|
|
|
// Do not returns iter of SortList but WordList
|
|
-GtkTreeIter *KasumiMainWindow::findCorrespondingIter(size_t id){
|
|
- size_t i;
|
|
+GtkTreeIter *KasumiMainWindow::findCorrespondingIter(unsigned int id){
|
|
+ unsigned int i;
|
|
GtkTreeModel *model = GTK_TREE_MODEL(WordList);
|
|
GtkTreeIter *iter = (GtkTreeIter*)calloc(1,sizeof(GtkTreeIter));
|
|
|
|
@@ -959,7 +959,7 @@
|
|
|
|
i = key.find("+",0);
|
|
|
|
- if(i == key.npos){
|
|
+ if(i == (unsigned int) key.npos){
|
|
return (GdkModifierType)0;
|
|
}
|
|
|
|
@@ -978,7 +978,7 @@
|
|
GtkTreeIter *a,
|
|
GtkTreeIter *b,
|
|
gpointer user_data){
|
|
- int id_a, id_b;
|
|
+ unsigned int id_a, id_b;
|
|
gtk_tree_model_get(model, a, COL_ID, &id_a, -1);
|
|
gtk_tree_model_get(model, b, COL_ID, &id_b, -1);
|
|
KasumiWord *word_a = KasumiWord::getWordFromID(id_a);
|
|
@@ -991,7 +991,7 @@
|
|
GtkTreeIter *iter_a,
|
|
GtkTreeIter *iter_b,
|
|
gpointer user_data){
|
|
- int id_a, id_b;
|
|
+ unsigned int id_a, id_b;
|
|
gtk_tree_model_get(model, iter_a, COL_ID, &id_a, -1);
|
|
gtk_tree_model_get(model, iter_b, COL_ID, &id_b, -1);
|
|
KasumiWord *word_a = KasumiWord::getWordFromID(id_a);
|
|
@@ -1033,7 +1033,7 @@
|
|
GtkTreeIter *iter_a,
|
|
GtkTreeIter *iter_b,
|
|
gpointer user_data){
|
|
- int id_a, id_b;
|
|
+ unsigned int id_a, id_b;
|
|
gtk_tree_model_get(model, iter_a, COL_ID, &id_a, -1);
|
|
gtk_tree_model_get(model, iter_b, COL_ID, &id_b, -1);
|
|
KasumiWord *word_a = KasumiWord::getWordFromID(id_a);
|
|
diff -ru kasumi-2.2.orig/KasumiMainWindow.hxx kasumi-2.2/KasumiMainWindow.hxx
|
|
--- kasumi-2.2.orig/KasumiMainWindow.hxx 2006-06-23 15:39:20.000000000 +0200
|
|
+++ kasumi-2.2/KasumiMainWindow.hxx 2007-03-13 18:33:03.000000000 +0100
|
|
@@ -228,7 +228,7 @@
|
|
void changedWordTypeColumn(GtkComboBox *combo);
|
|
|
|
void FindNext(bool fromCurrent);
|
|
- GtkTreeIter *findCorrespondingIter(size_t id);
|
|
+ GtkTreeIter *findCorrespondingIter(unsigned int id);
|
|
|
|
void SortBy(GtkTreeViewColumn *column);
|
|
|
|
@@ -236,7 +236,7 @@
|
|
KasumiMainWindow(KasumiDic *aDictionary, KasumiConfiguration *conf);
|
|
virtual ~KasumiMainWindow();
|
|
void refresh();
|
|
- void removedWord(size_t id);
|
|
+ void removedWord(unsigned int id);
|
|
void appendedWord(KasumiWord *word);
|
|
void modifiedWord(KasumiWord *word);
|
|
};
|
|
diff -ru kasumi-2.2.orig/KasumiWord.cxx kasumi-2.2/KasumiWord.cxx
|
|
--- kasumi-2.2.orig/KasumiWord.cxx 2006-10-14 09:31:21.000000000 +0200
|
|
+++ kasumi-2.2/KasumiWord.cxx 2007-03-13 18:33:49.000000000 +0100
|
|
@@ -41,7 +41,7 @@
|
|
iconv_t KasumiWord::IconvUTF8_To_EUCJP = iconv_open("EUC-JP", "UTF-8");
|
|
iconv_t KasumiWord::IconvEUCJP_To_UTF8 = iconv_open("UTF-8", "EUC-JP");
|
|
|
|
-size_t KasumiWord::id_generator = 0;
|
|
+unsigned int KasumiWord::id_generator = 0;
|
|
|
|
vector<KasumiWord*> KasumiWord::words = vector<KasumiWord*>(VECTOR_UNIT);
|
|
|
|
@@ -277,7 +277,7 @@
|
|
return string("");
|
|
}
|
|
|
|
-KasumiWord* KasumiWord::getWordFromID(size_t id)
|
|
+KasumiWord* KasumiWord::getWordFromID(unsigned int id)
|
|
{
|
|
return KasumiWord::words[id];
|
|
}
|
|
diff -ru kasumi-2.2.orig/KasumiWord.hxx kasumi-2.2/KasumiWord.hxx
|
|
--- kasumi-2.2.orig/KasumiWord.hxx 2006-05-26 19:41:25.000000000 +0200
|
|
+++ kasumi-2.2/KasumiWord.hxx 2007-03-13 18:37:14.000000000 +0100
|
|
@@ -48,7 +48,7 @@
|
|
int Frequency; // corresponding "Hindo"
|
|
string Spelling; // corresponding "Tango"
|
|
string Spelling_UTF8;
|
|
- size_t id;
|
|
+ unsigned int id;
|
|
vector<KasumiWordEventListener*> EventListeners;
|
|
|
|
KasumiWordType *mWordType;
|
|
@@ -60,7 +60,7 @@
|
|
// if no invalid character, returns empty string
|
|
static string extractInvalidCharacterFromSound(string soundByUTF8);
|
|
|
|
- static size_t id_generator;
|
|
+ static unsigned int id_generator;
|
|
static vector<KasumiWord*> words;
|
|
|
|
KasumiWord(KasumiConfiguration *conf);
|
|
@@ -87,12 +87,12 @@
|
|
KasumiWordType *getWordType() { return mWordType; };
|
|
string getWordTypeUIString(); // UTF8
|
|
|
|
- size_t getID(){ return id; };
|
|
+ unsigned int getID(){ return id; };
|
|
|
|
void registerEventListener(KasumiWordEventListener *listener);
|
|
void removeEventListener(KasumiWordEventListener *listener);
|
|
|
|
- static KasumiWord *getWordFromID(size_t id);
|
|
+ static KasumiWord *getWordFromID(unsigned int id);
|
|
|
|
static string convertUTF8ToEUCJP(const string &aEUCJP);
|
|
static string convertEUCJPToUTF8(const string &aUTF8);
|