[gimp/wip/tile-damage: 2/3] app: Add "misc" group to the dashboard



commit a81c5f7e214a919e5310518010f9f889385177f9
Author: Ell <ell_se yahoo com>
Date:   Sat Mar 31 11:43:15 2018 -0400

    app: Add "misc" group to the dashboard
    
    ... which currently has a single "mipmapped" field, which shows the
    total size of processed mipmapped data.

 app/widgets/gimpdashboard.c |   37 +++++++++++++++++++++++++++++++++++--
 1 files changed, 35 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpdashboard.c b/app/widgets/gimpdashboard.c
index f0cbd49..d93d351 100644
--- a/app/widgets/gimpdashboard.c
+++ b/app/widgets/gimpdashboard.c
@@ -93,6 +93,9 @@ typedef enum
   VARIABLE_CPU_ACTIVE_TIME,
 #endif
 
+  /* misc */
+  VARIABLE_MIPMAPED,
+
 
   N_VARIABLES,
 
@@ -118,6 +121,7 @@ typedef enum
 #ifdef HAVE_CPU_GROUP
   GROUP_CPU,
 #endif
+  GROUP_MISC,
 
   N_GROUPS
 } Group;
@@ -448,8 +452,20 @@ static const VariableInfo variables[] =
     .color            = {0.8, 0.7, 0.2, 0.4},
     .sample_func      = gimp_dashboard_sample_cpu_active_time,
     .reset_func       = gimp_dashboard_reset_cpu_active_time
-  }
+  },
 #endif /* HAVE_CPU_GROUP */
+
+
+  /* misc variables */
+
+  [VARIABLE_MIPMAPED] =
+  { .name             = "mipmapped",
+    .title            = NC_("dashboard-variable", "Mipmapped"),
+    .description      = N_("Total size of processed mipmapped data"),
+    .type             = VARIABLE_TYPE_SIZE,
+    .sample_func      = gimp_dashboard_sample_gegl_stats,
+    .data             = "zoom-total"
+  },
 };
 
 static const GroupInfo groups[] =
@@ -545,8 +561,25 @@ static const GroupInfo groups[] =
 
                           {}
                         }
-  }
+  },
 #endif /* HAVE_CPU_GROUP */
+
+  /* misc group */
+  [GROUP_MISC] =
+  { .name             = "misc",
+    .title            = NC_("dashboard-group", "Misc"),
+    .description      = N_("Miscellaneous information"),
+    .default_expanded = FALSE,
+    .has_meter        = FALSE,
+    .fields           = (const FieldInfo[])
+                        {
+                          { .variable       = VARIABLE_MIPMAPED,
+                            .default_active = TRUE
+                          },
+
+                          {}
+                        }
+  },
 };
 
 


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