summaryrefslogtreecommitdiff
path: root/trashapplet/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-12-29 11:27:57 +0100
committerraveit65 <[email protected]>2021-01-07 23:04:04 +0100
commitb54a865e79f68291c76ca61e465d8f11749bcd01 (patch)
tree789d2c86bd81e9a254a7f7d16c6bf92d4537d9e1 /trashapplet/src
parentd5b116f704848c7224d1cd339be478ecaccdec96 (diff)
downloadmate-applets-b54a865e79f68291c76ca61e465d8f11749bcd01.tar.bz2
mate-applets-b54a865e79f68291c76ca61e465d8f11749bcd01.tar.xz
trashapplet: boilerplate final class
Diffstat (limited to 'trashapplet/src')
-rw-r--r--trashapplet/src/trashapplet.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/trashapplet/src/trashapplet.c b/trashapplet/src/trashapplet.c
index c6a4d5ff..f50d136f 100644
--- a/trashapplet/src/trashapplet.c
+++ b/trashapplet/src/trashapplet.c
@@ -36,9 +36,12 @@
#include "trash-empty.h"
#include "xstuff.h"
-typedef MatePanelAppletClass TrashAppletClass;
+#define TRASH_TYPE_APPLET (trash_applet_get_type ())
+
+G_DECLARE_FINAL_TYPE (TrashApplet, trash_applet,
+ TRASH, APPLET, MatePanelApplet)
-typedef struct
+struct _TrashApplet
{
MatePanelApplet applet;
@@ -48,12 +51,9 @@ typedef struct
GtkImage *image;
GIcon *icon;
gint items;
-} TrashApplet;
+};
G_DEFINE_TYPE (TrashApplet, trash_applet, PANEL_TYPE_APPLET);
-#define TRASH_TYPE_APPLET (trash_applet_get_type ())
-#define TRASH_APPLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- TRASH_TYPE_APPLET, TrashApplet))
static void trash_applet_do_empty (GtkAction *action,
TrashApplet *applet);