summaryrefslogtreecommitdiff
path: root/libnautilus-extension
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2022-08-06 17:11:03 +0100
committerAntónio Fernandes <antoniof@gnome.org>2022-08-07 01:14:22 +0000
commitbc55ff7599ef7f5acc6e9b648765fdb45b56431c (patch)
tree0cd179948c65afb7b72d53f6c71d68f1ce089bbc /libnautilus-extension
parente418cf4362f7619c9156db1fbd321c7aa2e7c8cc (diff)
downloadnautilus-bc55ff7599ef7f5acc6e9b648765fdb45b56431c.tar.gz
menu-provider: Don't pass GtkWindow
We don't want menu items to create their own windows in our process. This helps with the effort to de-GTK-ize libnautilus-extensions API.
Diffstat (limited to 'libnautilus-extension')
-rw-r--r--libnautilus-extension/nautilus-menu-provider.c8
-rw-r--r--libnautilus-extension/nautilus-menu-provider.h7
2 files changed, 2 insertions, 13 deletions
diff --git a/libnautilus-extension/nautilus-menu-provider.c b/libnautilus-extension/nautilus-menu-provider.c
index a6b86a86f..a5c468272 100644
--- a/libnautilus-extension/nautilus-menu-provider.c
+++ b/libnautilus-extension/nautilus-menu-provider.c
@@ -50,7 +50,6 @@ nautilus_menu_provider_default_init (NautilusMenuProviderInterface *klass)
GList *
nautilus_menu_provider_get_file_items (NautilusMenuProvider *provider,
- GtkWidget *window,
GList *files)
{
NautilusMenuProviderInterface *iface;
@@ -58,11 +57,10 @@ nautilus_menu_provider_get_file_items (NautilusMenuProvider *provider,
iface = NAUTILUS_MENU_PROVIDER_GET_IFACE (provider);
g_return_val_if_fail (NAUTILUS_IS_MENU_PROVIDER (provider), NULL);
- g_return_val_if_fail (GTK_IS_WIDGET (window), NULL);
if (iface->get_file_items != NULL)
{
- return iface->get_file_items (provider, window, files);
+ return iface->get_file_items (provider, files);
}
return NULL;
@@ -70,7 +68,6 @@ nautilus_menu_provider_get_file_items (NautilusMenuProvider *provider,
GList *
nautilus_menu_provider_get_background_items (NautilusMenuProvider *provider,
- GtkWidget *window,
NautilusFileInfo *current_folder)
{
NautilusMenuProviderInterface *iface;
@@ -78,12 +75,11 @@ nautilus_menu_provider_get_background_items (NautilusMenuProvider *provider,
iface = NAUTILUS_MENU_PROVIDER_GET_IFACE (provider);
g_return_val_if_fail (NAUTILUS_IS_MENU_PROVIDER (provider), NULL);
- g_return_val_if_fail (GTK_IS_WIDGET (window), NULL);
g_return_val_if_fail (NAUTILUS_IS_FILE_INFO (current_folder), NULL);
if (iface->get_background_items != NULL)
{
- return iface->get_background_items (provider, window, current_folder);
+ return iface->get_background_items (provider, current_folder);
}
return NULL;
diff --git a/libnautilus-extension/nautilus-menu-provider.h b/libnautilus-extension/nautilus-menu-provider.h
index ed257c4f7..7939f1439 100644
--- a/libnautilus-extension/nautilus-menu-provider.h
+++ b/libnautilus-extension/nautilus-menu-provider.h
@@ -33,7 +33,6 @@
#endif
#include <glib-object.h>
-#include <gtk/gtk.h>
#include "nautilus-file-info.h"
G_BEGIN_DECLS
@@ -68,34 +67,28 @@ struct _NautilusMenuProviderInterface
GTypeInterface g_iface;
GList *(*get_file_items) (NautilusMenuProvider *provider,
- GtkWidget *window,
GList *files);
GList *(*get_background_items) (NautilusMenuProvider *provider,
- GtkWidget *window,
NautilusFileInfo *current_folder);
};
/**
* nautilus_menu_provider_get_file_items:
* @provider: a #NautilusMenuProvider
- * @window: the parent #GtkWidget window
* @files: (element-type NautilusFileInfo): a list of #NautilusFileInfo
*
* Returns: (nullable) (element-type NautilusMenuItem) (transfer full): the provided list of #NautilusMenuItem.
*/
GList *nautilus_menu_provider_get_file_items (NautilusMenuProvider *provider,
- GtkWidget *window,
GList *files);
/**
* nautilus_menu_provider_get_background_items:
* @provider: a #NautilusMenuProvider
- * @window: the parent #GtkWidget window
* @current_folder: the folder for which background items are requested
*
* Returns: (nullable) (element-type NautilusMenuItem) (transfer full): the provided list of #NautilusMenuItem.
*/
GList *nautilus_menu_provider_get_background_items (NautilusMenuProvider *provider,
- GtkWidget *window,
NautilusFileInfo *current_folder);
/**