[gtk/matthiasc/for-master] Revert "Add GtkLoader to gtk4-widget-factory"




commit 670659bcba5f7c5df046e387a2606a374a6631d7
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 2 23:54:06 2021 -0400

    Revert "Add GtkLoader to gtk4-widget-factory"
    
    This reverts commit 923c944abb6b5305c4f0adda3d20e9abb6381c8a.
    
    This commit broke the image dnd, and the async
    loading isn't that important here.

 demos/widget-factory/gtkloader.c        | 215 --------------------------------
 demos/widget-factory/gtkloaderprivate.h |  35 ------
 demos/widget-factory/meson.build        |   2 +-
 demos/widget-factory/widget-factory.c   |   2 -
 demos/widget-factory/widget-factory.ui  |  18 +--
 5 files changed, 4 insertions(+), 268 deletions(-)
---
diff --git a/demos/widget-factory/meson.build b/demos/widget-factory/meson.build
index 2763111570..a7906fb83c 100644
--- a/demos/widget-factory/meson.build
+++ b/demos/widget-factory/meson.build
@@ -65,7 +65,7 @@ else
 endif
 
 executable('gtk4-widget-factory',
-  sources: ['widget-factory.c', 'gtkloader.c', widgetfactory_resources],
+  sources: ['widget-factory.c', widgetfactory_resources],
   c_args: common_cflags,
   dependencies: [ libgtk_dep, demo_conf_h ],
   include_directories: confinc,
diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c
index c18b502bcf..0c4b21c81c 100644
--- a/demos/widget-factory/widget-factory.c
+++ b/demos/widget-factory/widget-factory.c
@@ -26,7 +26,6 @@
 #include <gtk/gtk.h>
 
 #include "demo_conf.h"
-#include "gtkloaderprivate.h"
 
 static void
 change_dark_state (GSimpleAction *action,
@@ -2055,7 +2054,6 @@ activate (GApplication *app)
   GtkEventController *controller;
 
   g_type_ensure (my_text_view_get_type ());
-  g_type_ensure (gtk_loader_get_type ());
 
   provider = gtk_css_provider_new ();
   gtk_css_provider_load_from_resource (provider, "/org/gtk/WidgetFactory4/widget-factory.css");
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index 259c4def99..92c033dccf 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -1260,11 +1260,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                               <object class="GtkNotebookPage">
                                 <property name="child">
                                   <object class="GtkPicture">
-                                    <property name="paintable">
-                                      <object class="GtkLoader">
-                                        <property 
name="resource">/org/gtk/WidgetFactory4/sunset.jpg</property>
-                                      </object>
-                                    </property>
+                                    <property 
name="file">resource:///org/gtk/WidgetFactory4/sunset.jpg</property>
                                     <child>
                                       <object class="GtkDragSource">
                                         <signal name="prepare" handler="on_picture_drag_prepare" 
swapped="no"/>
@@ -1290,11 +1286,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                               <object class="GtkNotebookPage">
                                 <property name="child">
                                   <object class="GtkPicture">
-                                    <property name="paintable">
-                                      <object class="GtkLoader">
-                                        <property name="resource">/org/gtk/WidgetFactory4/nyc.jpg</property>
-                                      </object>
-                                    </property>
+                                    <property 
name="file">resource:///org/gtk/WidgetFactory4/nyc.jpg</property>
                                     <child>
                                       <object class="GtkDragSource">
                                         <signal name="prepare" handler="on_picture_drag_prepare" 
swapped="no"/>
@@ -1320,11 +1312,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                               <object class="GtkNotebookPage">
                                 <property name="child">
                                   <object class="GtkPicture">
-                                    <property name="paintable">
-                                      <object class="GtkLoader">
-                                        <property 
name="resource">/org/gtk/WidgetFactory4/beach.jpg</property>
-                                      </object>
-                                    </property>
+                                    <property 
name="file">resource:///org/gtk/WidgetFactory4/beach.jpg</property>
                                     <child>
                                       <object class="GtkDragSource">
                                         <signal name="prepare" handler="on_picture_drag_prepare" 
swapped="no"/>


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