Package: gjiten Version: 2.6-3.1 Severity: important Tags: patch To allow the removal of src:gconf2 from the archive, please remove the GConf migration code and also gconf2 from Recommends.
Patch attached. -- System Information: Debian Release: bullseye/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386, x32 Kernel: Linux 5.2.0-3-amd64 (SMP w/2 CPU cores) Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8), LANGUAGE=bg_BG.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages gjiten depends on: ii dconf-gsettings-backend [gsettings-backend] 0.34.0-1 ii edict 2019.02.20-1 ii kanjidic 2019.02.17-1 ii libatk1.0-0 2.34.1-1 ii libc6 2.29-2 ii libcairo2 1.16.0-4 ii libfontconfig1 2.13.1-2+b1 ii libfreetype6 2.9.1-4 ii libgdk-pixbuf2.0-0 2.40.0+dfsg-1 ii libglib2.0-0 2.62.1-1 ii libgtk2.0-0 2.24.32-4 ii libpango-1.0-0 1.42.4-7 ii libpangocairo-1.0-0 1.42.4-7 ii libpangoft2-1.0-0 1.42.4-7 Versions of packages gjiten recommends: ii fonts-ipafont-mincho [fonts-japanese-mincho] 00303-19 ii gconf2 3.2.6-6 Versions of packages gjiten suggests: pn enamdict <none> -- no debconf information
diff -Nru gjiten-2.6/debian/control gjiten-2.6/debian/control --- gjiten-2.6/debian/control 2018-11-18 18:23:41.000000000 +0200 +++ gjiten-2.6/debian/control 2018-11-18 18:23:41.000000000 +0200 @@ -16,7 +16,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, kanjidic, edict Suggests: enamdict -Recommends: fonts-ipafont-mincho | fonts-japanese-mincho, gconf2 +Recommends: fonts-ipafont-mincho | fonts-japanese-mincho Description: Japanese dictionary for GNOME Gjiten is a Japanese dictionary for GNOME with advanced word and kanji lookup features. Requires dictionary files (edict, kanjidic) to function. diff -Nru gjiten-2.6/debian/patches/port-to-GSettings.patch gjiten-2.6/debian/patches/port-to-GSettings.patch --- gjiten-2.6/debian/patches/port-to-GSettings.patch 2018-11-18 18:23:41.000000000 +0200 +++ gjiten-2.6/debian/patches/port-to-GSettings.patch 2018-11-18 18:23:41.000000000 +0200 @@ -22,11 +22,9 @@ delete mode 100644 data/gjiten.schemas.in create mode 100644 data/net.sf.gjiten.gschema.xml -diff --git a/configure.in b/configure.in -index 30c1601..b2f8a03 100644 ---- a/configure.in -+++ b/configure.in -@@ -16,12 +16,11 @@ AC_PROG_CC +--- gjiten-2.6.orig/configure.in ++++ gjiten-2.6/configure.in +@@ -16,12 +16,11 @@ AC_PROG_INSTALL AM_PROG_LIBTOOL AC_PROG_MAKE_SET @@ -42,11 +40,9 @@ # Checks for header files. AC_HEADER_STDC -diff --git a/data/Makefile.am b/data/Makefile.am -index fbc390d..8972844 100644 ---- a/data/Makefile.am -+++ b/data/Makefile.am -@@ -3,16 +3,12 @@ pkgdata_DATA = vconj.utf8 radkfile.utf8 +--- gjiten-2.6.orig/data/Makefile.am ++++ gjiten-2.6/data/Makefile.am +@@ -3,16 +3,9 @@ gladedir = $(pkgdatadir) glade_DATA = gjiten-settings.glade worddic.glade @@ -54,25 +50,20 @@ -schemas_in_files = gjiten.schemas.in gjiten-dicfiles.schemas.in -schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) -@INTLTOOL_SCHEMAS_RULE@ -+data_convertdir = $(datadir)/GConf/gsettings -+dist_data_convert_DATA = gjiten.convert - --CLEANFILES = *.bak *.gladep $(schemas_DATA) +gsettings_SCHEMAS = net.sf.gjiten.gschema.xml +@GSETTINGS_RULES@ --EXTRA_DIST = $(schemas_in_files) $(glade_DATA) radkfile.utf8 vconj.utf8 +-CLEANFILES = *.bak *.gladep $(schemas_DATA) +CLEANFILES = *.bak *.gladep +-EXTRA_DIST = $(schemas_in_files) $(glade_DATA) radkfile.utf8 vconj.utf8 +- -if GCONF_SCHEMAS_INSTALL -install-data-local: $(schemas_DATA) - GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schemas_DATA); -endif +EXTRA_DIST = $(gsettings_SCHEMAS) $(glade_DATA) radkfile.utf8 vconj.utf8 -diff --git a/data/gjiten-dicfiles.schemas.in b/data/gjiten-dicfiles.schemas.in -deleted file mode 100644 -index 5598098..0000000 ---- a/data/gjiten-dicfiles.schemas.in +--- gjiten-2.6.orig/data/gjiten-dicfiles.schemas.in +++ /dev/null @@ -1,40 +0,0 @@ -<!-- Install with the following command: @@ -115,64 +106,7 @@ - - </schemalist> -</gconfschemafile> -diff --git a/data/gjiten.convert b/data/gjiten.convert -new file mode 100644 -index 0000000..e60a5bf ---- /dev/null -+++ b/data/gjiten.convert -@@ -0,0 +1,48 @@ -+[net.sf.gjiten] -+autoadjust-enabled = /apps/gjiten/general/autoadjust_enabled -+bigkanji = /apps/gjiten/general/bigkanji -+bigwords = /apps/gjiten/general/bigwords -+envvar-override = /apps/gjiten/general/envvar_override -+force-ja-jp = /apps/gjiten/general/force_ja_JP -+force-language-c = /apps/gjiten/general/force_language_c -+gdk-use-xft = /apps/gjiten/general/gdk_use_xft -+kanjipad = /apps/gjiten/general/kanjipad -+largefont = /apps/gjiten/general/largefont -+maxwordmatches = /apps/gjiten/general/maxwordmatches -+normalfont = /apps/gjiten/general/normalfont -+search-hira-on-kata = /apps/gjiten/general/search_hira_on_kata -+search-kata-on-hira = /apps/gjiten/general/search_kata_on_hira -+searchlimit-enabled = /apps/gjiten/general/searchlimit_enabled -+version = /apps/gjiten/general/version -+ -+[net.sf.gjiten.kanjidic] -+bushu = /apps/gjiten/kanjidic/bushu -+classic = /apps/gjiten/kanjidic/classic -+cref = /apps/gjiten/kanjidic/cref -+deroo = /apps/gjiten/kanjidic/deroo -+eindex = /apps/gjiten/kanjidic/eindex -+english = /apps/gjiten/kanjidic/english -+fourc = /apps/gjiten/kanjidic/fourc -+freq = /apps/gjiten/kanjidic/freq -+hindex = /apps/gjiten/kanjidic/hindex -+iindex = /apps/gjiten/kanjidic/iindex -+jisascii = /apps/gjiten/kanjidic/jisascii -+jouyou = /apps/gjiten/kanjidic/jouyou -+kanji = /apps/gjiten/kanjidic/kanji -+kanjidicfile = /apps/gjiten/kanjidic/kanjidicfile -+kindex = /apps/gjiten/kanjidic/kindex -+korean = /apps/gjiten/kanjidic/korean -+lindex = /apps/gjiten/kanjidic/lindex -+missc = /apps/gjiten/kanjidic/missc -+mnindex = /apps/gjiten/kanjidic/mnindex -+mpindex = /apps/gjiten/kanjidic/mpindex -+nindex = /apps/gjiten/kanjidic/nindex -+oindex = /apps/gjiten/kanjidic/oindex -+pinyin = /apps/gjiten/kanjidic/pinyin -+radical = /apps/gjiten/kanjidic/radical -+reading = /apps/gjiten/kanjidic/reading -+skip = /apps/gjiten/kanjidic/skip -+strokes = /apps/gjiten/kanjidic/strokes -+unicode = /apps/gjiten/kanjidic/unicode -+unicode-radicals = /apps/gjiten/kanjidic/unicode_radicals -+vindex = /apps/gjiten/kanjidic/vindex -diff --git a/data/gjiten.schemas.in b/data/gjiten.schemas.in -deleted file mode 100644 -index 7d375a4..0000000 ---- a/data/gjiten.schemas.in +--- gjiten-2.6.orig/data/gjiten.schemas.in +++ /dev/null @@ -1,168 +0,0 @@ -<!-- Install with the following command: @@ -343,11 +277,8 @@ - - </schemalist> -</gconfschemafile> -diff --git a/data/net.sf.gjiten.gschema.xml b/data/net.sf.gjiten.gschema.xml -new file mode 100644 -index 0000000..3961ba7 --- /dev/null -+++ b/data/net.sf.gjiten.gschema.xml ++++ gjiten-2.6/data/net.sf.gjiten.gschema.xml @@ -0,0 +1,158 @@ +<schemalist gettext-domain="gjiten"> + <schema id="net.sf.gjiten" path="/net/sf/gjiten/"> @@ -507,10 +438,8 @@ + </key> + </schema> +</schemalist> -diff --git a/po/POTFILES.in b/po/POTFILES.in -index 42cff6a..15afe95 100644 ---- a/po/POTFILES.in -+++ b/po/POTFILES.in +--- gjiten-2.6.orig/po/POTFILES.in ++++ gjiten-2.6/po/POTFILES.in @@ -1,6 +1,6 @@ data/gjiten-settings.glade data/worddic.glade @@ -519,66 +448,15 @@ gnome/gjiten.desktop.in src/gjiten.c src/pref.c -diff --git a/src/conf.c b/src/conf.c -index b3fd7c3..84d3dc6 100644 ---- a/src/conf.c -+++ b/src/conf.c -@@ -35,23 +35,72 @@ +--- gjiten-2.6.orig/src/conf.c ++++ gjiten-2.6/src/conf.c +@@ -35,23 +35,22 @@ extern gchar *kanjidicstrg[]; extern gchar *gnome_dialog_msg; GjitenConfig conf; -GConfClient *gconf_client; +GSettings *settings; +GSettings *kanji_settings; -+ -+static gchar *migrate_gconf_settings(const gchar *name) { -+ gboolean needed = TRUE; -+ GError *error = NULL; -+ GKeyFile *kf; -+ gchar **list; -+ gchar *msg = NULL; -+ gsize i, n; -+ -+ kf = g_key_file_new(); -+ -+ g_key_file_load_from_data_dirs(kf, "gsettings-data-convert", -+ NULL, G_KEY_FILE_NONE, NULL); -+ list = g_key_file_get_string_list(kf, "State", "converted", &n, NULL); -+ -+ if (list) { -+ for (i = 0; i < n; i++) -+ if (! g_strcmp0(list[i], name)) { -+ needed = FALSE; -+ break; -+ } -+ g_strfreev(list); -+ } -+ g_key_file_free(kf); -+ -+ if (needed) { -+ g_spawn_command_line_sync("gsettings-data-convert", -+ NULL, NULL, NULL, &error); -+ if (error) { -+ msg = g_strdup_printf(_("Could not migrate old GConf settings: %s\n" -+ "Please make sure that GConf is installed " -+ "and the gsettings-data-convert tool is in " -+ "your PATH.\nAlternatively, ignore this " -+ "message and convert your old settings " -+ "manually."), error->message); -+ g_error_free(error); -+ } else { -+ msg = g_strdup(_("Old GConf settings were either missing or " -+ "migrated successfully.")); -+ -+ /* Allow some time for the GSettings backend to record the -+ changes, otherwise the default values from the new schema -+ might be set. */ -+ sleep(1); -+ } -+ } -+ -+ return msg; -+} GjitenConfig *conf_load() { - gchar *dicprefix = "/apps/gjiten/general/dic"; @@ -597,14 +475,13 @@ + conf = g_new0(GjitenConfig, 1); -+ conf->gconf_migration = migrate_gconf_settings("gjiten.convert"); - conf->version = gconf_client_get_string(gconf_client, "/apps/gjiten/general/version", NULL); + conf->version = g_settings_get_string(settings, "version"); /* if (conf->version == NULL) { // FIXME: gconf schema conf->kdiccfg[KANJI] = TRUE; -@@ -76,44 +125,38 @@ GjitenConfig *conf_load() { +@@ -76,44 +75,38 @@ } */ @@ -667,7 +544,7 @@ if (conf->dicfile_list != NULL) { dicutil_unload_dic(); -@@ -121,170 +164,137 @@ GjitenConfig *conf_load() { +@@ -121,170 +114,125 @@ conf->dicfile_list = NULL; } @@ -785,15 +662,7 @@ - //Deprecated dictionary file number, zero it out. - //gconf_client_set_int(gconf_client, "/apps/gjiten/general/numofdics", conf->numofdics, NULL); - gconf_client_set_int(gconf_client, "/apps/gjiten/general/numofdics", 0, NULL); -+ g_settings_set_boolean(settings, "bigwords", conf->bigwords); -+ g_settings_set_boolean(settings, "bigkanji", conf->bigkanji); -+ g_settings_set_string(settings, "largefont", conf->largefont == NULL ? "" : conf->largefont); -+ g_settings_set_string(settings, "normalfont", conf->normalfont == NULL ? "" : conf->normalfont); -+ g_settings_set_boolean(settings, "gdk-use-xft", conf->gdk_use_xft); -+ g_settings_set_boolean(settings, "force-ja-jp", conf->force_ja_JP); -+ g_settings_set_boolean(settings, "force-language-c", conf->force_language_c); -+ g_settings_set_boolean(settings, "envvar-override", conf->envvar_override); - +- - gconf_client_set_bool(gconf_client, "/apps/gjiten/general/bigwords", conf->bigwords, NULL); - gconf_client_set_bool(gconf_client, "/apps/gjiten/general/bigkanji", conf->bigkanji, NULL); - gconf_client_set_string(gconf_client, "/apps/gjiten/general/largefont", conf->largefont == NULL ? "" : conf->largefont, NULL); @@ -806,6 +675,15 @@ - gconf_client_set_bool(gconf_client, "/apps/gjiten/general/search_kata_on_hira", conf->search_kata_on_hira, NULL); - gconf_client_set_bool(gconf_client, "/apps/gjiten/general/search_hira_on_kata", conf->search_hira_on_kata, NULL); - gconf_client_set_bool(gconf_client, "/apps/gjiten/general/deinflection_enabled", conf->verb_deinflection, NULL); ++ g_settings_set_boolean(settings, "bigwords", conf->bigwords); ++ g_settings_set_boolean(settings, "bigkanji", conf->bigkanji); ++ g_settings_set_string(settings, "largefont", conf->largefont == NULL ? "" : conf->largefont); ++ g_settings_set_string(settings, "normalfont", conf->normalfont == NULL ? "" : conf->normalfont); ++ g_settings_set_boolean(settings, "gdk-use-xft", conf->gdk_use_xft); ++ g_settings_set_boolean(settings, "force-ja-jp", conf->force_ja_JP); ++ g_settings_set_boolean(settings, "force-language-c", conf->force_language_c); ++ g_settings_set_boolean(settings, "envvar-override", conf->envvar_override); ++ + g_settings_set_boolean(settings, "search-kata-on-hira", conf->search_kata_on_hira); + g_settings_set_boolean(settings, "search-hira-on-kata", conf->search_hira_on_kata); + g_settings_set_boolean(settings, "deinflection-enabled", conf->verb_deinflection); @@ -898,22 +776,8 @@ + kanji_settings = NULL; } } -+ -+void conf_display_migration_info(GjitenConfig *conf, GtkWindow *parent) { -+ GtkWidget *dlg; -+ -+ dlg = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT, -+ GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, -+ "%s", conf->gconf_migration); -+ g_free(conf->gconf_migration); -+ conf->gconf_migration = NULL; -+ gtk_dialog_run(GTK_DIALOG(dlg)); -+ gtk_widget_destroy(dlg); -+} -diff --git a/src/conf.h b/src/conf.h -index 95773f2..c667cfa 100644 ---- a/src/conf.h -+++ b/src/conf.h +--- gjiten-2.6.orig/src/conf.h ++++ gjiten-2.6/src/conf.h @@ -25,7 +25,6 @@ #define __CONF_H__ @@ -922,7 +786,7 @@ #include <pango/pango-font.h> #include "kanjidic.h" -@@ -40,9 +39,7 @@ struct _GjitenConfig { +@@ -40,9 +39,7 @@ GjitenDicfile *kanjidic; GSList *dicfile_list; @@ -933,28 +797,20 @@ gboolean kdiccfg[KCFGNUM]; gboolean bigwords; gboolean bigkanji; -@@ -74,9 +71,7 @@ struct _GjitenConfig { +@@ -73,11 +70,6 @@ + GjitenDicfile *selected_dic; GjitenDicfile *mmaped_dicfile; PangoFontDescription *normalfont_desc; - +- - /* DEPRECATED */ - char *dictpath; - int numofdics; -+ gchar *gconf_migration; - +- }; -@@ -87,5 +82,6 @@ void conf_save_history(GList *history, GjitenConfig *conf); - void conf_save_options(GjitenConfig *conf); - gboolean conf_init_handler(); - void conf_close_handler(); -+void conf_display_migration_info(GjitenConfig *conf, GtkWindow *parent); - #endif -diff --git a/src/gjiten.c b/src/gjiten.c -index 278fac4..f452c27 100644 ---- a/src/gjiten.c -+++ b/src/gjiten.c +--- gjiten-2.6.orig/src/gjiten.c ++++ gjiten-2.6/src/gjiten.c @@ -28,7 +28,6 @@ #include <string.h> #include <glib/gi18n.h> @@ -963,25 +819,9 @@ #ifdef HAVE_INTTYPES_H #include <inttypes.h> #endif -diff --git a/src/kanjidic.c b/src/kanjidic.c -index 06041e6..ac94947 100644 ---- a/src/kanjidic.c -+++ b/src/kanjidic.c -@@ -1045,6 +1045,9 @@ KanjiDic *kanjidic_create() { - g_signal_connect(G_OBJECT(kanjiDic->window), "destroy", G_CALLBACK(kanjidic_close), NULL); - gtk_window_set_default_size(GTK_WINDOW(kanjiDic->window), 500, 500); - -+ if (gjitenApp->conf->gconf_migration) -+ conf_display_migration_info(gjitenApp->conf, GTK_WINDOW(kanjiDic->window)); -+ - vbox_maink = gtk_vbox_new(FALSE, 0); - gtk_widget_show(vbox_maink); - gtk_container_add(GTK_CONTAINER(kanjiDic->window), vbox_maink); -diff --git a/src/pref.c b/src/pref.c -index deb15fc..ed7b444 100644 ---- a/src/pref.c -+++ b/src/pref.c -@@ -371,7 +371,6 @@ void preferences_response_cb(GtkDialog *dialog, gint response, gpointer user_dat +--- gjiten-2.6.orig/src/pref.c ++++ gjiten-2.6/src/pref.c +@@ -371,7 +371,6 @@ gjitenApp->conf->verb_deinflection = GTK_TOGGLE_BUTTON(GETWIDGET("checkbutton_verb_deinflection"))->active; gjitenApp->conf->unicode_radicals = GTK_TOGGLE_BUTTON(GETWIDGET("checkbutton_unicode_radicals"))->active; @@ -989,17 +829,3 @@ dicutil_unload_dic(); dicfile_list_free(gjitenApp->conf->dicfile_list); -diff --git a/src/worddic.c b/src/worddic.c -index fddbad3..fe6fc1c 100644 ---- a/src/worddic.c -+++ b/src/worddic.c -@@ -933,6 +933,9 @@ WordDic *worddic_create() { - g_signal_connect(G_OBJECT(wordDic->window), "destroy", G_CALLBACK(worddic_close), NULL); - gtk_window_set_default_size(GTK_WINDOW(wordDic->window), 500, 500); - -+ if (gjitenApp->conf->gconf_migration) -+ conf_display_migration_info(gjitenApp->conf, GTK_WINDOW(wordDic->window)); -+ - dock_main = gtk_bin_get_child(GTK_BIN(wordDic->window)); - gtk_widget_show(dock_main); -