[gnome-commander] Underscore the active directory indicator when it is getting active



commit 71b5d32f200813d2f46a3d7655a2b05ac5e2298b
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Thu Jan 20 21:31:15 2022 +0100

    Underscore the active directory indicator when it is getting active

 src/gnome-cmd-dir-indicator.cc | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-dir-indicator.cc b/src/gnome-cmd-dir-indicator.cc
index 3000abdd..2979a83d 100644
--- a/src/gnome-cmd-dir-indicator.cc
+++ b/src/gnome-cmd-dir-indicator.cc
@@ -777,7 +777,25 @@ void gnome_cmd_dir_indicator_set_dir (GnomeCmdDirIndicator *indicator, GnomeCmdD
 }
 
 
-void gnome_cmd_dir_indicator_set_active (GnomeCmdDirIndicator *indicator, gboolean value)
+void gnome_cmd_dir_indicator_set_active (GnomeCmdDirIndicator *indicator, gboolean active)
 {
-    // FIXME: Do something creative here
+    switch (active)
+    {
+        case true:
+        {
+            auto tmpLabelText = g_strdup (gtk_label_get_text (GTK_LABEL (indicator->priv->label)));
+            gchar *result = g_strdup_printf("<span font_family=\"monospace\" underline=\"low\">%s</span>", 
tmpLabelText);
+            gtk_label_set_markup (GTK_LABEL (indicator->priv->label), result);
+            g_free (tmpLabelText);
+            break;
+        }
+        case false:
+        {
+            auto tmpLabelText = g_strdup (gtk_label_get_text (GTK_LABEL (indicator->priv->label)));
+            gchar *result = g_strdup_printf("<span font_family=\"monospace\">%s</span>", tmpLabelText);
+            gtk_label_set_markup (GTK_LABEL (indicator->priv->label), result);
+            g_free (tmpLabelText);
+            break;
+        }
+    }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]