[nautilus/wip/antoniof/extension-properties: 9/11] libnautilus-extension: Drop widget provider




commit d907e9a6d8f026291997ea123e95af9c228c6379
Author: António Fernandes <antoniof gnome org>
Date:   Sat Aug 6 17:19:40 2022 +0100

    libnautilus-extension: Drop widget provider
    
    We don't want extensions to inject random inconsistent widgets
    into our window.
    
    If there are good reasons for this, in the future we can introduce a
    new model-like API instead of a widget-based one.

 libnautilus-extension/meson.build                  |  2 -
 libnautilus-extension/nautilus-extension.h         |  1 -
 .../nautilus-location-widget-provider.c            | 48 ------------
 .../nautilus-location-widget-provider.h            | 86 ----------------------
 src/nautilus-window-slot.c                         | 31 --------
 5 files changed, 168 deletions(-)
---
diff --git a/libnautilus-extension/meson.build b/libnautilus-extension/meson.build
index fdfd8c1a6..d53618c5b 100644
--- a/libnautilus-extension/meson.build
+++ b/libnautilus-extension/meson.build
@@ -5,7 +5,6 @@ libnautilus_extension_headers = [
   'nautilus-column.h',
   'nautilus-file-info.h',
   'nautilus-info-provider.h',
-  'nautilus-location-widget-provider.h',
   'nautilus-menu-provider.h',
   'nautilus-properties-model-provider.h',
   'nautilus-properties-model.h',
@@ -40,7 +39,6 @@ libnautilus_extension_sources = [
   'nautilus-extension-private.h',
   'nautilus-file-info.c',
   'nautilus-info-provider.c',
-  'nautilus-location-widget-provider.c',
   'nautilus-menu-item.c',
   'nautilus-menu-provider.c',
   'nautilus-properties-model-provider.c',
diff --git a/libnautilus-extension/nautilus-extension.h b/libnautilus-extension/nautilus-extension.h
index 34abd91c1..e7dc3c817 100644
--- a/libnautilus-extension/nautilus-extension.h
+++ b/libnautilus-extension/nautilus-extension.h
@@ -23,7 +23,6 @@
 #include <libnautilus-extension/nautilus-extension-enum-types.h>
 #include <libnautilus-extension/nautilus-file-info.h>
 #include <libnautilus-extension/nautilus-info-provider.h>
-#include <libnautilus-extension/nautilus-location-widget-provider.h>
 #include <libnautilus-extension/nautilus-menu.h>
 #include <libnautilus-extension/nautilus-menu-provider.h>
 #include <libnautilus-extension/nautilus-properties-model.h>
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 976429e27..21ae9035a 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -45,7 +45,6 @@
 #include "nautilus-module.h"
 #include "nautilus-monitor.h"
 #include "nautilus-profile.h"
-#include <nautilus-extension.h>
 #include "nautilus-ui-utilities.h"
 #include <eel/eel-vfs-extensions.h>
 
@@ -2592,34 +2591,6 @@ nautilus_window_slot_show_special_location_bar (NautilusWindowSlot      *self,
     nautilus_window_slot_add_extra_location_widget (self, bar);
 }
 
-static void
-slot_add_extension_extra_widgets (NautilusWindowSlot *self)
-{
-    GList *providers, *l;
-    GtkWidget *widget;
-    char *uri;
-    NautilusWindow *window;
-
-    providers = nautilus_module_get_extensions_for_type (NAUTILUS_TYPE_LOCATION_WIDGET_PROVIDER);
-    window = nautilus_window_slot_get_window (self);
-
-    uri = nautilus_window_slot_get_location_uri (self);
-    for (l = providers; l != NULL; l = l->next)
-    {
-        NautilusLocationWidgetProvider *provider;
-
-        provider = NAUTILUS_LOCATION_WIDGET_PROVIDER (l->data);
-        widget = nautilus_location_widget_provider_get_widget (provider, uri, GTK_WIDGET (window));
-        if (widget != NULL)
-        {
-            nautilus_window_slot_add_extra_location_widget (self, widget);
-        }
-    }
-    g_free (uri);
-
-    nautilus_module_extension_list_free (providers);
-}
-
 static void
 nautilus_window_slot_update_for_new_location (NautilusWindowSlot *self)
 {
@@ -2789,8 +2760,6 @@ nautilus_window_slot_setup_extra_location_widgets (NautilusWindowSlot *self)
                                        data);
 
     nautilus_directory_unref (directory);
-
-    slot_add_extension_extra_widgets (self);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]