Hiroyuki Ikezoe
ikezo****@users*****
2006年 11月 22日 (水) 15:09:10 JST
Index: libtomoe-gtk/src/tomoe-details.c diff -u libtomoe-gtk/src/tomoe-details.c:1.13 libtomoe-gtk/src/tomoe-details.c:1.14 --- libtomoe-gtk/src/tomoe-details.c:1.13 Tue Nov 21 19:42:47 2006 +++ libtomoe-gtk/src/tomoe-details.c Wed Nov 22 15:09:10 2006 @@ -423,7 +423,7 @@ -1); if (tomoe_char_get_glyph (c)) { chr = g_markup_printf_escaped - ("%d", tomoe_char_get_glyph (c)->stroke_num); + ("%d", tomoe_glyph_get_number_of_strokes (tomoe_char_get_glyph (c))); gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (priv->basic_prop), &iter, NULL, STROKE_PROPERTY); gtk_list_store_set (priv->basic_prop, &iter, @@ -485,11 +485,15 @@ TomoeDetails *dialog = TOMOE_DETAILS (user_data); TomoeDetailsPrivate *priv = TOMOE_DETAILS_GET_PRIVATE (dialog); GtkWidget *wnd = tomoe_edit_char_new (priv->character, NULL); /*FIXME*/ + gint result; - gtk_dialog_run (GTK_DIALOG (wnd)); + result = gtk_dialog_run (GTK_DIALOG (wnd)); gtk_widget_destroy (wnd); - if (tomoe_char_is_modified (priv->character)) - _show_details (dialog); +#warning FIXME! +#if 0 + if (result) +#endif + _show_details (dialog); } static void @@ -498,10 +502,11 @@ TomoeDetails *dialog = TOMOE_DETAILS (user_data); TomoeDetailsPrivate *priv = TOMOE_DETAILS_GET_PRIVATE (dialog); GtkWidget *wnd = tomoe_edit_strokes_new (priv->character); + gint result; - gtk_dialog_run (GTK_DIALOG (wnd)); + result = gtk_dialog_run (GTK_DIALOG (wnd)); gtk_widget_destroy (wnd); - if (tomoe_char_is_modified (priv->character)) + if (result) _show_details (dialog); } @@ -511,10 +516,11 @@ TomoeDetails *dialog = TOMOE_DETAILS (user_data); TomoeDetailsPrivate *priv = TOMOE_DETAILS_GET_PRIVATE (dialog); GtkWidget *wnd = tomoe_edit_meta_new (priv->character); + gint result; - gtk_dialog_run (GTK_DIALOG (wnd)); + result = gtk_dialog_run (GTK_DIALOG (wnd)); gtk_widget_destroy (wnd); - if (tomoe_char_is_modified (priv->character)) + if (result) _show_details (dialog); } static void Index: libtomoe-gtk/src/tomoe-dictionaries-page.c diff -u libtomoe-gtk/src/tomoe-dictionaries-page.c:1.11 libtomoe-gtk/src/tomoe-dictionaries-page.c:1.12 --- libtomoe-gtk/src/tomoe-dictionaries-page.c:1.11 Tue Nov 21 19:33:39 2006 +++ libtomoe-gtk/src/tomoe-dictionaries-page.c Wed Nov 22 15:09:10 2006 @@ -217,7 +217,7 @@ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4); gtk_widget_show (label); - _populate (page); +// _populate (page); #if 0 tomoe_dictionaries_page_set_sensitive (page); #endif @@ -227,7 +227,6 @@ static void tomoe_dictionaries_page_init (TomoeDictionariesPage *page) { - TomoeDictionariesPagePrivate *priv = TOMOE_DICTIONARIES_PAGE_GET_PRIVATE (page); } static void @@ -289,7 +288,6 @@ static void _populate (TomoeDictionariesPage *page) { - int i; GtkTreeIter iter; GList *dicts, *list; TomoeDictionariesPagePrivate *priv = TOMOE_DICTIONARIES_PAGE_GET_PRIVATE (page); @@ -392,7 +390,6 @@ { TomoeDictionariesPage *page = TOMOE_DICTIONARIES_PAGE (user_data); TomoeDictionariesPagePrivate *priv = TOMOE_DICTIONARIES_PAGE_GET_PRIVATE (page); - GtkTreePath *tp = gtk_tree_path_new_from_string (path); TomoeDict *dict; GtkTreeIter iter; @@ -403,7 +400,7 @@ -1); if (dict) { - gboolean active = gtk_cell_renderer_toggle_get_active (cell_renderer); + /* gboolean active = gtk_cell_renderer_toggle_get_active (cell_renderer); */ /* tomoe_dict_set_XX (dict, active); */ _populate (page); /* FIXME */ } Index: libtomoe-gtk/src/tomoe-dictionary-page.c diff -u libtomoe-gtk/src/tomoe-dictionary-page.c:1.13 libtomoe-gtk/src/tomoe-dictionary-page.c:1.14 --- libtomoe-gtk/src/tomoe-dictionary-page.c:1.13 Tue Nov 21 19:33:39 2006 +++ libtomoe-gtk/src/tomoe-dictionary-page.c Wed Nov 22 15:09:10 2006 @@ -380,14 +380,14 @@ for (i = 0; i < tomoe_dict_get_size (dict); i++) { TomoeChar *chr = (TomoeChar*)tomoe_dict_char_by_index (dict, i); - gchar *readings_buf; /* FIXME dynamic */ + gchar *readings_buf = NULL; gchar strokes_text[32]; int strokes = 0; int j; GPtrArray *readings = tomoe_char_get_readings (chr); if (tomoe_char_get_glyph (chr)) - strokes = tomoe_char_get_glyph (chr)->stroke_num; + strokes = tomoe_glyph_get_number_of_strokes (tomoe_char_get_glyph (chr)); if (strokes > 0) g_sprintf (strokes_text, "%d", strokes); @@ -418,7 +418,6 @@ static void _populate_dict_list (TomoeDictionaryPage *page) { - int i; GList *dicts, *list; TomoeDictionaryPagePrivate *priv = TOMOE_DICTIONARY_PAGE_GET_PRIVATE (page); @@ -429,7 +428,6 @@ for (list = dicts; list; list = g_list_next (dicts)) { const gchar *dict_name = list->data; - TomoeDict *dict = tomoe_context_get_dict (priv->context, dict_name); GtkComboBox *def = GTK_COMBO_BOX (priv->dict_list); gtk_combo_box_append_text (def, dict_name); } @@ -459,17 +457,17 @@ GtkWidget *wnd; TomoeChar *chr; TomoeDict *dict; + gint result; g_return_if_fail (TOMOE_IS_DICTIONARY_PAGE (page)); dict = _get_active_dict (page); chr = tomoe_dict_char_by_index (dict, index); - tomoe_char_set_modified (chr, FALSE); wnd = tomoe_details_new (chr, dict); - gtk_dialog_run (GTK_DIALOG (wnd)); + result = gtk_dialog_run (GTK_DIALOG (wnd)); gtk_widget_destroy (wnd); - if (tomoe_char_is_modified (chr)) + if (result) _populate (page); /* FIXME */ } Index: libtomoe-gtk/src/tomoe-edit-char.c diff -u libtomoe-gtk/src/tomoe-edit-char.c:1.5 libtomoe-gtk/src/tomoe-edit-char.c:1.6 --- libtomoe-gtk/src/tomoe-edit-char.c:1.5 Tue Nov 21 19:33:39 2006 +++ libtomoe-gtk/src/tomoe-edit-char.c Wed Nov 22 15:09:10 2006 @@ -61,8 +61,6 @@ GValue *value, GParamSpec *pspec); -static void tomoe_edit_char_set_sensitive (TomoeEditChar *window); - static void on_ok_button_clicked (GtkButton *button, gpointer user_data); static void on_cancel_button_clicked (GtkButton *button, Index: libtomoe-gtk/src/tomoe-reading-search-page.c diff -u libtomoe-gtk/src/tomoe-reading-search-page.c:1.8 libtomoe-gtk/src/tomoe-reading-search-page.c:1.9 --- libtomoe-gtk/src/tomoe-reading-search-page.c:1.8 Tue Nov 21 19:33:39 2006 +++ libtomoe-gtk/src/tomoe-reading-search-page.c Wed Nov 22 15:09:10 2006 @@ -193,7 +193,6 @@ { GList *result, *list; const gchar *reading; - int i; TomoeReadingSearchPagePrivate *priv = TOMOE_READING_SEARCH_PAGE_GET_PRIVATE (page); g_return_if_fail (GTK_IS_LIST_STORE (priv->result_store)); @@ -206,7 +205,7 @@ for (list = result; list; list = g_list_next (list)) { - TomoeChar *chr = (TomoeChar*) g_list_nth_data (list, i); + TomoeChar *chr = TOMOE_CHAR (list->data); gchar **str_array; gchar *strokes_text; gchar *readings_text; @@ -216,7 +215,7 @@ GPtrArray *readings = tomoe_char_get_readings (chr); if (tomoe_char_get_glyph (chr)) - strokes = tomoe_char_get_glyph (chr)->stroke_num; + strokes = tomoe_glyph_get_number_of_strokes (tomoe_char_get_glyph (chr)); if (strokes > 0) strokes_text = g_strdup_printf ("%d", strokes); Index: libtomoe-gtk/src/tomoe-stroke-search.c diff -u libtomoe-gtk/src/tomoe-stroke-search.c:1.5 libtomoe-gtk/src/tomoe-stroke-search.c:1.6 --- libtomoe-gtk/src/tomoe-stroke-search.c:1.5 Tue Nov 21 16:00:06 2006 +++ libtomoe-gtk/src/tomoe-stroke-search.c Wed Nov 22 15:09:10 2006 @@ -185,8 +185,6 @@ { TomoeStrokeSearchPrivate *priv = TOMOE_STROKE_SEARCH_GET_PRIVATE (strokeSearch); gboolean editable = tomoe_canvas_has_stroke (TOMOE_CANVAS (priv->canvas)); - TomoeChar *sel = tomoe_char_table_get_selected - (TOMOE_CHAR_TABLE (priv->candidates_view)); gtk_widget_set_sensitive (priv->find_button, editable); gtk_widget_set_sensitive (priv->go_back_button, editable); Index: libtomoe-gtk/src/tomoe-window.c diff -u libtomoe-gtk/src/tomoe-window.c:1.10 libtomoe-gtk/src/tomoe-window.c:1.11 --- libtomoe-gtk/src/tomoe-window.c:1.10 Tue Nov 21 16:00:06 2006 +++ libtomoe-gtk/src/tomoe-window.c Wed Nov 22 15:09:10 2006 @@ -66,7 +66,6 @@ GtkWidget *handwriting_page, *dictionaries_page, *reading_search_page; GtkWidget *notebook, *page; TomoeCanvas *canvas; - const GPtrArray *list; TomoeWindowPrivate *priv = TOMOE_WINDOW_GET_PRIVATE (window); #ifdef ENABLE_NLS