app, menus, icons: add dashboard dockable

The dashboard dockable shows the current GEGL cache and swap sizes,
and their recent history.  It has options to control the update
rate and history duration of the data, and an option to warn (by
raising/blinking the dialog) when the swap size approaches its
limit.
This commit is contained in:
Ell 2017-12-18 18:54:17 -05:00
parent 8f3cb718ef
commit 981e8dcdfe
31 changed files with 1874 additions and 226 deletions

View File

@ -44,6 +44,10 @@ libappactions_a_SOURCES = \
cursor-info-actions.h \ cursor-info-actions.h \
cursor-info-commands.c \ cursor-info-commands.c \
cursor-info-commands.h \ cursor-info-commands.h \
dashboard-actions.c \
dashboard-actions.h \
dashboard-commands.c \
dashboard-commands.h \
data-commands.c \ data-commands.c \
data-commands.h \ data-commands.h \
data-editor-commands.c \ data-editor-commands.c \

View File

@ -57,6 +57,7 @@
#include "colormap-actions.h" #include "colormap-actions.h"
#include "context-actions.h" #include "context-actions.h"
#include "cursor-info-actions.h" #include "cursor-info-actions.h"
#include "dashboard-actions.h"
#include "debug-actions.h" #include "debug-actions.h"
#include "dialogs-actions.h" #include "dialogs-actions.h"
#include "dock-actions.h" #include "dock-actions.h"
@ -128,6 +129,9 @@ static const GimpActionFactoryEntry action_groups[] =
{ "cursor-info", N_("Pointer Information"), NULL, { "cursor-info", N_("Pointer Information"), NULL,
cursor_info_actions_setup, cursor_info_actions_setup,
cursor_info_actions_update }, cursor_info_actions_update },
{ "dashboard", N_("Dashboard"), GIMP_ICON_DIALOG_DASHBOARD,
dashboard_actions_setup,
dashboard_actions_update },
{ "debug", N_("Debug"), NULL, { "debug", N_("Debug"), NULL,
debug_actions_setup, debug_actions_setup,
debug_actions_update }, debug_actions_update },

View File

@ -0,0 +1,193 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpdashboard.h"
#include "widgets/gimphelp-ids.h"
#include "dashboard-actions.h"
#include "dashboard-commands.h"
#include "gimp-intl.h"
static const GimpActionEntry dashboard_actions[] =
{
{ "dashboard-popup", GIMP_ICON_DIALOG_DASHBOARD,
NC_("dashboard-action", "Dashboard Menu"), NULL, NULL, NULL,
GIMP_HELP_DASHBOARD_DIALOG },
{ "dashboard-update-interval", NULL,
NC_("dashboard-action", "Update Interval") },
{ "dashboard-history-duration", NULL,
NC_("dashboard-action", "History Duration") }
};
static const GimpToggleActionEntry dashboard_toggle_actions[] =
{
{ "dashboard-low-swap-space-warning", NULL,
NC_("dashboard-action", "Low Swap Space Warning"), NULL,
N_("Raise the dashboard when the swap size approaches its limit"),
G_CALLBACK (dashboard_low_swap_space_warning_cmd_callback),
FALSE,
GIMP_HELP_DASHBOARD_LOW_SWAP_SPACE_WARNING }
};
static const GimpRadioActionEntry dashboard_update_interval_actions[] =
{
{ "dashboard-update-interval-0-25-sec", NULL,
NC_("dashboard-update-interval", "0.25 Seconds"), NULL, NULL,
GIMP_DASHBOARD_UPDATE_INTERVAL_0_25_SEC,
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
{ "dashboard-update-interval-0-5-sec", NULL,
NC_("dashboard-update-interval", "0.5 Seconds"), NULL, NULL,
GIMP_DASHBOARD_UPDATE_INTERVAL_0_5_SEC,
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
{ "dashboard-update-interval-1-sec", NULL,
NC_("dashboard-update-interval", "1 Second"), NULL, NULL,
GIMP_DASHBOARD_UPDATE_INTERVAL_1_SEC,
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
{ "dashboard-update-interval-2-sec", NULL,
NC_("dashboard-update-interval", "2 Seconds"), NULL, NULL,
GIMP_DASHBOARD_UPDATE_INTERVAL_2_SEC,
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
{ "dashboard-update-interval-4-sec", NULL,
NC_("dashboard-update-interval", "4 Seconds"), NULL, NULL,
GIMP_DASHBOARD_UPDATE_INTERVAL_4_SEC,
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL }
};
static const GimpRadioActionEntry dashboard_history_duration_actions[] =
{
{ "dashboard-history-duration-15-sec", NULL,
NC_("dashboard-history-duration", "15 Seconds"), NULL, NULL,
GIMP_DASHBOARD_HISTORY_DURATION_15_SEC,
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
{ "dashboard-history-duration-30-sec", NULL,
NC_("dashboard-history-duration", "30 Seconds"), NULL, NULL,
GIMP_DASHBOARD_HISTORY_DURATION_30_SEC,
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
{ "dashboard-history-duration-60-sec", NULL,
NC_("dashboard-history-duration", "60 Seconds"), NULL, NULL,
GIMP_DASHBOARD_HISTORY_DURATION_60_SEC,
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
{ "dashboard-history-duration-120-sec", NULL,
NC_("dashboard-history-duration", "120 Seconds"), NULL, NULL,
GIMP_DASHBOARD_HISTORY_DURATION_120_SEC,
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
{ "dashboard-history-duration-240-sec", NULL,
NC_("dashboard-history-duration", "240 Seconds"), NULL, NULL,
GIMP_DASHBOARD_HISTORY_DURATION_240_SEC,
GIMP_HELP_DASHBOARD_HISTORY_DURATION }
};
void
dashboard_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group, "dashboard-action",
dashboard_actions,
G_N_ELEMENTS (dashboard_actions));
gimp_action_group_add_toggle_actions (group, "dashboard-action",
dashboard_toggle_actions,
G_N_ELEMENTS (dashboard_toggle_actions));
gimp_action_group_add_radio_actions (group, "dashboard-update-interval",
dashboard_update_interval_actions,
G_N_ELEMENTS (dashboard_update_interval_actions),
NULL,
0,
G_CALLBACK (dashboard_update_interval_cmd_callback));
gimp_action_group_add_radio_actions (group, "dashboard-history-duration",
dashboard_history_duration_actions,
G_N_ELEMENTS (dashboard_history_duration_actions),
NULL,
0,
G_CALLBACK (dashboard_history_duration_cmd_callback));
}
void
dashboard_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
switch (dashboard->update_interval)
{
case GIMP_DASHBOARD_UPDATE_INTERVAL_0_25_SEC:
SET_ACTIVE ("dashboard-update-interval-0-25-sec", TRUE);
break;
case GIMP_DASHBOARD_UPDATE_INTERVAL_0_5_SEC:
SET_ACTIVE ("dashboard-update-interval-0-5-sec", TRUE);
break;
case GIMP_DASHBOARD_UPDATE_INTERVAL_1_SEC:
SET_ACTIVE ("dashboard-update-interval-1-sec", TRUE);
break;
case GIMP_DASHBOARD_UPDATE_INTERVAL_2_SEC:
SET_ACTIVE ("dashboard-update-interval-2-sec", TRUE);
break;
case GIMP_DASHBOARD_UPDATE_INTERVAL_4_SEC:
SET_ACTIVE ("dashboard-update-interval-4-sec", TRUE);
break;
}
switch (dashboard->history_duration)
{
case GIMP_DASHBOARD_HISTORY_DURATION_15_SEC:
SET_ACTIVE ("dashboard-history-duration-15-sec", TRUE);
break;
case GIMP_DASHBOARD_HISTORY_DURATION_30_SEC:
SET_ACTIVE ("dashboard-history-duration-30-sec", TRUE);
break;
case GIMP_DASHBOARD_HISTORY_DURATION_60_SEC:
SET_ACTIVE ("dashboard-history-duration-60-sec", TRUE);
break;
case GIMP_DASHBOARD_HISTORY_DURATION_120_SEC:
SET_ACTIVE ("dashboard-history-duration-120-sec", TRUE);
break;
case GIMP_DASHBOARD_HISTORY_DURATION_240_SEC:
SET_ACTIVE ("dashboard-history-duration-240-sec", TRUE);
break;
}
SET_ACTIVE ("dashboard-low-swap-space-warning",
dashboard->low_swap_space_warning);
#undef SET_ACTIVE
}

View File

@ -0,0 +1,27 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __DASHBOARD_ACTIONS_H__
#define __DASHBOARD_ACTIONS_H__
void dashboard_actions_setup (GimpActionGroup *group);
void dashboard_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __DASHBOARD_ACTIONS_H__ */

View File

@ -0,0 +1,74 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "widgets/gimpdashboard.h"
#include "widgets/gimphelp-ids.h"
#include "dashboard-commands.h"
#include "gimp-intl.h"
/* public functionss */
void
dashboard_update_interval_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
GimpDashboardUpdateInteval update_interval;
update_interval = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
gimp_dashboard_set_update_interval (dashboard, update_interval);
}
void
dashboard_history_duration_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
GimpDashboardHistoryDuration history_duration;
history_duration = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
gimp_dashboard_set_history_duration (dashboard, history_duration);
}
void
dashboard_low_swap_space_warning_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
gboolean low_swap_space_warning;
low_swap_space_warning = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gimp_dashboard_set_low_swap_space_warning (dashboard, low_swap_space_warning);
}

View File

@ -0,0 +1,33 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __DASHBOARD_COMMANDS_H__
#define __DASHBOARD_COMMANDS_H__
void dashboard_update_interval_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void dashboard_history_duration_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void dashboard_low_swap_space_warning_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __DASHBOARD_COMMANDS_H__ */

View File

@ -233,6 +233,12 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
NC_("dialogs-action", "Error Co_nsole"), NULL, NC_("dialogs-action", "Error Co_nsole"), NULL,
NC_("dialogs-action", "Open the error console"), NC_("dialogs-action", "Open the error console"),
"gimp-error-console", "gimp-error-console",
GIMP_HELP_ERRORS_DIALOG },
{ "dialogs-dashboard", GIMP_ICON_DIALOG_DASHBOARD,
NC_("dialogs-action", "_Dashboard"), NULL,
NC_("dialogs-action", "Open the dashboard"),
"gimp-dashboard",
GIMP_HELP_ERRORS_DIALOG } GIMP_HELP_ERRORS_DIALOG }
}; };

View File

@ -35,6 +35,7 @@
#include "widgets/gimpchanneltreeview.h" #include "widgets/gimpchanneltreeview.h"
#include "widgets/gimpcoloreditor.h" #include "widgets/gimpcoloreditor.h"
#include "widgets/gimpcolormapeditor.h" #include "widgets/gimpcolormapeditor.h"
#include "widgets/gimpdashboard.h"
#include "widgets/gimpdevicestatus.h" #include "widgets/gimpdevicestatus.h"
#include "widgets/gimpdialogfactory.h" #include "widgets/gimpdialogfactory.h"
#include "widgets/gimpdockwindow.h" #include "widgets/gimpdockwindow.h"
@ -344,6 +345,16 @@ dialogs_cursor_view_new (GimpDialogFactory *factory,
return gimp_cursor_view_new (gimp_dialog_factory_get_menu_factory (factory)); return gimp_cursor_view_new (gimp_dialog_factory_get_menu_factory (factory));
} }
GtkWidget *
dialogs_dashboard_new (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager,
gint view_size)
{
return gimp_dashboard_new (context->gimp,
gimp_dialog_factory_get_menu_factory (factory));
}
/***** list views *****/ /***** list views *****/

View File

@ -125,6 +125,10 @@ GtkWidget * dialogs_cursor_view_new (GimpDialogFactory *factory,
GimpContext *context, GimpContext *context,
GimpUIManager *ui_manager, GimpUIManager *ui_manager,
gint view_size); gint view_size);
GtkWidget * dialogs_dashboard_new (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager,
gint view_size);
GtkWidget * dialogs_image_list_view_new (GimpDialogFactory *factory, GtkWidget * dialogs_image_list_view_new (GimpDialogFactory *factory,
GimpContext *context, GimpContext *context,

View File

@ -320,6 +320,10 @@ static const GimpDialogFactoryEntry entries[] =
N_("Pointer"), N_("Pointer Information"), GIMP_ICON_CURSOR, N_("Pointer"), N_("Pointer Information"), GIMP_ICON_CURSOR,
GIMP_HELP_POINTER_INFO_DIALOG, GIMP_HELP_POINTER_INFO_DIALOG,
dialogs_cursor_view_new, 0, TRUE), dialogs_cursor_view_new, 0, TRUE),
DOCKABLE ("gimp-dashboard",
N_("Dashboard"), N_("Dashboard"), GIMP_ICON_DIALOG_DASHBOARD,
GIMP_HELP_ERRORS_DIALOG,
dialogs_dashboard_new, 0, TRUE),
/* list & grid views */ /* list & grid views */
LISTGRID (image, image, LISTGRID (image, image,

View File

@ -387,6 +387,14 @@ menus_init (Gimp *gimp,
"sample-points-menu.xml", "sample-points-menu.xml",
NULL, NULL,
NULL); NULL);
gimp_menu_factory_manager_register (global_menu_factory, "<Dashboard>",
"dashboard",
NULL,
"/dashboard-popup",
"dashboard-menu.xml",
NULL,
NULL);
} }
void void

View File

@ -120,6 +120,8 @@ libappwidgets_a_sources = \
gimpcursor.h \ gimpcursor.h \
gimpcurveview.c \ gimpcurveview.c \
gimpcurveview.h \ gimpcurveview.h \
gimpdashboard.c \
gimpdashboard.h \
gimpdasheditor.c \ gimpdasheditor.c \
gimpdasheditor.h \ gimpdasheditor.h \
gimpdataeditor.c \ gimpdataeditor.c \

818
app/widgets/gimpdashboard.c Normal file
View File

@ -0,0 +1,818 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
*
* gimpdashboard.c
* Copyright (C) 2017 Ell
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <stdlib.h>
#include <gegl.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "widgets-types.h"
#include "core/gimp.h"
#include "gimpdocked.h"
#include "gimpdashboard.h"
#include "gimpdialogfactory.h"
#include "gimpmeter.h"
#include "gimpsessioninfo-aux.h"
#include "gimpwindowstrategy.h"
#include "gimp-intl.h"
#define DEFAULT_UPDATE_INTERVAL GIMP_DASHBOARD_UPDATE_INTERVAL_0_25_SEC
#define DEFAULT_HISTORY_DURATION GIMP_DASHBOARD_HISTORY_DURATION_60_SEC
#define DEFAULT_LOW_SWAP_SPACE_WARNING TRUE
#define LOW_SWAP_SPACE_WARNING_ON /* swap occupied is above */ 0.90 /* times swap limit */
#define LOW_SWAP_SPACE_WARNING_OFF /* swap occupied is below */ 0.85 /* times swap limit */
#define CACHE_OCCUPIED_COLOR {0.3, 0.6, 0.3, 1.0}
#define SWAP_OCCUPIED_COLOR {0.8, 0.2, 0.2, 1.0}
#define SWAP_SIZE_COLOR {0.8, 0.6, 0.4, 1.0}
static void gimp_dashboard_docked_iface_init (GimpDockedInterface *iface);
static void gimp_dashboard_finalize (GObject *object);
static void gimp_dashboard_map (GtkWidget *widget);
static void gimp_dashboard_unmap (GtkWidget *widget);
static void gimp_dashboard_set_aux_info (GimpDocked *docked,
GList *aux_info);
static GList * gimp_dashboard_get_aux_info (GimpDocked *docked);
static gboolean gimp_dashboard_update (GimpDashboard *dashboard);
static gboolean gimp_dashboard_low_swap_space (GimpDashboard *dashboard);
static gpointer gimp_dashboard_sample (GimpDashboard *dashboard);
static void gimp_dashboard_label_set_text (GtkLabel *label,
const gchar *text);
static void gimp_dashboard_label_set_size (GtkLabel *label,
guint64 size,
guint64 limit);
static guint64 gimp_dashboard_get_swap_limit (guint64 swap_size);
G_DEFINE_TYPE_WITH_CODE (GimpDashboard, gimp_dashboard, GIMP_TYPE_EDITOR,
G_IMPLEMENT_INTERFACE (GIMP_TYPE_DOCKED,
gimp_dashboard_docked_iface_init))
#define parent_class gimp_dashboard_parent_class
static GimpDockedInterface *parent_docked_iface = NULL;
/* private functions */
static void
gimp_dashboard_class_init (GimpDashboardClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->finalize = gimp_dashboard_finalize;
widget_class->map = gimp_dashboard_map;
widget_class->unmap = gimp_dashboard_unmap;
}
static void
gimp_dashboard_init (GimpDashboard *dashboard)
{
GtkWidget *box;
GtkWidget *vbox;
GtkWidget *frame;
GtkWidget *table;
GtkWidget *meter;
GtkWidget *label;
gint content_spacing;
dashboard->update_interval = DEFAULT_UPDATE_INTERVAL;
dashboard->history_duration = DEFAULT_HISTORY_DURATION;
dashboard->low_swap_space_warning = DEFAULT_LOW_SWAP_SPACE_WARNING;
gtk_widget_style_get (GTK_WIDGET (dashboard),
"content-spacing", &content_spacing,
NULL);
/* we put the dashboard inside an event box, so that it gets its own window,
* which reduces the overhead of updating the ui, since it gets updated
* frequently. unfortunately, this means that the dashboard's background
* color may be a bit off for some themes.
*/
box = dashboard->box = gtk_event_box_new ();
gtk_box_pack_start (GTK_BOX (dashboard), box, TRUE, TRUE, 0);
gtk_widget_show (box);
/* main vbox */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2 * content_spacing);
gtk_container_add (GTK_CONTAINER (box), vbox);
gtk_widget_show (vbox);
/* cache frame */
frame = gimp_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
/* cache frame label */
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_label_widget (GTK_FRAME (frame), box);
gtk_widget_show (box);
label = gtk_label_new (_("Cache"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gimp_label_set_attributes (GTK_LABEL (label),
PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD,
-1);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);
/* cache table */
table = gtk_table_new (3, 2, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), content_spacing);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
/* cache meter */
meter = dashboard->cache_meter = gimp_meter_new (1);
gimp_meter_set_color (GIMP_METER (meter),
0, &(GimpRGB) CACHE_OCCUPIED_COLOR);
gimp_meter_set_history_resolution (GIMP_METER (meter),
dashboard->update_interval / 1000.0);
gimp_meter_set_history_duration (GIMP_METER (meter),
dashboard->history_duration / 1000.0);
gtk_table_attach (GTK_TABLE (table), meter, 0, 2, 0, 1,
GTK_EXPAND | GTK_FILL, 0, 1, 0);
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2 * content_spacing);
gtk_widget_show (meter);
/* cache occupied field */
label = gtk_label_new (_("Occupied:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
label = dashboard->cache_occupied_label = gtk_label_new (_("N/A"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
/* cache limit field */
label = gtk_label_new (_("Limit:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
label = dashboard->cache_limit_label = gtk_label_new (_("N/A"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 1, 2, 2, 3,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
/* swap frame */
frame = gimp_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
/* swap frame label */
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_label_widget (GTK_FRAME (frame), box);
gtk_widget_show (box);
label = gtk_label_new (_("Swap"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gimp_label_set_attributes (GTK_LABEL (label),
PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD,
-1);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);
/* swap table */
table = gtk_table_new (4, 2, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), content_spacing);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
/* swap meter */
meter = dashboard->swap_meter = gimp_meter_new (2);
gimp_meter_set_color (GIMP_METER (meter),
0, &(GimpRGB) SWAP_SIZE_COLOR);
gimp_meter_set_color (GIMP_METER (meter),
1, &(GimpRGB) SWAP_OCCUPIED_COLOR);
gimp_meter_set_history_resolution (GIMP_METER (meter),
dashboard->update_interval / 1000.0);
gimp_meter_set_history_duration (GIMP_METER (meter),
dashboard->history_duration / 1000.0);
gimp_meter_set_led_color (GIMP_METER (meter),
&(GimpRGB) {0.8, 0.4, 0.4, 1.0});
gtk_table_attach (GTK_TABLE (table), meter, 0, 2, 0, 1,
GTK_EXPAND | GTK_FILL, 0, 1, 0);
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2 * content_spacing);
gtk_widget_show (meter);
/* swap occupied field */
label = gtk_label_new (_("Occupied:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
label = dashboard->swap_occupied_label = gtk_label_new (_("N/A"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
/* swap size field */
label = gtk_label_new (_("Size:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
label = dashboard->swap_size_label = gtk_label_new (_("N/A"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 1, 2, 2, 3,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
/* swap limit field */
label = gtk_label_new (_("Limit:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4,
GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
label = dashboard->swap_limit_label = gtk_label_new (_("N/A"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 1, 2, 3, 4,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show (label);
/* sampler thread */
g_mutex_init (&dashboard->mutex);
g_cond_init (&dashboard->cond);
/* we use a separate thread for sampling, so that data is sampled even when
* the main thread is busy
*/
dashboard->thread = g_thread_new ("dashboard",
(GThreadFunc) gimp_dashboard_sample,
dashboard);
}
static void
gimp_dashboard_docked_iface_init (GimpDockedInterface *iface)
{
parent_docked_iface = g_type_interface_peek_parent (iface);
if (! parent_docked_iface)
parent_docked_iface = g_type_default_interface_peek (GIMP_TYPE_DOCKED);
iface->set_aux_info = gimp_dashboard_set_aux_info;
iface->get_aux_info = gimp_dashboard_get_aux_info;
}
static void
gimp_dashboard_finalize (GObject *object)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (object);
if (dashboard->timeout_id)
{
g_source_remove (dashboard->timeout_id);
dashboard->timeout_id = 0;
}
if (dashboard->low_swap_space_idle_id)
{
g_source_remove (dashboard->low_swap_space_idle_id);
dashboard->low_swap_space_idle_id = 0;
}
if (dashboard->thread)
{
g_mutex_lock (&dashboard->mutex);
dashboard->quit = TRUE;
g_cond_signal (&dashboard->cond);
g_mutex_unlock (&dashboard->mutex);
g_clear_pointer (&dashboard->thread, g_thread_join);
}
g_mutex_clear (&dashboard->mutex);
g_cond_clear (&dashboard->cond);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gimp_dashboard_map (GtkWidget *widget)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (widget);
GTK_WIDGET_CLASS (parent_class)->map (widget);
if (! dashboard->timeout_id)
{
dashboard->timeout_id = g_timeout_add (dashboard->update_interval,
(GSourceFunc) gimp_dashboard_update,
dashboard);
}
}
static void
gimp_dashboard_unmap (GtkWidget *widget)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (widget);
if (dashboard->timeout_id)
{
g_source_remove (dashboard->timeout_id);
dashboard->timeout_id = 0;
}
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
}
#define AUX_INFO_UPDATE_INTERVAL "update-interval"
#define AUX_INFO_HISTORY_DURATION "history-duration"
#define AUX_INFO_LOW_SWAP_SPACE_WARNING "low-swap-space-warning"
static void
gimp_dashboard_set_aux_info (GimpDocked *docked,
GList *aux_info)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (docked);
GList *list;
parent_docked_iface->set_aux_info (docked, aux_info);
for (list = aux_info; list; list = g_list_next (list))
{
GimpSessionInfoAux *aux = list->data;
if (! strcmp (aux->name, AUX_INFO_UPDATE_INTERVAL))
{
gint value = atoi (aux->value);
GimpDashboardUpdateInteval update_interval;
for (update_interval = GIMP_DASHBOARD_UPDATE_INTERVAL_0_25_SEC;
update_interval < value &&
update_interval < GIMP_DASHBOARD_UPDATE_INTERVAL_4_SEC;
update_interval *= 2);
gimp_dashboard_set_update_interval (dashboard, update_interval);
}
else if (! strcmp (aux->name, AUX_INFO_HISTORY_DURATION))
{
gint value = atoi (aux->value);
GimpDashboardHistoryDuration history_duration;
for (history_duration = GIMP_DASHBOARD_HISTORY_DURATION_15_SEC;
history_duration < value &&
history_duration < GIMP_DASHBOARD_HISTORY_DURATION_240_SEC;
history_duration *= 2);
gimp_dashboard_set_history_duration (dashboard, history_duration);
}
else if (! strcmp (aux->name, AUX_INFO_LOW_SWAP_SPACE_WARNING))
{
gimp_dashboard_set_low_swap_space_warning (dashboard,
! strcmp (aux->value, "yes"));
}
}
}
static GList *
gimp_dashboard_get_aux_info (GimpDocked *docked)
{
GimpDashboard *dashboard = GIMP_DASHBOARD (docked);
GList *aux_info;
GimpSessionInfoAux *aux;
gchar *value;
aux_info = parent_docked_iface->get_aux_info (docked);
value = g_strdup_printf ("%d", dashboard->update_interval);
aux = gimp_session_info_aux_new (AUX_INFO_UPDATE_INTERVAL, value);
aux_info = g_list_append (aux_info, aux);
g_free (value);
value = g_strdup_printf ("%d", dashboard->history_duration);
aux = gimp_session_info_aux_new (AUX_INFO_HISTORY_DURATION, value);
aux_info = g_list_append (aux_info, aux);
g_free (value);
value = dashboard->low_swap_space_warning ? "yes" : "no";
aux = gimp_session_info_aux_new (AUX_INFO_LOW_SWAP_SPACE_WARNING, value);
aux_info = g_list_append (aux_info, aux);
return aux_info;
}
static gboolean
gimp_dashboard_update (GimpDashboard *dashboard)
{
/* cache */
{
guint64 cache_occupied;
guint64 cache_limit;
g_object_get (gegl_stats (),
"tile-cache-total", &cache_occupied,
NULL);
g_object_get (gegl_config (),
"tile-cache-size", &cache_limit,
NULL);
gimp_meter_set_range (GIMP_METER (dashboard->cache_meter),
0.0, cache_limit);
gimp_dashboard_label_set_size (GTK_LABEL (dashboard->cache_occupied_label),
cache_occupied, cache_limit);
gimp_dashboard_label_set_size (GTK_LABEL (dashboard->cache_limit_label),
cache_limit, 0);
}
/* swap */
{
guint64 swap_occupied;
guint64 swap_size;
guint64 swap_limit;
gboolean swap_busy;
g_mutex_lock (&dashboard->mutex);
g_object_get (gegl_stats (),
"swap-total", &swap_occupied,
"swap-file-size", &swap_size,
"swap-busy", &swap_busy,
NULL);
swap_limit = gimp_dashboard_get_swap_limit (swap_size);
g_mutex_unlock (&dashboard->mutex);
gimp_meter_set_range (GIMP_METER (dashboard->swap_meter),
0.0, swap_limit ? swap_limit : swap_size);
gimp_meter_set_led_visible (GIMP_METER (dashboard->swap_meter), swap_busy);
gimp_dashboard_label_set_size (GTK_LABEL (dashboard->swap_occupied_label),
swap_occupied, swap_limit);
gimp_dashboard_label_set_size (GTK_LABEL (dashboard->swap_size_label),
swap_size, swap_limit);
if (swap_limit)
{
gimp_dashboard_label_set_size (GTK_LABEL (dashboard->swap_limit_label),
swap_limit, 0);
}
else
{
gimp_dashboard_label_set_text (GTK_LABEL (dashboard->swap_limit_label),
_("N/A"));
}
}
return G_SOURCE_CONTINUE;
}
static gboolean
gimp_dashboard_low_swap_space (GimpDashboard *dashboard)
{
if (dashboard->gimp)
{
GdkScreen *screen;
gint monitor;
monitor = gimp_get_monitor_at_pointer (&screen);
gimp_window_strategy_show_dockable_dialog (
GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (dashboard->gimp)),
dashboard->gimp,
gimp_dialog_factory_get_singleton (),
screen, monitor,
"gimp-dashboard");
g_mutex_lock (&dashboard->mutex);
dashboard->low_swap_space_idle_id = 0;
g_mutex_unlock (&dashboard->mutex);
}
return G_SOURCE_REMOVE;
}
static gpointer
gimp_dashboard_sample (GimpDashboard *dashboard)
{
GimpDashboardUpdateInteval update_interval;
gint64 end_time;
gboolean seen_low_swap_space = FALSE;
g_mutex_lock (&dashboard->mutex);
update_interval = dashboard->update_interval;
end_time = g_get_monotonic_time ();
while (! dashboard->quit)
{
if (! g_cond_wait_until (&dashboard->cond, &dashboard->mutex, end_time))
{
/* cache */
{
guint64 cache_occupied;
gdouble sample[1];
g_object_get (gegl_stats (),
"tile-cache-total", &cache_occupied,
NULL);
sample[0] = cache_occupied;
gimp_meter_add_sample (GIMP_METER (dashboard->cache_meter), sample);
}
/* swap */
{
guint64 swap_occupied;
guint64 swap_size;
gdouble sample[2];
g_object_get (gegl_stats (),
"swap-total", &swap_occupied,
"swap-file-size", &swap_size,
NULL);
sample[0] = swap_size;
sample[1] = swap_occupied;
gimp_meter_add_sample (GIMP_METER (dashboard->swap_meter), sample);
if (dashboard->low_swap_space_warning)
{
guint64 swap_limit = gimp_dashboard_get_swap_limit (swap_size);
if (! seen_low_swap_space &&
swap_occupied >= LOW_SWAP_SPACE_WARNING_ON * swap_limit)
{
if (! dashboard->low_swap_space_idle_id)
{
dashboard->low_swap_space_idle_id =
g_idle_add_full (G_PRIORITY_HIGH,
(GSourceFunc) gimp_dashboard_low_swap_space,
dashboard, NULL);
}
seen_low_swap_space = TRUE;
}
else if (seen_low_swap_space &&
swap_occupied <= LOW_SWAP_SPACE_WARNING_OFF * swap_limit)
{
if (dashboard->low_swap_space_idle_id)
{
g_source_remove (dashboard->low_swap_space_idle_id);
dashboard->low_swap_space_idle_id = 0;
}
seen_low_swap_space = FALSE;
}
}
}
end_time = g_get_monotonic_time () +
update_interval * G_TIME_SPAN_SECOND / 1000;
}
else if (dashboard->update_interval != update_interval)
{
update_interval = dashboard->update_interval;
end_time = g_get_monotonic_time () +
update_interval * G_TIME_SPAN_SECOND / 1000;
}
}
g_mutex_unlock (&dashboard->mutex);
return NULL;
}
static void
gimp_dashboard_label_set_text (GtkLabel *label,
const gchar *text)
{
/* the strcmp() reduces the overhead of gtk_label_set_text() when the text
* isn't changed
*/
if (strcmp (gtk_label_get_text (label), text))
gtk_label_set_text (label, text);
}
static void
gimp_dashboard_label_set_size (GtkLabel *label,
guint64 size,
guint64 limit)
{
gchar *text;
text = g_format_size_full (size, G_FORMAT_SIZE_IEC_UNITS);
if (limit)
{
gchar *temp;
temp = g_strdup_printf ("%s (%d%%)", text, ROUND (100.0 * size / limit));
g_free (text);
text = temp;
}
gimp_dashboard_label_set_text (label, text);
g_free (text);
}
static guint64
gimp_dashboard_get_swap_limit (guint64 swap_size)
{
static guint64 free_space = 0;
static gboolean has_free_space = FALSE;
static gint64 last_check_time = 0;
gint64 time;
/* we don't have a config option for limiting the swap size, so we simply
* return the free space available on the filesystem containing the swap
*/
time = g_get_monotonic_time ();
if (time - last_check_time >= G_TIME_SPAN_SECOND)
{
gchar *swap_dir;
g_object_get (gegl_config (),
"swap", &swap_dir,
NULL);
free_space = 0;
has_free_space = FALSE;
if (swap_dir)
{
GFile *file;
GFileInfo *info;
file = g_file_new_for_path (swap_dir);
info = g_file_query_filesystem_info (file,
G_FILE_ATTRIBUTE_FILESYSTEM_FREE,
NULL, NULL);
if (info)
{
free_space =
g_file_info_get_attribute_uint64 (info,
G_FILE_ATTRIBUTE_FILESYSTEM_FREE);
has_free_space = TRUE;
g_object_unref (info);
}
g_object_unref (file);
g_free (swap_dir);
}
last_check_time = time;
}
/* the swap limit is the sum of free_space and swap_size, since the swap
* itself occupies space in the filesystem
*/
return has_free_space ? free_space + swap_size : 0;
}
/* public functions */
GtkWidget *
gimp_dashboard_new (Gimp *gimp,
GimpMenuFactory *menu_factory)
{
GimpDashboard *dashboard;
dashboard = g_object_new (GIMP_TYPE_DASHBOARD,
"menu-factory", menu_factory,
"menu-identifier", "<Dashboard>",
"ui-path", "/dashboard-popup",
NULL);
dashboard->gimp = gimp;
return GTK_WIDGET (dashboard);
}
void
gimp_dashboard_set_update_interval (GimpDashboard *dashboard,
GimpDashboardUpdateInteval update_interval)
{
g_return_if_fail (GIMP_IS_DASHBOARD (dashboard));
if (update_interval != dashboard->update_interval)
{
g_mutex_lock (&dashboard->mutex);
dashboard->update_interval = update_interval;
gimp_meter_set_history_resolution (GIMP_METER (dashboard->cache_meter),
update_interval / 1000.0);
gimp_meter_set_history_resolution (GIMP_METER (dashboard->swap_meter),
update_interval / 1000.0);
if (dashboard->timeout_id)
{
g_source_remove (dashboard->timeout_id);
dashboard->timeout_id = g_timeout_add (update_interval,
(GSourceFunc) gimp_dashboard_update,
dashboard);
}
g_cond_signal (&dashboard->cond);
g_mutex_unlock (&dashboard->mutex);
}
}
void
gimp_dashboard_set_history_duration (GimpDashboard *dashboard,
GimpDashboardHistoryDuration history_duration)
{
g_return_if_fail (GIMP_IS_DASHBOARD (dashboard));
if (history_duration != dashboard->history_duration)
{
dashboard->history_duration = history_duration;
gimp_meter_set_history_duration (GIMP_METER (dashboard->cache_meter),
history_duration / 1000.0);
gimp_meter_set_history_duration (GIMP_METER (dashboard->swap_meter),
history_duration / 1000.0);
}
}
void
gimp_dashboard_set_low_swap_space_warning (GimpDashboard *dashboard,
gboolean low_swap_space_warning)
{
g_return_if_fail (GIMP_IS_DASHBOARD (dashboard));
if (low_swap_space_warning != dashboard->low_swap_space_warning)
{
g_mutex_lock (&dashboard->mutex);
dashboard->low_swap_space_warning = low_swap_space_warning;
g_mutex_unlock (&dashboard->mutex);
}
}

View File

@ -0,0 +1,90 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpdashboard.h
* Copyright (C) 2017 Ell
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_DASHBOARD_H__
#define __GIMP_DASHBOARD_H__
#include "gimpeditor.h"
#define GIMP_TYPE_DASHBOARD (gimp_dashboard_get_type ())
#define GIMP_DASHBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DASHBOARD, GimpDashboard))
#define GIMP_DASHBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DASHBOARD, GimpDashboardClass))
#define GIMP_IS_DASHBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DASHBOARD))
#define GIMP_IS_DASHBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DASHBOARD))
#define GIMP_DASHBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DASHBOARD, GimpDashboardClass))
typedef struct _GimpDashboardClass GimpDashboardClass;
struct _GimpDashboard
{
GimpEditor parent_instance;
Gimp *gimp;
GtkWidget *box;
GtkWidget *cache_meter;
GtkWidget *cache_occupied_label;
GtkWidget *cache_occupied_pct_label;
GtkWidget *cache_limit_label;
GtkWidget *swap_meter;
GtkWidget *swap_occupied_label;
GtkWidget *swap_occupied_pct_label;
GtkWidget *swap_size_label;
GtkWidget *swap_size_pct_label;
GtkWidget *swap_limit_label;
gint timeout_id;
gint low_swap_space_idle_id;
GThread *thread;
GMutex mutex;
GCond cond;
gboolean quit;
GimpDashboardUpdateInteval update_interval;
GimpDashboardHistoryDuration history_duration;
gboolean low_swap_space_warning;
};
struct _GimpDashboardClass
{
GimpEditorClass parent_class;
};
GType gimp_dashboard_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_dashboard_new (Gimp *gimp,
GimpMenuFactory *menu_factory);
void gimp_dashboard_set_update_interval (GimpDashboard *dashboard,
GimpDashboardUpdateInteval update_interval);
void gimp_dashboard_set_history_duration (GimpDashboard *dashboard,
GimpDashboardHistoryDuration history_duration);
void gimp_dashboard_set_low_swap_space_warning (GimpDashboard *dashboard,
gboolean low_swap_space_warning);
#endif /* __GIMP_DASHBOARD_H__ */

View File

@ -662,6 +662,11 @@
#define GIMP_HELP_SAMPLE_POINT_DIALOG "gimp-sample-point-dialog" #define GIMP_HELP_SAMPLE_POINT_DIALOG "gimp-sample-point-dialog"
#define GIMP_HELP_SAMPLE_POINT_SAMPLE_MERGED "gimp-sample-point-sample-merged" #define GIMP_HELP_SAMPLE_POINT_SAMPLE_MERGED "gimp-sample-point-sample-merged"
#define GIMP_HELP_DASHBOARD_DIALOG "gimp-dashboard-dialog"
#define GIMP_HELP_DASHBOARD_UPDATE_INTERVAL "gimp-dashboard-update-interval"
#define GIMP_HELP_DASHBOARD_HISTORY_DURATION "gimp-dashboard-history-duration"
#define GIMP_HELP_DASHBOARD_LOW_SWAP_SPACE_WARNING "gimp-dashboard-low-swap-space-warning"
#define GIMP_HELP_DOCK "gimp-dock" #define GIMP_HELP_DOCK "gimp-dock"
#define GIMP_HELP_DOCK_CLOSE "gimp-dock-close" #define GIMP_HELP_DOCK_CLOSE "gimp-dock-close"
#define GIMP_HELP_DOCK_IMAGE_MENU "gimp-dock-image-menu" #define GIMP_HELP_DOCK_IMAGE_MENU "gimp-dock-image-menu"

View File

@ -306,5 +306,23 @@ typedef enum /*< skip >*/
GIMP_DIALOGS_HIDDEN_WITH_DISPLAY /* dialogs are hidden with the display */ GIMP_DIALOGS_HIDDEN_WITH_DISPLAY /* dialogs are hidden with the display */
} GimpDialogsState; } GimpDialogsState;
typedef enum /*< skip >*/
{
GIMP_DASHBOARD_UPDATE_INTERVAL_0_25_SEC = 250,
GIMP_DASHBOARD_UPDATE_INTERVAL_0_5_SEC = 500,
GIMP_DASHBOARD_UPDATE_INTERVAL_1_SEC = 1000,
GIMP_DASHBOARD_UPDATE_INTERVAL_2_SEC = 2000,
GIMP_DASHBOARD_UPDATE_INTERVAL_4_SEC = 4000
} GimpDashboardUpdateInteval;
typedef enum /*< skip >*/
{
GIMP_DASHBOARD_HISTORY_DURATION_15_SEC = 15000,
GIMP_DASHBOARD_HISTORY_DURATION_30_SEC = 30000,
GIMP_DASHBOARD_HISTORY_DURATION_60_SEC = 60000,
GIMP_DASHBOARD_HISTORY_DURATION_120_SEC = 120000,
GIMP_DASHBOARD_HISTORY_DURATION_240_SEC = 240000
} GimpDashboardHistoryDuration;
#endif /* __WIDGETS_ENUMS_H__ */ #endif /* __WIDGETS_ENUMS_H__ */

View File

@ -57,6 +57,7 @@ typedef struct _GimpDeviceStatus GimpDeviceStatus;
typedef struct _GimpEditor GimpEditor; typedef struct _GimpEditor GimpEditor;
typedef struct _GimpErrorConsole GimpErrorConsole; typedef struct _GimpErrorConsole GimpErrorConsole;
typedef struct _GimpToolOptionsEditor GimpToolOptionsEditor; typedef struct _GimpToolOptionsEditor GimpToolOptionsEditor;
typedef struct _GimpDashboard GimpDashboard;
/* GimpDataEditor widgets */ /* GimpDataEditor widgets */

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B

View File

@ -61,8 +61,8 @@
inkscape:window-maximized="1" inkscape:window-maximized="1"
inkscape:window-y="24" inkscape:window-y="24"
inkscape:window-x="65" inkscape:window-x="65"
inkscape:cy="181.50558" inkscape:cy="117.27625"
inkscape:cx="960.06476" inkscape:cx="757.84583"
inkscape:zoom="1" inkscape:zoom="1"
showgrid="true" showgrid="true"
id="namedview88" id="namedview88"
@ -40418,7 +40418,7 @@
inkscape:r_cy="true" inkscape:r_cy="true"
inkscape:r_cx="true" inkscape:r_cx="true"
id="path4926" id="path4926"
d="M 7.8738374,1044.3622 C 6.8302869,1044.4246 6,1045.2489 6,1046.2491 c 0,0.039 0.00388,0.075 0.00629,0.1131 h 3.9874254 c 0.00241,-0.038 0.00629,-0.074 0.00629,-0.1131 0,-1.0409 -0.8967429,-1.8869 -2.0000024,-1.8869 -0.043099,0 -0.083767,0 -0.1261851,0 z" d="M 7.8738374,1044.3622 C 6.8302869,1044.4246 6,1045.2489 6,1046.2491 c 0,0.039 0.00388,0.075 0.00629,0.1131 h 3.9874254 c 0.00241,-0.038 0.00629,-0.074 0.00629,-0.1131 0,-1.0409 -0.8967381,-1.8869 -1.9999976,-1.8869 -0.043099,0 -0.083767,0 -0.1261851,0 z"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#fffbd7;fill-opacity:0.55681817;fill-rule:evenodd;stroke:none;stroke-width:1.01903164;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none" style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#fffbd7;fill-opacity:0.55681817;fill-rule:evenodd;stroke:none;stroke-width:1.01903164;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
inkscape:connector-curvature="0" /> inkscape:connector-curvature="0" />
</g> </g>
@ -50746,6 +50746,48 @@
id="rect52867" id="rect52867"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g> </g>
<g
transform="matrix(3.7795276,0,0,3.7795276,90.2587,-1003.0102)"
id="gimp-dashboard">
<g
id="g2910"
transform="translate(0,0.26636769)">
<path
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.39687499;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:fill markers stroke"
d="m 2.1171834,293.03123 c -0.7036231,0 -1.3718978,0.31263 -1.82417803,0.85163 l 0.60719808,0.50953 c 0.30179595,-0.35967 0.74746885,-0.56793 1.21697995,-0.56793 0.1161413,0 0.2308877,0.0125 0.342098,0.0372 -0.2890398,0.45136 -0.6480014,0.88459 -0.9027816,1.3478 -0.112182,0.30823 0.047317,0.65159 0.3555339,0.76378 0.3082197,0.11223 0.6515993,-0.0494 0.7637777,-0.3576 0.016812,-0.0462 0.028085,-0.0937 0.033073,-0.14263 v -0.002 -0.008 l 0.00206,-0.0103 0.1400432,-1.44539 c 0.1814891,0.0953 0.3460284,0.22401 0.4811075,0.38499 l 0.6092684,-0.50953 c -0.3097918,-0.30804 -0.6683875,-0.57637 -1.0097449,-0.709 -0.2768298,-0.0596 -0.5608524,-0.13853 -0.8144352,-0.14255 z m -0.0062,2.11667 c 0.032755,-6.6e-4 0.065347,0.005 0.096118,0.016 0.1372458,0.05 0.2080275,0.20172 0.1581299,0.33899 -0.04998,0.13725 -0.2017216,0.20803 -0.3389974,0.15813 -0.1372458,-0.05 -0.2080276,-0.20172 -0.15813,-0.33899 0.037284,-0.1026 0.1337466,-0.17176 0.2428794,-0.17415 z"
id="path817-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccscccccccccccccccccccc" />
<g
id="g2902">
<g
id="g2896">
<path
style="opacity:1;fill:#66dd11;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:fill markers stroke"
d="m 2.1171834,293.03123 c -0.7036231,0 -1.37189781,0.31263 -1.82417802,0.85163 l 0.60719809,0.50953 c 0.30179593,-0.35967 0.74746893,-0.56793 1.21697993,-0.56793 0.1161414,0 0.2308878,0.0125 0.342098,0.0372 l 0.3260784,-0.47491 0.1441773,-0.21032 c -0.2577537,-0.0938 -0.5319466,-0.1452 -0.8123537,-0.1452 z"
id="path2875-5"
inkscape:connector-curvature="0" />
<path
style="opacity:1;fill:#dd3322;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:fill markers stroke"
d="m 2.9310971,293.17744 -0.080098,0.82992 c 0.1814891,0.0953 0.3460284,0.22401 0.4811075,0.38499 l 0.6092548,-0.50949 C 3.669724,293.55914 3.3194255,293.31918 2.9310873,293.17747 Z"
id="path2871"
inkscape:connector-curvature="0" />
</g>
<path
id="path817"
d="m 2.9316039,293.17386 -0.1462442,0.21291 -1.1601359,1.6893 v 0.002 c -0.00132,0.002 -0.00283,0.004 -0.00413,0.006 l -0.042892,0.0625 0.00982,0.004 c -0.0099,0.0198 -0.023863,0.0381 -0.031523,0.0589 -0.112182,0.30823 0.047317,0.65159 0.3555339,0.76378 0.3082198,0.11223 0.6515992,-0.0494 0.7637776,-0.3576 0.016812,-0.0462 0.028085,-0.0937 0.033073,-0.14263 v -0.002 -0.008 l 0.00206,-0.0103 z m -0.8206217,1.97404 a 0.26458332,0.26458332 0 0 1 0.096118,0.016 0.26458332,0.26458332 0 0 1 0.1581299,0.339 0.26458332,0.26458332 0 0 1 -0.3389974,0.15813 0.26458332,0.26458332 0 0 1 -0.1581299,-0.339 0.26458332,0.26458332 0 0 1 0.2428792,-0.17415 z"
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:fill markers stroke"
inkscape:connector-curvature="0" />
</g>
</g>
<rect
y="292.76666"
x="0"
height="4.2333331"
width="4.2333331"
id="rect2978"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g> </g>
<g <g
inkscape:groupmode="layer" inkscape:groupmode="layer"

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

View File

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
viewBox="0 0 4.2333332 4.2333335"
version="1.1"
id="svg8"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
sodipodi:docname="gimp-dashboard.svg">
<title
id="title4405">GIMP Dashboard</title>
<defs
id="defs2">
<linearGradient
inkscape:collect="always"
id="linearGradient1484">
<stop
style="stop-color:#119911;stop-opacity:1"
offset="0"
id="stop1480" />
<stop
id="stop1488"
offset="0.50094193"
style="stop-color:#eaea38;stop-opacity:1" />
<stop
style="stop-color:#bc1b1b;stop-opacity:1"
offset="1"
id="stop1482" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1484"
id="linearGradient1486"
x1="0.29556136"
y1="293.64385"
x2="3.9377716"
y2="293.64385"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="38.5625"
inkscape:cx="5.0696921"
inkscape:cy="8"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1535"
inkscape:window-height="876"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid815"
empspacing="4" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>GIMP Dashboard</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Ell</dc:title>
</cc:Agent>
</dc:creator>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-292.76665)">
<g
id="gimp-dashboard">
<g
id="g2910"
transform="translate(0,0.26636769)">
<path
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.39687499;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:fill markers stroke"
d="m 2.1171834,293.03123 c -0.7036231,0 -1.3718978,0.31263 -1.82417803,0.85163 l 0.60719808,0.50953 c 0.30179595,-0.35967 0.74746885,-0.56793 1.21697995,-0.56793 0.1161413,0 0.2308877,0.0125 0.342098,0.0372 -0.2890398,0.45136 -0.6480014,0.88459 -0.9027816,1.3478 -0.112182,0.30823 0.047317,0.65159 0.3555339,0.76378 0.3082197,0.11223 0.6515993,-0.0494 0.7637777,-0.3576 0.016812,-0.0462 0.028085,-0.0937 0.033073,-0.14263 v -0.002 -0.008 l 0.00206,-0.0103 0.1400432,-1.44539 c 0.1814891,0.0953 0.3460284,0.22401 0.4811075,0.38499 l 0.6092684,-0.50953 c -0.3097918,-0.30804 -0.6683875,-0.57637 -1.0097449,-0.709 -0.2768298,-0.0596 -0.5608524,-0.13853 -0.8144352,-0.14255 z m -0.0062,2.11667 c 0.032755,-6.6e-4 0.065347,0.005 0.096118,0.016 0.1372458,0.05 0.2080275,0.20172 0.1581299,0.33899 -0.04998,0.13725 -0.2017216,0.20803 -0.3389974,0.15813 -0.1372458,-0.05 -0.2080276,-0.20172 -0.15813,-0.33899 0.037284,-0.1026 0.1337466,-0.17176 0.2428794,-0.17415 z"
id="path817-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccscccccccccccccccccccc" />
<g
id="g2902">
<g
id="g2896">
<path
style="opacity:1;fill:#66dd11;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:fill markers stroke"
d="m 2.1171834,293.03123 c -0.7036231,0 -1.37189781,0.31263 -1.82417802,0.85163 l 0.60719809,0.50953 c 0.30179593,-0.35967 0.74746893,-0.56793 1.21697993,-0.56793 0.1161414,0 0.2308878,0.0125 0.342098,0.0372 l 0.3260784,-0.47491 0.1441773,-0.21032 c -0.2577537,-0.0938 -0.5319466,-0.1452 -0.8123537,-0.1452 z"
id="path2875"
inkscape:connector-curvature="0" />
<path
style="opacity:1;fill:#dd3322;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:fill markers stroke"
d="m 2.9310971,293.17744 -0.080098,0.82992 c 0.1814891,0.0953 0.3460284,0.22401 0.4811075,0.38499 l 0.6092548,-0.50949 C 3.669724,293.55914 3.3194255,293.31918 2.9310873,293.17747 Z"
id="path2871"
inkscape:connector-curvature="0" />
</g>
<path
id="path817"
d="m 2.9316039,293.17386 -0.1462442,0.21291 -1.1601359,1.6893 v 0.002 c -0.00132,0.002 -0.00283,0.004 -0.00413,0.006 l -0.042892,0.0625 0.00982,0.004 c -0.0099,0.0198 -0.023863,0.0381 -0.031523,0.0589 -0.112182,0.30823 0.047317,0.65159 0.3555339,0.76378 0.3082198,0.11223 0.6515992,-0.0494 0.7637776,-0.3576 0.016812,-0.0462 0.028085,-0.0937 0.033073,-0.14263 v -0.002 -0.008 l 0.00206,-0.0103 z m -0.8206217,1.97404 a 0.26458332,0.26458332 0 0 1 0.096118,0.016 0.26458332,0.26458332 0 0 1 0.1581299,0.339 0.26458332,0.26458332 0 0 1 -0.3389974,0.15813 0.26458332,0.26458332 0 0 1 -0.1581299,-0.339 0.26458332,0.26458332 0 0 1 0.2428792,-0.17415 z"
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:fill markers stroke"
inkscape:connector-curvature="0" />
</g>
</g>
<rect
y="292.76666"
x="0"
height="4.2333331"
width="4.2333331"
id="rect2978"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
viewBox="0 0 4.2333332 4.2333335"
version="1.1"
id="svg8"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
sodipodi:docname="gimp-dashboard.svg">
<title
id="title3762">GIMP Dashboard</title>
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="38.6875"
inkscape:cx="5.0791599"
inkscape:cy="8"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1535"
inkscape:window-height="876"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid815"
empspacing="4" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>GIMP Dashboard</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Ell</dc:title>
</cc:Agent>
</dc:creator>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-292.76665)">
<g
id="gimp-dashboard">
<path
id="path817"
d="m 2.1171834,293.39258 c -0.7036231,0 -1.37189781,0.31263 -1.82417802,0.85163 l 0.60719809,0.50953 c 0.30179593,-0.35967 0.74746893,-0.56793 1.21697993,-0.56793 0.1161414,0 0.2308878,0.0125 0.342098,0.0372 l 0.3260784,-0.47491 0.1441773,-0.21032 c -0.2577537,-0.0938 -0.5319466,-0.1452 -0.8123537,-0.1452 z m 0.8123537,0.14521 c 5.821e-4,2.1e-4 9.789e-4,8.3e-4 0.00156,0.001 l 5.292e-4,-0.004 z m 0.00156,0.001 -0.080098,0.82992 c 0.1814891,0.0953 0.3460284,0.22401 0.4811075,0.38499 l 0.6092548,-0.50949 C 3.669724,293.92049 3.3194255,293.68053 2.9310873,293.53882 Z m -0.080109,0.82992 c -0.1236927,-0.0649 -0.2545634,-0.11527 -0.3917067,-0.14569 l -0.8340576,1.2144 v 0.002 c -0.00132,0.002 -0.00283,0.004 -0.00413,0.006 l -0.042891,0.0625 0.00982,0.004 c -0.0099,0.0198 -0.023863,0.0381 -0.031523,0.0589 -0.112182,0.30823 0.047317,0.65159 0.3555338,0.76378 0.3082198,0.11223 0.6515994,-0.0494 0.7637776,-0.3576 0.016812,-0.0462 0.028085,-0.0937 0.033073,-0.14263 v -0.002 -0.008 l 0.00206,-0.0103 z m -0.7400066,1.1405 a 0.26458332,0.26458332 0 0 1 0.096118,0.016 0.26458332,0.26458332 0 0 1 0.1581298,0.33899 0.26458332,0.26458332 0 0 1 -0.3389974,0.15813 0.26458332,0.26458332 0 0 1 -0.1581298,-0.33899 0.26458332,0.26458332 0 0 1 0.2428792,-0.17415 z"
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:fill markers stroke"
inkscape:connector-curvature="0" />
<rect
y="292.76666"
x="0"
height="4.2333331"
width="4.2333331"
id="rect3011"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@ -97,6 +97,7 @@ scalable_images = \
scalable/gimp-cursor.svg \ scalable/gimp-cursor.svg \
scalable/gimp-curve-free.svg \ scalable/gimp-curve-free.svg \
scalable/gimp-curve-smooth.svg \ scalable/gimp-curve-smooth.svg \
scalable/gimp-dashboard.svg \
scalable/gimp-default-colors.svg \ scalable/gimp-default-colors.svg \
scalable/gimp-device-status.svg \ scalable/gimp-device-status.svg \
scalable/gimp-display.svg \ scalable/gimp-display.svg \
@ -584,6 +585,7 @@ icons16_images = \
16/gimp-cursor.png \ 16/gimp-cursor.png \
16/gimp-curve-free.png \ 16/gimp-curve-free.png \
16/gimp-curve-smooth.png \ 16/gimp-curve-smooth.png \
16/gimp-dashboard.png \
16/gimp-device-status.png \ 16/gimp-device-status.png \
16/gimp-display.png \ 16/gimp-display.png \
16/gimp-display-filter-clip-warning.png \ 16/gimp-display-filter-clip-warning.png \
@ -853,6 +855,7 @@ icons24_images = \
24/gimp-controller-wheel.png \ 24/gimp-controller-wheel.png \
24/gimp-controller.png \ 24/gimp-controller.png \
24/gimp-cursor.png \ 24/gimp-cursor.png \
24/gimp-dashboard.png \
24/gimp-device-status.png \ 24/gimp-device-status.png \
24/gimp-display.png \ 24/gimp-display.png \
24/gimp-display-filter-clip-warning.png \ 24/gimp-display-filter-clip-warning.png \

View File

@ -146,6 +146,7 @@ G_BEGIN_DECLS
#define GIMP_ICON_CURVE_SMOOTH "gimp-curve-smooth" #define GIMP_ICON_CURVE_SMOOTH "gimp-curve-smooth"
#define GIMP_ICON_DIALOG_CHANNELS "gimp-channels" #define GIMP_ICON_DIALOG_CHANNELS "gimp-channels"
#define GIMP_ICON_DIALOG_DASHBOARD "gimp-dashboard"
#define GIMP_ICON_DIALOG_DEVICE_STATUS "gimp-device-status" #define GIMP_ICON_DIALOG_DEVICE_STATUS "gimp-device-status"
#define GIMP_ICON_DIALOG_ERROR "gimp-error" /* use FDO */ #define GIMP_ICON_DIALOG_ERROR "gimp-error" /* use FDO */
#define GIMP_ICON_DIALOG_IMAGES "gimp-images" #define GIMP_ICON_DIALOG_IMAGES "gimp-images"

View File

@ -16,6 +16,7 @@ menudata_DATA = \
channels-menu.xml \ channels-menu.xml \
colormap-menu.xml \ colormap-menu.xml \
cursor-info-menu.xml \ cursor-info-menu.xml \
dashboard-menu.xml \
documents-menu.xml \ documents-menu.xml \
dynamics-editor-menu.xml \ dynamics-editor-menu.xml \
dynamics-menu.xml \ dynamics-menu.xml \

23
menus/dashboard-menu.xml Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE ui SYSTEM "gtkuimanager.dtd">
<ui>
<popup action="dashboard-popup">
<menu action="dashboard-update-interval">
<menuitem action="dashboard-update-interval-0-25-sec" />
<menuitem action="dashboard-update-interval-0-5-sec" />
<menuitem action="dashboard-update-interval-1-sec" />
<menuitem action="dashboard-update-interval-2-sec" />
<menuitem action="dashboard-update-interval-4-sec" />
</menu>
<menu action="dashboard-history-duration">
<menuitem action="dashboard-history-duration-15-sec" />
<menuitem action="dashboard-history-duration-30-sec" />
<menuitem action="dashboard-history-duration-60-sec" />
<menuitem action="dashboard-history-duration-120-sec" />
<menuitem action="dashboard-history-duration-240-sec" />
</menu>
<separator />
<menuitem action="dashboard-low-swap-space-warning" />
</popup>
</ui>

View File

@ -31,4 +31,5 @@
<menuitem action="dialogs-document-history" /> <menuitem action="dialogs-document-history" />
<menuitem action="dialogs-templates" /> <menuitem action="dialogs-templates" />
<menuitem action="dialogs-error-console" /> <menuitem action="dialogs-error-console" />
<menuitem action="dialogs-dashboard" />
</menuitems> </menuitems>

View File

@ -24,6 +24,7 @@ app/actions/colormap-commands.c
app/actions/context-actions.c app/actions/context-actions.c
app/actions/context-commands.c app/actions/context-commands.c
app/actions/cursor-info-actions.c app/actions/cursor-info-actions.c
app/actions/dashboard-actions.c
app/actions/data-commands.c app/actions/data-commands.c
app/actions/debug-actions.c app/actions/debug-actions.c
app/actions/dialogs-actions.c app/actions/dialogs-actions.c
@ -512,6 +513,7 @@ app/widgets/gimpcontrollerkeyboard.c
app/widgets/gimpcontrollerlist.c app/widgets/gimpcontrollerlist.c
app/widgets/gimpcontrollermouse.c app/widgets/gimpcontrollermouse.c
app/widgets/gimpcontrollerwheel.c app/widgets/gimpcontrollerwheel.c
app/widgets/gimpdashboard.c
app/widgets/gimpdataeditor.c app/widgets/gimpdataeditor.c
app/widgets/gimpdeviceeditor.c app/widgets/gimpdeviceeditor.c
app/widgets/gimpdeviceinfo.c app/widgets/gimpdeviceinfo.c