diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/widgets/gd-main-view-generic.c | 23 | ||||
-rw-r--r-- | lib/widgets/gd-main-view-generic.h | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/lib/widgets/gd-main-view-generic.c b/lib/widgets/gd-main-view-generic.c index df8d75685..100ffd334 100644 --- a/lib/widgets/gd-main-view-generic.c +++ b/lib/widgets/gd-main-view-generic.c @@ -25,10 +25,24 @@ typedef GdMainViewGenericIface GdMainViewGenericInterface; G_DEFINE_INTERFACE (GdMainViewGeneric, gd_main_view_generic, GTK_TYPE_WIDGET) +enum { + DELETE_ITEM_CLICKED, + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = { 0 }; + static void gd_main_view_generic_default_init (GdMainViewGenericInterface *iface) { - /* nothing */ + signals[DELETE_ITEM_CLICKED] = + g_signal_new ("delete-item-clicked", + GD_TYPE_MAIN_VIEW_GENERIC, + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, NULL, + G_TYPE_NONE, 1, + G_TYPE_STRING); } /** @@ -153,3 +167,10 @@ _gd_main_view_generic_dnd_common (GtkTreeModel *model, gtk_selection_data_set_uris (data, uris); g_strfreev (uris); } + +void +_gd_main_view_generic_item_delete_clicked (GdMainViewGeneric *self, + const gchar *path) +{ + g_signal_emit (self, signals[DELETE_ITEM_CLICKED], 0, path); +} diff --git a/lib/widgets/gd-main-view-generic.h b/lib/widgets/gd-main-view-generic.h index d47cd109f..efaf848a8 100644 --- a/lib/widgets/gd-main-view-generic.h +++ b/lib/widgets/gd-main-view-generic.h @@ -91,6 +91,8 @@ void _gd_main_view_generic_dnd_common (GtkTreeModel *model, gboolean selection_mode, GtkTreePath *path, GtkSelectionData *data); +void _gd_main_view_generic_item_delete_clicked (GdMainViewGeneric *self, + const gchar *path); G_END_DECLS |