@eht16 requested changes on this pull request. Apart from the few comments, it looks very good.
By accident I found https://github.com/geany/geany/issues/2112 which would be solved by this as well. Maybe you could add "closes #2112 and #3344" to the commit message and rephrase it a bit as "display size" might be confused with the size of the monitor. Maybe something like "Make tab label length configurable". > @@ -1303,6 +1305,7 @@ on_prefs_dialog_response(GtkDialog *dialog, gint > response, gpointer user_data) ui_save_buttons_toggle((doc != NULL) ? doc->changed : FALSE); msgwin_show_hide_tabs(); ui_update_statusbar(doc, -1); + document_update_tab_label(doc); This should be a few lines above within the loop over *all* open documents. Here it updates only the current document but not the others. > @@ -72,6 +72,8 @@ typedef struct GeanyInterfacePrefs /** whether to show a warning when closing a project to open a new one */ gboolean warn_on_project_close; gint openfiles_path_mode; + /** number of characters of a filename to be visible on the tab label */ + gint tab_label_len; This struct is part of the plugin API, so we need to bump the plugin API version to reflect the addition. See https://github.com/geany/geany/blob/master/src/plugindata.h#L60 (simply increase the value by 1). > @@ -434,7 +434,7 @@ void document_update_tab_label(GeanyDocument *doc) g_return_if_fail(doc != NULL); - short_name = document_get_basename_for_display(doc, -1); + short_name = document_get_basename_for_display(doc, interface_prefs.tab_label_len); I wonder if we should use the new setting in https://github.com/geany/geany/blob/master/src/ui_utils.c#L386 as well (this sets the window title). > @@ -2193,6 +2200,49 @@ <property name="position">4</property> </packing> </child> + <child> + <!-- n-columns=2 n-rows=1 --> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="column-spacing">10</property> + <child> + <object class="GtkLabel" id="label251"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="tooltip-text" translatable="yes">Set limit on visible characters in tab label.</property> + <property name="label" translatable="yes">Tab Label Length:</property> To be consistent with the other settings, I would suggest to capitalize only the first word: "Tab label length:" -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/3365#pullrequestreview-1249227646 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany/pull/3365/review/1249227...@github.com>