Imported Upstream version 2.38.1 upstream/2.38.1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 7 Sep 2020 06:42:59 +0000 (23:42 -0700)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 7 Sep 2020 06:42:59 +0000 (23:42 -0700)
NEWS
configure.ac
gio/giomm/contenttype.h
gio/src/actiongroup.hg
gio/src/file.hg
tests/giomm_tls_client/main.cc

diff --git a/NEWS b/NEWS
index 2006d40..a5d0719 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+2.36.1 (stable):
+
+Build:
+* Gio::ActionGroup: Remove a nonsensical check that
+  clang complains about, correctly.
+  (Murray Cumming) Bug #709963 (Johannes Meng, David Evans)
+
+Documentation:
+* Gio::content_type_*(): Add a link from Gtk::AppChooser.
+  (Kjell Ahlstedt)
+* giomm_tls_client test: Add some comments
+  (Kjell Ahlstedt)
+
+
 Changes in 2.38 compared to 2.36:
 
 Glib:
index 0d0702e..cfe992c 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.38.0],
+AC_INIT([glibmm], [2.38.1],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
         [glibmm], [http://www.gtkmm.org/])
 AC_PREREQ([2.59])
index af27f24..ee14264 100644 (file)
 
 namespace Gio
 {
+/** @defgroup giommContentType Platform-specific content typing
+ * A content type is a platform specific string that defines the type of a file.
+ * On UNIX it is a <a href="http://www.wikipedia.org/wiki/Internet_media_type">mime type</a>
+ * like "text/plain" or "image/png".
+ * On Win32 it is an extension string like ".doc", ".txt" or a perceived
+ * string like "audio". Such strings can be looked up in the registry at
+ * HKEY_CLASSES_ROOT.
+ * @{
+ */
 
 /**
  * Compares two content types for equality.
@@ -43,7 +52,7 @@ bool content_type_equals(const Glib::ustring& type1,
  * Determines if @a type is a subset of @a supertype.
  *
  * @param type A content type string.
- * @param supertype A string.
+ * @param supertype A content type string.
  *
  * @return true if @a type is a kind of @a supertype, false otherwise.
  */
@@ -71,19 +80,19 @@ bool content_type_is_unknown(const Glib::ustring& type);
 Glib::ustring content_type_get_description(const Glib::ustring& type);
 
 /**
- * Gets the mime-type for the content type. If one is registered
+ * Gets the mime-type for the content type, if one is registered.
  *
  * @param type A content type string.
  *
- * @return the registered mime-type for the given @a type, or NULL if unknown.
+ * @return the registered mime-type for the given @a type, or an empty string if unknown.
  */
 Glib::ustring content_type_get_mime_type(const Glib::ustring& type);
 
 /**
- * @param type A content type string.
- *
  * Gets the icon for a content type.
  *
+ * @param type A content type string.
+ *
  * @return Icon corresponding to the content type.
  */
 Glib::RefPtr<Icon> content_type_get_icon(const Glib::ustring& type);
@@ -92,7 +101,7 @@ Glib::RefPtr<Icon> content_type_get_icon(const Glib::ustring& type);
  * Gets the symbolic icon for a content type.
  *
  * @param type A content type string.
- * @return Icon corresponding to the content type.
+ * @return symbolic Icon corresponding to the content type.
  *
  * @newin{2,34}
  */
@@ -120,12 +129,14 @@ Glib::ustring content_type_from_mime_type(const Glib::ustring& mime_type);
 
 /**
  * Guesses the content type based on example data. If the function is uncertain,
- * @a result_uncertain will be set to true
+ * @a result_uncertain will be set to true. Either @a filename may be an empty
+ * string or @a data may be <tt>0</tt>, in which case the guess will be based
+ * solely on the other argument.
  *
  * @param filename a string.
  * @param data A stream of data.
  * @param data_size The size of @a data.
- * @param result_uncertain A flag indicating the certainty of the result.
+ * @param[out] result_uncertain A flag indicating the certainty of the result.
  * @return A string indicating a guessed content type for the
  * given data.
  */
@@ -135,11 +146,12 @@ Glib::ustring content_type_guess(const std::string& filename,
 
 /**
  * Guesses the content type based on example data. If the function is uncertain,
- * @a result_uncertain will be set to true
+ * @a result_uncertain will be set to true. @a filename may be an empty string,
+ * in which case the guess will be based solely on @a data.
  *
  * @param filename a string.
  * @param data A stream of data.
- * @param result_uncertain A flag indicating the certainty of the result.
+ * @param[out] result_uncertain A flag indicating the certainty of the result.
  * @return A string indicating a guessed content type for the
  * given data.
  */
@@ -153,7 +165,7 @@ Glib::ustring content_type_guess(const std::string& filename,
  *
  * The types returned all have the form x-content/foo, e.g.
  * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
- * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
+ * (for a camera memory card). See the <a href="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</a>
  * specification for more on x-content types.
  *
  * @param root The root of the tree to guess a type for.
@@ -171,5 +183,7 @@ Glib::StringArrayHandle content_type_guess_for_tree(const Glib::RefPtr<const Fil
  */
 Glib::ListHandle<Glib::ustring> content_types_get_registered();
 
+/** @} group giommContentType */
+
 } // namespace Gio
 #endif // _GIOMM_CONTENTTYPE_H
index 4d706d7..434b7fa 100644 (file)
@@ -184,9 +184,6 @@ void ActionGroup::get_action_state_hint(const Glib::ustring& action_name, T_Valu
 
   typedef Glib::Variant<T_Value> type_glib_variant;
 
-  g_return_if_fail(
-    g_variant_type_equal(g_action_get_state_type(const_cast<GAction*>(gobj())), type_glib_variant::variant_type().gobj()));
-
   const Glib::VariantBase variantBase = get_action_state_hint_variant(action_name);
 
   // We can't check the type (a range) that will be returned before getting the range hint.
index 55591e2..b01d0e8 100644 (file)
@@ -1051,6 +1051,8 @@ public:
                g_file_set_display_name_finish,
                errthrow)
 
+  //TODO: Remove the bool results from this and other methods that thrown an exception.
+
   /** Deletes a file.
    * If the file is a directory, it will only be deleted if it is empty.
    * The operation can be cancelled by triggering the cancellable object from another thread.
index 6518112..8752970 100644 (file)
@@ -1,3 +1,21 @@
+// This test case fails unless an implementation of TLS backend is installed.
+// (Exception caught: TLS support is not available.)
+// Module glib-networking implements TLS backend.
+//
+// Even if glib-networking is installed, it's possible that glib does not find it.
+// That's very probable if glib and glib-networking are installed with different
+// directory prefixes, e.g. glib in /opt/gnome and glib-networking in /usr.
+// You can fix that by setting the GIO_EXTRA_MODULES environment variable to
+// the directory to search for implementations of gio extension points.
+// Example:
+//   export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules
+// If you don't know where the implementations of gio extension points are stored,
+// search for a file named giomodule.cache.
+//
+// https://developer.gnome.org/gio/stable/extending-gio.html (G_TLS_BACKEND_EXTENSION_POINT_NAME)
+// https://developer.gnome.org/gio/stable/gio-Extension-Points.html
+// https://developer.gnome.org/gio/stable/gio-querymodules.html
+
 #include <giomm.h>
 #include <iostream>
 #include <cstdlib>