From 8e355c73d3903bc4a1cca9c592ac70b9924ec547 Mon Sep 17 00:00:00 2001
From: Mikkel Kruse Johnsen <mikkel@xmedicus.com>
Date: Mon, 25 Jul 2016 08:40:09 +0200
Subject: [PATCH] Updated to 3.20.6 and included SimpleAction

---
 gio/Gio.metadata                        |  2 +
 gio/gio-api.raw                         | 73 ++++++++++++++++++++++++-
 sources/Makefile.am                     |  4 +-
 sources/gtk_text_view_public.patch      | 11 ----
 sources/gtkselectionprivate-space.patch | 11 ----
 sources/sources.xml                     | 10 ++--
 6 files changed, 78 insertions(+), 33 deletions(-)
 delete mode 100644 sources/gtk_text_view_public.patch
 delete mode 100644 sources/gtkselectionprivate-space.patch

diff --git a/gio/Gio.metadata b/gio/Gio.metadata
index 742c5bc9e..d080879db 100644
--- a/gio/Gio.metadata
+++ b/gio/Gio.metadata
@@ -147,6 +147,8 @@
   <attr path="/api/namespace/object[@cname='GSettings']/method[@name='ListRelocatableSchemas']/return-type" name="null_term_array">1</attr>
   <attr path="/api/namespace/object[@cname='GSettings']/method[@name='ListSchemas']/return-type" name="null_term_array">1</attr>
   <attr path="/api/namespace/object[@cname='GSettings']/method[@name='SetStrv']/*/*[@name='value']" name="null_term_array">1</attr>
+  <attr path="/api/namespace/object[@cname='GSimpleAction']/method[@name='SetState']" name="hidden">1</attr>
+  <attr path="/api/namespace/object[@cname='GSimpleAction']/method[@name='SetStateHint']" name="hidden">1</attr>
   <attr path="/api/namespace/object[@cname='GSimpleAsyncResult']/constructor[@cname='g_simple_async_result_new_error']" name="hidden">1</attr>
   <attr path="/api/namespace/object[@cname='GSimpleAsyncResult']/method[@name='SetError']" name="hidden">1</attr>
   <attr path="/api/namespace/object[@cname='GThemedIcon']/method[@name='GetNames']/return-type" name="null_term_array">1</attr> 
diff --git a/gio/gio-api.raw b/gio/gio-api.raw
index 3232349e9..0330a2c99 100644
--- a/gio/gio-api.raw
+++ b/gio/gio-api.raw
@@ -10145,6 +10145,77 @@
         </parameters>
       </method>
     </object>
+    <object name="SimpleAction" cname="GSimpleAction" parent="GObject">
+      <signal name="Activate" cname="activate" when="LAST">
+        <return-type type="void" />
+        <parameters>
+          <parameter name="p0" type="gvariant" />
+        </parameters>
+      </signal>
+      <signal name="ChangeState" cname="change-state" when="LAST">
+        <return-type type="void" />
+        <parameters>
+          <parameter name="p0" type="gvariant" />
+        </parameters>
+      </signal>
+      <property name="Name" cname="name" type="gchar*" readable="true" writeable="true" construct-only="true" />
+      <property name="ParameterType" cname="parameter-type" type="GVariantType" readable="true" writeable="true" construct-only="true" />
+      <property name="Enabled" cname="enabled" type="gboolean" readable="true" writeable="true" />
+      <property name="StateType" cname="state-type" type="GVariantType" readable="true" />
+      <property name="State" cname="state" type="variant" readable="true" writeable="true" construct="true" />
+      <implements>
+        <interface cname="GAction" />
+      </implements>
+      <method name="GetType" cname="g_simple_action_get_type" shared="true">
+        <return-type type="GType" />
+      </method>
+      <constructor cname="g_simple_action_new">
+        <parameters>
+          <parameter type="const-gchar*" name="name" />
+          <parameter type="const-GVariantType*" name="parameter_type" />
+        </parameters>
+      </constructor>
+      <constructor cname="g_simple_action_new_stateful">
+        <parameters>
+          <parameter type="const-gchar*" name="name" />
+          <parameter type="const-GVariantType*" name="parameter_type" />
+          <parameter type="GVariant*" name="state" />
+        </parameters>
+      </constructor>
+      <method name="SetEnabled" cname="g_simple_action_set_enabled">
+        <return-type type="void" />
+        <parameters>
+          <parameter type="gboolean" name="enabled" />
+        </parameters>
+      </method>
+      <method name="SetState" cname="g_simple_action_set_state">
+        <return-type type="void" />
+        <parameters>
+          <parameter type="GVariant*" name="value" />
+        </parameters>
+      </method>
+      <method name="SetStateHint" cname="g_simple_action_set_state_hint">
+        <return-type type="void" />
+        <parameters>
+          <parameter type="GVariant*" name="state_hint" />
+        </parameters>
+      </method>
+    </object>
+    <object name="SimpleActionGroup" cname="GSimpleActionGroup" parent="GObject">
+      <class_struct cname="GSimpleActionGroupClass">
+        <field name="ParentClass" cname="parent_class" type="GObjectClass" />
+        <field name="Padding" cname="padding" type="gpointer" array_len="12" />
+      </class_struct>
+      <field name="Priv" cname="priv" type="GSimpleActionGroupPrivate*" />
+      <implements>
+        <interface cname="GActionGroup" />
+        <interface cname="GActionMap" />
+      </implements>
+      <method name="GetType" cname="g_simple_action_group_get_type" shared="true">
+        <return-type type="GType" />
+      </method>
+      <constructor cname="g_simple_action_group_new" />
+    </object>
     <object name="SimpleAsyncResult" cname="GSimpleAsyncResult" parent="GObject">
       <class_struct cname="GSimpleAsyncResultClass">
         <field name="ParentClass" cname="parent_class" type="GObjectClass" />
@@ -13504,8 +13575,6 @@
     <struct name="SettingsBackend" cname="GSettingsBackend" opaque="true" />
     <struct name="SettingsBackendClosure" cname="GSettingsBackendClosure" opaque="true" />
     <struct name="SettingsBackendWatch" cname="GSettingsBackendWatch" opaque="true" />
-    <struct name="SimpleAction" cname="GSimpleAction" opaque="true" />
-    <struct name="SimpleActionGroup" cname="GSimpleActionGroup" opaque="true" />
     <struct name="Socket" cname="GSocket" opaque="true" />
     <boxed name="SrvTarget" cname="GSrvTarget" opaque="true">
       <method name="Copy" cname="g_srv_target_copy">
diff --git a/sources/Makefile.am b/sources/Makefile.am
index 653bb61d2..2b9e8bd63 100644
--- a/sources/Makefile.am
+++ b/sources/Makefile.am
@@ -3,7 +3,7 @@ EXTRA_DIST =					\
 	sources.xml				\
 	gtk_tree_model_signal_fix.patch
 
-TARGET_GTK_VERSION=3.20.4
+TARGET_GTK_VERSION=3.20.6
 TARGET_GTK_API=3.20
 
 GTK_DOWNLOADS = \
@@ -24,8 +24,6 @@ get-source-code:
 	patch -p0 gtk+-$(TARGET_GTK_VERSION)/gtk/gtktreemodel.c < gtk_tree_model_signal_fix.patch
 	echo "typedef struct _GtkClipboard GtkClipboard;" >> gtk+-$(TARGET_GTK_VERSION)/gtk/gtkclipboard.h
 	echo "typedef struct _GtkClipboardClass GtkClipboardClass;" >> gtk+-$(TARGET_GTK_VERSION)/gtk/gtkclipboard.h
-	patch -p0 gtk+-$(TARGET_GTK_VERSION)/gtk/gtkselectionprivate.h < gtkselectionprivate-space.patch 
 	patch -p0 gtk+-$(TARGET_GTK_VERSION)/gtk/gtktextattributes.h < gtktextattributes-gi-scanner.patch 
-	patch -p0 gtk+-$(TARGET_GTK_VERSION)/gtk/gtktextview.h < gtk_text_view_public.patch 
 	patch -p0 glib-2.48.0/gio/gwin32registrykey.h < gwin32registrykey-little-endian.patch
 
diff --git a/sources/gtk_text_view_public.patch b/sources/gtk_text_view_public.patch
deleted file mode 100644
index 5363d5b08..000000000
--- a/sources/gtk_text_view_public.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- gtk+-3.16.6.orig/gtk/gtktextview.h	2015-09-04 11:37:38.035020919 +0200
-+++ gtk+-3.16.6/gtk/gtktextview.h	2015-09-04 11:38:59.958096121 +0200
-@@ -155,8 +155,6 @@
- {
-   GtkContainerClass parent_class;
- 
--  /*< public */
--
-   void (* populate_popup)        (GtkTextView      *text_view,
-                                   GtkWidget        *popup);
-   void (* move_cursor)           (GtkTextView      *text_view,
diff --git a/sources/gtkselectionprivate-space.patch b/sources/gtkselectionprivate-space.patch
deleted file mode 100644
index 6efdd70fc..000000000
--- a/sources/gtkselectionprivate-space.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- gtk+-3.12.0.orig/gtk/gtkselectionprivate.h	2014-06-10 09:14:53.055629108 +0200
-+++ gtk+-3.12.0/gtk/gtkselectionprivate.h	2014-06-10 09:14:59.503650175 +0200
-@@ -52,7 +52,7 @@
-   /*< private >*/
-   GList *list;
-   guint ref_count;
-- };
-+};
- 
- gboolean _gtk_selection_clear           (GtkWidget         *widget,
-                                          GdkEventSelection *event);
diff --git a/sources/sources.xml b/sources/sources.xml
index eb813d780..996b8fc66 100644
--- a/sources/sources.xml
+++ b/sources/sources.xml
@@ -78,8 +78,6 @@
           <exclude>gsettingsschema.h</exclude>
           <exclude>gsettingsschema-internal.h</exclude>
           <exclude>gtlsfiledatabase.h</exclude>
-          <exclude>gsimpleaction.h</exclude>
-          <exclude>gsimpleactiongroup.h</exclude>
           <exclude>gdtlsclientconnection.c</exclude>
           <exclude>gdtlsclientconnection.h</exclude>
           <exclude>gdtlsconnection.c</exclude>
@@ -142,12 +140,12 @@
   <api filename="../gdk/gdk-api.raw">
     <library name="libgdk-3-0.dll">
       <namespace name="Gdk">
-        <directory path="gtk+-3.20.4/gdk">
+        <directory path="gtk+-3.20.6/gdk">
           <exclude>gdkalias.h</exclude>
           <exclude>gdkwindowimpl.h</exclude>
           <exclude>keyname-table.h</exclude>
         </directory>
-	<directory path="gtk+-3.20.4/gdk/deprecated" />
+	<directory path="gtk+-3.20.6/gdk/deprecated" />
       </namespace>
     </library>
     <library name="libgdk_pixbuf-2.0-0.dll">
@@ -167,7 +165,7 @@
   <api filename="../gtk/gtk-api.raw">
     <library name="libgtk-3-0.dll">
       <namespace name="Gtk">
-        <directory path="gtk+-3.20.4/gtk">
+        <directory path="gtk+-3.20.6/gtk">
           <!-- Internal stuff -->
           <exclude>gtkalias.h</exclude>
           <exclude>gtkappchooseronline.h</exclude>
@@ -265,7 +263,7 @@
           <exclude>gtkcomposetable.c</exclude>
           <exclude>gtkcomposetable.h</exclude>
         </directory>
-	<directory path="gtk+-3.20.4/gtk/deprecated" />
+	<directory path="gtk+-3.20.6/gtk/deprecated" />
       </namespace>
     </library>
   </api>