b4n left a comment (geany/geany#4286)
This probably would need to be behind a pref because screen estate is very
valued by some, but why not.
<details>
<summary>here's a POC (don't use this for proper implementation, it's pretty
dumb):</summary>
```diff
diff --git a/src/notebook.c b/src/notebook.c
index 4b3672694..31eef389b 100644
--- a/src/notebook.c
+++ b/src/notebook.c
@@ -694,6 +694,14 @@ static void notebook_tab_close_button_style_set(GtkWidget
*btn, GtkRcStyle *prev
}
+static void on_filetype_set(GObject *dummy, GeanyDocument *doc, GeanyFiletype
*old_ft, gpointer data_)
+{
+ gpointer *data = data_;
+
+ if (doc == data[0])
+ gtk_image_set_from_gicon(data[1], doc->file_type->icon,
GTK_ICON_SIZE_MENU);
+}
+
/* Returns page number of notebook page, or -1 on error
*
* Note: the widget added to the notebook is *not* shown by this function, so
you have to call
@@ -732,6 +740,17 @@ gint notebook_new_tab(GeanyDocument *this)
gtk_widget_add_events(GTK_WIDGET(this->priv->tab_label),
GDK_SCROLL_MASK);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
+
+ if (1)
+ {
+ GtkWidget *image = gtk_image_new_from_gicon(this->file_type ?
this->file_type->icon : NULL, GTK_ICON_SIZE_MENU);
+ gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
+ gpointer *data = g_malloc_n(2, sizeof *data);
+ data[0] = this;
+ data[1] = image;
+ g_signal_connect_data(geany_object, "document-filetype-set",
G_CALLBACK(on_filetype_set), data, g_free, 0);
+ }
+
gtk_box_pack_start(GTK_BOX(hbox), this->priv->tab_label, FALSE, FALSE,
0);
gtk_container_add(GTK_CONTAINER(ebox), hbox);
```
</details>
It would look like this (Adwaita here, complain at will 😉):

--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/4286#issuecomment-2795272229
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/4286/[email protected]>