[genius: 1/2] Wed Oct 13 09:38:06 2021 Jiri (George) Lebl <jirka 5z com>




commit c9a3c9d824ef2e3e5dc1aad92ade79755e5ffbc5
Author: Jiri (George) Lebl <jiri lebl gmail com>
Date:   Wed Oct 13 09:38:44 2021 -0500

    Wed Oct 13 09:38:06 2021  Jiri (George) Lebl <jirka 5z com>
    
            * src/gnome-genius.c: Make icons optional (ifdef'ed out), it actually
              seems to me to look better without.

 ChangeLog          |  5 +++++
 NEWS               |  3 ++-
 src/gnome-genius.c | 14 ++++++++++++++
 3 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6aaee456..56ca3d0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Oct 13 09:38:06 2021  Jiri (George) Lebl <jirka 5z com>
+
+       * src/gnome-genius.c: Make icons optional (ifdef'ed out), it actually
+         seems to me to look better without.
+
 Wed Oct 13 00:39:40 2021  Jiri (George) Lebl <jirka 5z com>
 
        * src/gnome-genius.[ch]. src/graphing.[ch]: Remove use of amtk and
diff --git a/NEWS b/NEWS
index cf10d959..4d7957d0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,8 @@
 Changes to 1.0.27
 
 * Add Save button to toolbar
-* Closing window acts like the quit button/menu item
+* Closing window acts exactly like the quit button/menu item
+* Remove menu icons
 
 Changes to 1.0.26
 
diff --git a/src/gnome-genius.c b/src/gnome-genius.c
index 26112ca1..1d107838 100644
--- a/src/gnome-genius.c
+++ b/src/gnome-genius.c
@@ -63,6 +63,9 @@
 
 #include "gnome-genius.h"
 
+/* if we want icons on menus, right now it seems to me it looks better without */
+/*#define ICONS_ON_MENUS 1*/
+
 /*Globals:*/
 
 const gboolean genius_is_gui = TRUE;
@@ -268,6 +271,7 @@ static void fork_helper_setup_comm (void);
 static void new_program (const char *filename,
                         gboolean example);
 
+/* right now we're ignoring the icon, see ICONS_ON_MENUS */
 typedef struct {
        const char *path;
        const char *icon;
@@ -300,8 +304,10 @@ create_menu (const GeniusMenuItem entries[])
 {
        GtkWidget *menu;
        GtkWidget *item;
+#ifdef ICONS_ON_MENUS
        GtkWidget *image;
        GtkWidget *box;
+#endif
        GtkWidget *label;
        guint acckey;
        GdkModifierType accmods;
@@ -317,12 +323,14 @@ create_menu (const GeniusMenuItem entries[])
                        g_hash_table_insert (genius_menu_items,
                                             g_strdup (entries[i].path),
                                             item);
+#ifdef ICONS_ON_MENUS
                        box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
                        if (entries[i].icon != NULL) {
                                image = gtk_image_new_from_icon_name (entries[i].icon,
                                                                      GTK_ICON_SIZE_MENU);
                                gtk_container_add (GTK_CONTAINER (box), image);
                        }
+#endif
 
                        label = gtk_accel_label_new (_(entries[i].name));
 
@@ -344,9 +352,13 @@ create_menu (const GeniusMenuItem entries[])
                                }
                        }
 
+#ifdef ICONS_ON_MENUS
                        gtk_box_pack_end (GTK_BOX (box), label, TRUE, TRUE, 0);
 
                        gtk_container_add (GTK_CONTAINER (item), box);
+#else
+                       gtk_container_add (GTK_CONTAINER (item), label);
+#endif
 
                        if (entries[i].callback != NULL) {
                                g_signal_connect (G_OBJECT (item), "activate",
@@ -373,6 +385,8 @@ create_menu (const GeniusMenuItem entries[])
        return menu;
 }
 
+/* right now we're ignoring the icon, see ICONS_ON_MENUS */
+
 static const GeniusMenuItem file_entries[] = {
         { "app.new", "document-new", N_("_New Program"),
           "<Control>n", N_("Create new program tab"),


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