Side panel devices show a thin progress bar below each drive name, proportional to disk usage. Bar turns red when usage exceeds 90%. The computer:// icon view also shows usage bars under volume names. New files: - thunar-shortcuts-progress-renderer.c/.h: custom cell renderer (extends GtkCellRendererText) that draws text + usage bar Modified: - thunar-shortcuts-model: added USAGE_PERCENT column - thunar-shortcuts-view: uses progress renderer instead of plain text - thunar-text-renderer: added usage-percent property with bar drawing - thunar-standard-view: sets usage-percent via cell_data_func for computer:// entries using thunar_g_file_get_free_space()
38 lines
1.5 KiB
C
38 lines
1.5 KiB
C
/* vi:set et ai sw=2 sts=2 ts=2: */
|
|
/*-
|
|
* Copyright (c) 2026
|
|
*
|
|
* 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 2 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, write to the Free Software Foundation, Inc., 59 Temple
|
|
* Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#ifndef __THUNAR_SHORTCUTS_PROGRESS_RENDERER_H__
|
|
#define __THUNAR_SHORTCUTS_PROGRESS_RENDERER_H__
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
G_BEGIN_DECLS;
|
|
|
|
typedef struct _ThunarShortcutsProgressRendererClass ThunarShortcutsProgressRendererClass;
|
|
typedef struct _ThunarShortcutsProgressRenderer ThunarShortcutsProgressRenderer;
|
|
|
|
#define THUNAR_TYPE_SHORTCUTS_PROGRESS_RENDERER (thunar_shortcuts_progress_renderer_get_type ())
|
|
#define THUNAR_SHORTCUTS_PROGRESS_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_TYPE_SHORTCUTS_PROGRESS_RENDERER, ThunarShortcutsProgressRenderer))
|
|
|
|
GType thunar_shortcuts_progress_renderer_get_type (void) G_GNUC_CONST;
|
|
GtkCellRenderer *thunar_shortcuts_progress_renderer_new (void);
|
|
|
|
G_END_DECLS;
|
|
|
|
#endif /* !__THUNAR_SHORTCUTS_PROGRESS_RENDERER_H__ */
|