glibmm r585 - in trunk: . gio/src
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r585 - in trunk: . gio/src
- Date: Tue, 5 Feb 2008 11:43:44 +0000 (GMT)
Author: murrayc
Date: Tue Feb 5 11:43:44 2008
New Revision: 585
URL: http://svn.gnome.org/viewvc/glibmm?rev=585&view=rev
Log:
2008-02-05 Murray Cumming <murrayc murrayc com>
* gio/src/file.ccg:
* gio/src/file.hg: Added an overload of query_default_handler()
without the cancellable.
Modified:
trunk/ChangeLog
trunk/gio/src/file.ccg
trunk/gio/src/file.hg
Modified: trunk/gio/src/file.ccg
==============================================================================
--- trunk/gio/src/file.ccg (original)
+++ trunk/gio/src/file.ccg Tue Feb 5 11:43:44 2008
@@ -1955,4 +1955,25 @@
return retvalue;
}
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<AppInfo> File::query_default_handler()
+#else
+Glib::RefPtr<AppInfo> File::query_default_handler(std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ GError* gerror = 0;
+ Glib::RefPtr<AppInfo> retvalue = Glib::wrap(g_file_query_default_handler(gobj(), NULL, &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ if(gerror)
+ ::Glib::Error::throw_exception(gerror);
+#else
+ if(gerror)
+ error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
} // namespace Gio
Modified: trunk/gio/src/file.hg
==============================================================================
--- trunk/gio/src/file.hg (original)
+++ trunk/gio/src/file.hg Tue Feb 5 11:43:44 2008
@@ -1590,6 +1590,17 @@
g_file_query_default_handler,
refreturn, errthrow)
+/** Returns the AppInfo that is registered as the default
+ * application to handle the file specified by the file.
+ *
+ * @result A AppInfo if the handle was found, or an empty RefPtr if there were errors.
+ **/
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ Glib::RefPtr<AppInfo> query_default_handler();
+#else
+ Glib::RefPtr<AppInfo> query_default_handler(std::auto_ptr<Glib::Error>& error);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
//TODO: Documentation.
//TODO: atm I don't understand what's etag_out:
// "a pointer to the current entity tag for the document" - sounds like it
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]