From a34220c7d2a99bad2330098b2426645df037136b Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Tue, 19 Feb 2019 16:05:39 -0700 Subject: [PATCH] LinGui: adjust the size of subtitle widgets Make language text smaller. Some of the native characters are quite tall and result in an overly tall widget. Fixes https://github.com/HandBrake/HandBrake/issues/1869 --- gtk/src/ghb.m4 | 6 ++++-- gtk/src/hb-backend.c | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gtk/src/ghb.m4 b/gtk/src/ghb.m4 index 108a89aef..a9cb6ea8b 100644 --- a/gtk/src/ghb.m4 +++ b/gtk/src/ghb.m4 @@ -8345,7 +8345,7 @@ This value will be used by players in subtitle menus. - GTK_ALIGN_CENTER + GTK_ALIGN_FILL 150 True False @@ -8355,8 +8355,8 @@ This value will be used by players in subtitle menus. SRTs come in all flavours of character sets. We translate the character set to UTF-8. The source's character code is needed in order to perform this translation. - True + True True @@ -8389,6 +8389,8 @@ The source's character code is needed in order to perform this translation. + GTK_ALIGN_FILL + False 8 True True diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index a638487f6..b80bed556 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -1980,12 +1980,12 @@ language_opts_set(signal_user_data_t *ud, const gchar *name, for (iso639 = lang_get_next(NULL), ii = 0; iso639 != NULL; iso639 = lang_get_next(iso639), ii++) { - const gchar *lang; + gchar *lang; if (iso639->native_name[0] != 0) - lang = iso639->native_name; + lang = g_strdup_printf("%s", iso639->native_name); else - lang = iso639->eng_name; + lang = g_strdup_printf("%s", iso639->eng_name); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, @@ -1994,6 +1994,7 @@ language_opts_set(signal_user_data_t *ud, const gchar *name, 2, iso639->iso639_2, 3, (gdouble)ii, -1); + g_free(lang); } g_signal_connect(combo, "key-press-event", combo_search_key_press_cb, ud); } -- 2.40.0