Imported Upstream version 2.40.0 upstream/2.40.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 7 Sep 2020 06:45:06 +0000 (23:45 -0700)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 7 Sep 2020 06:45:06 +0000 (23:45 -0700)
MSVC_Net2005/glibmm/glibmm.vcproj
MSVC_Net2008/glibmm/glibmm.vcproj
MSVC_Net2010/glibmm/glibmm.vcxproj
MSVC_Net2010/glibmm/glibmm.vcxproj.filters
NEWS
configure.ac
examples/options/main.cc
gio/src/application.hg
glib/src/varianttype.ccg
tools/extra_defs_gen/generate_extra_defs.cc
tools/pm/DocsParser.pm

index b804334..2359f70 100755 (executable)
                        <File RelativePath="..\..\glib\glibmm\value_custom.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\valuearray.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\variant.cc" />\r
+                       <File RelativePath="..\..\glib\glibmm\variantdict.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\variantiter.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\varianttype.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\variant_basictypes.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\value_custom.h" />\r
                        <File RelativePath="..\..\glib\glibmm\valuearray.h" />\r
                        <File RelativePath="..\..\glib\glibmm\variant.h" />\r
+                       <File RelativePath="..\..\glib\glibmm\variantdict.h" />\r
                        <File RelativePath="..\..\glib\glibmm\variantiter.h" />\r
                        <File RelativePath="..\..\glib\glibmm\varianttype.h" />\r
                        <File RelativePath="..\..\glib\glibmm\variant_basictypes.h" />\r
index f564cae..cf97fdb 100644 (file)
                        <File RelativePath="..\..\glib\glibmm\value_custom.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\valuearray.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\variant.cc" />\r
+                       <File RelativePath="..\..\glib\glibmm\variantdict.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\variantiter.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\varianttype.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\variant_basictypes.cc" />\r
                        <File RelativePath="..\..\glib\glibmm\value_custom.h" />\r
                        <File RelativePath="..\..\glib\glibmm\valuearray.h" />\r
                        <File RelativePath="..\..\glib\glibmm\variant.h" />\r
+                       <File RelativePath="..\..\glib\glibmm\variantdict.h" />\r
                        <File RelativePath="..\..\glib\glibmm\variantiter.h" />\r
                        <File RelativePath="..\..\glib\glibmm\varianttype.h" />\r
                        <File RelativePath="..\..\glib\glibmm\vectorutils.h" />\r
index afc4abc..e205997 100644 (file)
     <ClCompile Include="..\..\glib\glibmm\value_custom.cc" />
     <ClCompile Include="..\..\glib\glibmm\valuearray.cc" />
     <ClCompile Include="..\..\glib\glibmm\variant.cc" />
+    <ClCompile Include="..\..\glib\glibmm\variantdict.cc" />
     <ClCompile Include="..\..\glib\glibmm\variantiter.cc" />
     <ClCompile Include="..\..\glib\glibmm\varianttype.cc" />
     <ClCompile Include="..\..\glib\glibmm\variant_basictypes.cc" />
     <ClInclude Include="..\..\glib\glibmm\value_custom.h" />
     <ClInclude Include="..\..\glib\glibmm\valuearray.h" />
     <ClInclude Include="..\..\glib\glibmm\variant.h" />
+    <ClInclude Include="..\..\glib\glibmm\variantdict.h" />
     <ClInclude Include="..\..\glib\glibmm\variantiter.h" />
     <ClInclude Include="..\..\glib\glibmm\varianttype.h" />
     <ClInclude Include="..\..\glib\glibmm\variant_basictypes.h" />
index 7bb409c..068e5c2 100644 (file)
@@ -75,6 +75,7 @@
     <ClCompile Include="..\..\glib\glibmm\value_custom.cc"><Filter>Source Files</Filter></ClCompile>
     <ClCompile Include="..\..\glib\glibmm\valuearray.cc"><Filter>Source Files</Filter></ClCompile>
     <ClCompile Include="..\..\glib\glibmm\variant.cc"><Filter>Source Files</Filter></ClCompile>
+    <ClCompile Include="..\..\glib\glibmm\variantdict.cc"><Filter>Source Files</Filter></ClCompile>
     <ClCompile Include="..\..\glib\glibmm\variantiter.cc"><Filter>Source Files</Filter></ClCompile>
     <ClCompile Include="..\..\glib\glibmm\varianttype.cc"><Filter>Source Files</Filter></ClCompile>
     <ClCompile Include="..\..\glib\glibmm\variant_basictypes.cc"><Filter>Source Files</Filter></ClCompile>
     <ClInclude Include="..\..\glib\glibmm\value_custom.h"><Filter>Header Files</Filter></ClInclude>
     <ClInclude Include="..\..\glib\glibmm\valuearray.h"><Filter>Header Files</Filter></ClInclude>
     <ClInclude Include="..\..\glib\glibmm\variant.h"><Filter>Header Files</Filter></ClInclude>
+    <ClInclude Include="..\..\glib\glibmm\variantdict.h"><Filter>Header Files</Filter></ClInclude>
     <ClInclude Include="..\..\glib\glibmm\variantiter.h"><Filter>Header Files</Filter></ClInclude>
     <ClInclude Include="..\..\glib\glibmm\varianttype.h"><Filter>Header Files</Filter></ClInclude>
     <ClInclude Include="..\..\glib\glibmm\variant_basictypes.h"><Filter>Header Files</Filter></ClInclude>
diff --git a/NEWS b/NEWS
index 1fd61e3..b58e2de 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,12 @@
+2.40.0 (stable):
+
+* VariantType: Fix typo in VARIANT_TYPE_BYTESTRING_ARRAY value.
+  (Murray Cumming)
+* gmmproc: Small improvement of enum documentation
+  (Kjell Ahlstedt)
+* Windows Update the visual Studio build files.
+  (Chun-wei Fan)
+
 2.39.93 (unstable):
 
 Glib:
index 3c4f214..85806e1 100644 (file)
@@ -15,7 +15,7 @@
 ## You should have received a copy of the GNU Lesser General Public License
 ## along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_INIT([glibmm], [2.39.93],
+AC_INIT([glibmm], [2.40.0],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
         [glibmm], [http://www.gtkmm.org/])
 AC_PREREQ([2.59])
index ee524da..1ef290b 100644 (file)
@@ -98,7 +98,6 @@ ExampleOptionGroup::ExampleOptionGroup()
 
   Glib::OptionEntry entry_remaining;
   entry_remaining.set_long_name(G_OPTION_REMAINING);
-  entry_remaining.set_arg_description(G_OPTION_REMAINING);
 
   add_entry(entry_remaining, m_remaining_list);
 }
index 06011b2..ac96e0c 100644 (file)
@@ -27,7 +27,7 @@
 #include <giomm/applicationcommandline.h>
 #include <giomm/file.h>
 #include <glibmm/object.h>
-#include <glibmm/optiongroup.h>
+//#include <glibmm/optiongroup.h>
 #include <glibmm/variant.h>
 #include <glibmm/variantdict.h>
 #include <giomm/dbusconnection.h>
@@ -140,7 +140,7 @@ public:
   //void add_main_option_entry(Glib::OptionEntry& entry);
   //_IGNORE(g_application_add_main_option_entries)
 
-  _WRAP_METHOD(void add_option_group(Glib::OptionGroup& group), g_application_add_option_group)
+  //TODO: _WRAP_METHOD(void add_option_group(Glib::OptionGroup& group), g_application_add_option_group)
 
   _WRAP_METHOD(bool is_registered() const, g_application_get_is_registered)
   _WRAP_METHOD(bool is_remote() const, g_application_get_is_remote)
index 5493ead..71d34d9 100644 (file)
@@ -114,7 +114,7 @@ const VariantType VARIANT_TYPE_STRING_ARRAY(G_VARIANT_TYPE_STRING_ARRAY);
 
 const VariantType VARIANT_TYPE_BYTESTRING(G_VARIANT_TYPE_BYTESTRING);
 
-const VariantType VARIANT_TYPE_BYTESTRING_ARRAY(G_VARIANT_TYPE_STRING_ARRAY);
+const VariantType VARIANT_TYPE_BYTESTRING_ARRAY(G_VARIANT_TYPE_BYTESTRING_ARRAY);
 
 std::string VariantType::get_string() const
 {
index 8229cd7..52a35fe 100644 (file)
@@ -23,6 +23,9 @@
 #include "generate_extra_defs.h"
 #include <algorithm>
 
+// Until the glib bug https://bugzilla.gnome.org/show_bug.cgi?id=465631
+// is fixed, get_properties() must be called for a GObject before it's
+// called for a GInterface.
 std::string get_properties(GType gtype)
 {
   std::string strResult;
@@ -45,19 +48,21 @@ std::string get_properties(GType gtype)
   else if (G_TYPE_IS_INTERFACE(gtype))
   {
     gpointer pGInterface = g_type_default_interface_ref(gtype);
-    if(pGInterface) //We check because this fails for G_TYPE_VOLUME, for some reason.
+    if(pGInterface)
     {
       ppParamSpec = g_object_interface_list_properties(pGInterface, &iCount);
       g_type_default_interface_unref(pGInterface);
 
       if(!ppParamSpec)
       {
-        strResult +=  ";; Warning: g_object_interface_list_properties() returned NULL for " + std::string(g_type_name(gtype)) + "\n";
+        strResult += ";; Warning: g_object_interface_list_properties() returned NULL for " + std::string(g_type_name(gtype)) + "\n";
       }
     }
+    else
+      strResult += ";; Warning: g_type_default_interface_ref() returned NULL for " + std::string(g_type_name(gtype)) + "\n";
   }
 
-  //This extra check avoids an occasional crash, for instance for GVolume
+  //This extra check avoids an occasional crash
   if(!ppParamSpec)
     iCount = 0;
 
@@ -211,7 +216,7 @@ std::string get_signals(GType gtype, GTypeIsAPointerFunc is_a_pointer_func)
           GType typeParamMangled = pParameters[i];
 
           //Parameter name:
-          //TODO: How can we get the real parameter name?
+          //We can't get the real parameter name from the GObject system. It's not registered with g_signal_new().
           gchar* pchNum = g_strdup_printf("%d", i);
           std::string strParamName = "p" + std::string(pchNum);
           g_free(pchNum);
@@ -219,15 +224,15 @@ std::string get_signals(GType gtype, GTypeIsAPointerFunc is_a_pointer_func)
 
           //Just like above, for the return type:
           std::string strTypeName = get_type_name_signal( typeParamMangled & ~G_SIGNAL_TYPE_STATIC_SCOPE, is_a_pointer_func ); //The type is mangled with a flag. Hacky.
-          //bool bReturnTypeHasStaticScope = (typeParamMangled & G_SIGNAL_TYPE_STATIC_SCOPE) == G_SIGNAL_TYPE_STATIC_SCOPE;
+          //bool bTypeHasStaticScope = (typeParamMangled & G_SIGNAL_TYPE_STATIC_SCOPE) == G_SIGNAL_TYPE_STATIC_SCOPE;
 
           strResult += "    '(\"" + strTypeName + "\" \"" + strParamName + "\")\n";
         }
 
-        strResult += "  )\n"; //close (properties
+        strResult += "  )\n"; //close (parameters
       }
 
-      strResult += ")\n\n"; //close (define=signal
+      strResult += ")\n\n"; //close (define-signal
     }
   }
 
@@ -242,17 +247,20 @@ std::string get_signals(GType gtype, GTypeIsAPointerFunc is_a_pointer_func)
 }
 
 
-
 std::string get_defs(GType gtype, GTypeIsAPointerFunc is_a_pointer_func)
 {
   std::string strObjectName = g_type_name(gtype);
-  std::string strDefs = ";; From " + strObjectName + "\n\n";
+  std::string strDefs;
 
   if(G_TYPE_IS_OBJECT(gtype) || G_TYPE_IS_INTERFACE(gtype))
   {
+    strDefs = ";; From " + strObjectName + "\n\n";
     strDefs += get_signals(gtype, is_a_pointer_func);
     strDefs += get_properties(gtype);
   }
+  else
+    strDefs = ";; " + strObjectName +
+      " is neither a GObject nor a GInterface. Not checked for signals and properties.\n\n";
 
   return strDefs;
 }
index f7c9ea7..854502d 100644 (file)
@@ -269,15 +269,14 @@ sub lookup_enum_documentation($$$)
   {
     my $desc = $$param_descriptions->{$param};
 
-    # Remove the initial prefix which would be something like GTK_.
-    $param =~ s/\b[A-Z]+_//g;
-    $desc =~ s/\b[A-Z]+_//g;
+    # Remove the initial prefix in the name of the enum constant. Would be something like GTK_.
+    $param =~ s/\b[A-Z]+_//;
 
     # Now apply custom substitutions.
     for(my $i = 0; $i < scalar(@subst_in); ++$i)
     {
-      $param  =~ s/${subst_in[$i]}/${subst_out[$i]}/;
-      $desc =~ s/${subst_in[$i]}/${subst_out[$i]}/;
+      $param =~ s/${subst_in[$i]}/${subst_out[$i]}/;
+      $desc  =~ s/${subst_in[$i]}/${subst_out[$i]}/;
     }
 
     # Skip this element, if its name has been deleted.
@@ -286,9 +285,11 @@ sub lookup_enum_documentation($$$)
     $param =~ s/([a-zA-Z0-9]*(_[a-zA-Z0-9]+)*)_?/$1/g;
     if(length($desc) > 0)
     {
-      $desc =~ s/\n//g;
-      $desc  .= '.' unless($desc =~ /(?:^|\.)$/);
-      $docs .= "\@var $cpp_enum_name ${param}\n\u${desc}\n\n";
+      $desc =~ s/\n/ /g;
+      $desc =~ s/ $//;
+      $desc =~ s/^\s+//; # Chop off leading whitespace
+      $desc .= '.' unless($desc =~ /(?:^|\.)$/);
+      $docs .= "\@var $cpp_enum_name ${param}\n \u${desc}\n\n"; # \u = Convert next char to uppercase
     }
   }
 
@@ -600,7 +601,8 @@ sub substitute_identifiers($$)
     # Undo wrong substitutions.
     s/\bHas::/HAS_/g;
     s/\bNo::/NO_/g;
-    s/\bG:://g; #Rename G::Something to Something. Doesn't seem to work. murrayc.
+    s/\bO::/O_/g;
+    s/\bG:://g; #Rename G::Something to Something.
 
     # Substitute callback types to slot types.
     s/(\b\w+)Callback/Slot$1/g;