glibmm r694 - in trunk: . gio/giomm gio/src
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r694 - in trunk: . gio/giomm gio/src
- Date: Fri, 25 Jul 2008 13:28:14 +0000 (UTC)
Author: murrayc
Date: Fri Jul 25 13:28:14 2008
New Revision: 694
URL: http://svn.gnome.org/viewvc/glibmm?rev=694&view=rev
Log:
2008-07-25 Murray Cumming <murrayc murrayc com>
* gio/src/gio_enums.defs:
* gio/src/gio_methods.defs:
* gio/src/gio_signals.defs: Regenerated.
* gio/src/mount.hg: Corrected an _IGNORE().
* gio/giomm/contenttype.cc:
* gio/giomm/contenttype.h: Added content_type_guess_for_tree(
Modified:
trunk/ChangeLog
trunk/gio/giomm/contenttype.cc
trunk/gio/giomm/contenttype.h
trunk/gio/src/fileattributeinfo.hg
trunk/gio/src/gio_enums.defs
trunk/gio/src/gio_methods.defs
trunk/gio/src/gio_signals.defs
trunk/gio/src/mount.hg
Modified: trunk/gio/giomm/contenttype.cc
==============================================================================
--- trunk/gio/giomm/contenttype.cc (original)
+++ trunk/gio/giomm/contenttype.cc Fri Jul 25 13:28:14 2008
@@ -90,6 +90,12 @@
return Glib::convert_return_gchar_ptr_to_ustring(cresult);
}
+Glib::StringArrayHandle content_type_guess_for_tree(const Glib::RefPtr<const File>& root)
+{
+ return Glib::StringArrayHandle(g_content_type_guess_for_tree(const_cast<GFile*>(root->gobj())),
+ Glib::OWNERSHIP_DEEP);
+}
+
Glib::ListHandle<Glib::ustring> content_types_get_registered()
{
return Glib::ListHandle<Glib::ustring>(g_content_types_get_registered(),
Modified: trunk/gio/giomm/contenttype.h
==============================================================================
--- trunk/gio/giomm/contenttype.h (original)
+++ trunk/gio/giomm/contenttype.h Fri Jul 25 13:28:14 2008
@@ -22,6 +22,7 @@
#include <glibmm/ustring.h>
#include <glibmm/listhandle.h>
#include <giomm/icon.h>
+#include <giomm/file.h>
#include <string>
namespace Gio
@@ -127,6 +128,22 @@
const std::string& data,
bool& result_uncertain);
+/** Tries to guess the type of the tree with root @a root, by
+ * looking at the files it contains. The result is a list
+ * of content types, with the best guess coming first.
+ *
+ * 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>
+ * specification for more on x-content types.
+ *
+ * @param root The root of the tree to guess a type for.
+ * @return List of zero or more content types.
+ *
+ * @newin2p18
+ */
+Glib::StringArrayHandle content_type_guess_for_tree(const Glib::RefPtr<const File>& root);
+
/**
* Gets a list of strings containing all the registered content types
* known to the system.
Modified: trunk/gio/src/fileattributeinfo.hg
==============================================================================
--- trunk/gio/src/fileattributeinfo.hg (original)
+++ trunk/gio/src/fileattributeinfo.hg Fri Jul 25 13:28:14 2008
@@ -27,6 +27,7 @@
{
//TODO: Fix the need for NO_GTYPE.
+//It guesses gfile_attribute_type_get_type() instead of g_file_attribute_type_get_type(). murrayc.
_WRAP_ENUM(FileAttributeType, GFileAttributeType, NO_GTYPE)
_WRAP_ENUM(FileAttributeInfoFlags, GFileAttributeInfoFlags, NO_GTYPE)
_WRAP_ENUM(FileAttributeStatus, GFileAttributeStatus, NO_GTYPE)
Modified: trunk/gio/src/gio_enums.defs
==============================================================================
--- trunk/gio/src/gio_enums.defs (original)
+++ trunk/gio/src/gio_enums.defs Fri Jul 25 13:28:14 2008
@@ -1,17 +1,15 @@
-;; From /opt/gnome2/include/glib-2.0/gio/gappinfo.h
+;; From /home/murrayc/svn/gnome220/glib/gio/gioenums.h
(define-flags-extended AppInfoCreateFlags
(in-module "G")
(c-name "GAppInfoCreateFlags")
(values
'("none" "G_APP_INFO_CREATE_NONE" "0")
- '("needs-terminal" "G_APP_INFO_CREATE_NEEDS_TERMINAL" "1<<0")
- '("supports-uris" "G_APP_INFO_CREATE_SUPPORTS_URIS" "1<<1")
+ '("needs-terminal" "G_APP_INFO_CREATE_NEEDS_TERMINAL" "1 << 0")
+ '("supports-uris" "G_APP_INFO_CREATE_SUPPORTS_URIS" "1 << 1")
)
)
-;; From /opt/gnome2/include/glib-2.0/gio/gdatainputstream.h
-
(define-enum-extended DataStreamByteOrder
(in-module "G")
(c-name "GDataStreamByteOrder")
@@ -33,8 +31,6 @@
)
)
-;; From /opt/gnome2/include/glib-2.0/gio/gfileattribute.h
-
(define-enum-extended FileAttributeType
(in-module "G")
(c-name "GFileAttributeType")
@@ -71,14 +67,12 @@
)
)
-;; From /opt/gnome2/include/glib-2.0/gio/gfile.h
-
(define-flags-extended FileQueryInfoFlags
(in-module "G")
(c-name "GFileQueryInfoFlags")
(values
'("none" "G_FILE_QUERY_INFO_NONE" "0")
- '("nofollow-symlinks" "G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS" "1<<0")
+ '("nofollow-symlinks" "G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS" "1 << 0")
)
)
@@ -87,7 +81,7 @@
(c-name "GFileCreateFlags")
(values
'("none" "G_FILE_CREATE_NONE" "0")
- '("private" "G_FILE_CREATE_PRIVATE" "1<<0")
+ '("private" "G_FILE_CREATE_PRIVATE" "1 << 0")
)
)
@@ -104,7 +98,7 @@
(c-name "GMountUnmountFlags")
(values
'("none" "G_MOUNT_UNMOUNT_NONE" "0")
- '("force" "G_MOUNT_UNMOUNT_FORCE" "1<<0")
+ '("force" "G_MOUNT_UNMOUNT_FORCE" "1 << 0")
)
)
@@ -113,11 +107,11 @@
(c-name "GFileCopyFlags")
(values
'("none" "G_FILE_COPY_NONE" "0")
- '("overwrite" "G_FILE_COPY_OVERWRITE" "1<<0")
- '("backup" "G_FILE_COPY_BACKUP" "1<<1")
- '("nofollow-symlinks" "G_FILE_COPY_NOFOLLOW_SYMLINKS" "1<<2")
- '("all-metadata" "G_FILE_COPY_ALL_METADATA" "1<<3")
- '("no-fallback-for-move" "G_FILE_COPY_NO_FALLBACK_FOR_MOVE" "1<<4")
+ '("overwrite" "G_FILE_COPY_OVERWRITE" "1 << 0")
+ '("backup" "G_FILE_COPY_BACKUP" "1 << 1")
+ '("nofollow-symlinks" "G_FILE_COPY_NOFOLLOW_SYMLINKS" "1 << 2")
+ '("all-metadata" "G_FILE_COPY_ALL_METADATA" "1 << 3")
+ '("no-fallback-for-move" "G_FILE_COPY_NO_FALLBACK_FOR_MOVE" "1 << 4")
)
)
@@ -126,12 +120,10 @@
(c-name "GFileMonitorFlags")
(values
'("none" "G_FILE_MONITOR_NONE" "0")
- '("watch-mounts" "G_FILE_MONITOR_WATCH_MOUNTS" "1<<0")
+ '("watch-mounts" "G_FILE_MONITOR_WATCH_MOUNTS" "1 << 0")
)
)
-;; From /opt/gnome2/include/glib-2.0/gio/gfileinfo.h
-
(define-enum-extended FileType
(in-module "G")
(c-name "GFileType")
@@ -146,7 +138,15 @@
)
)
-;; From /opt/gnome2/include/glib-2.0/gio/gfilemonitor.h
+(define-enum-extended FilesystemPreviewType
+ (in-module "G")
+ (c-name "GFilesystemPreviewType")
+ (values
+ '("if-always" "G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS" "0")
+ '("if-local" "G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL" "1")
+ '("never" "G_FILESYSTEM_PREVIEW_TYPE_NEVER" "2")
+ )
+)
(define-enum-extended FileMonitorEvent
(in-module "G")
@@ -162,8 +162,6 @@
)
)
-;; From /opt/gnome2/include/glib-2.0/gio/gioerror.h
-
(define-enum-extended IOErrorEnum
(in-module "G")
(c-name "GIOErrorEnum")
@@ -202,17 +200,15 @@
)
)
-;; From /opt/gnome2/include/glib-2.0/gio/gmountoperation.h
-
(define-flags-extended AskPasswordFlags
(in-module "G")
(c-name "GAskPasswordFlags")
(values
- '("need-password" "G_ASK_PASSWORD_NEED_PASSWORD" "1<<0")
- '("need-username" "G_ASK_PASSWORD_NEED_USERNAME" "1<<1")
- '("need-domain" "G_ASK_PASSWORD_NEED_DOMAIN" "1<<2")
- '("saving-supported" "G_ASK_PASSWORD_SAVING_SUPPORTED" "1<<3")
- '("anonymous-supported" "G_ASK_PASSWORD_ANONYMOUS_SUPPORTED" "1<<4")
+ '("need-password" "G_ASK_PASSWORD_NEED_PASSWORD" "1 << 0")
+ '("need-username" "G_ASK_PASSWORD_NEED_USERNAME" "1 << 1")
+ '("need-domain" "G_ASK_PASSWORD_NEED_DOMAIN" "1 << 2")
+ '("saving-supported" "G_ASK_PASSWORD_SAVING_SUPPORTED" "1 << 3")
+ '("anonymous-supported" "G_ASK_PASSWORD_ANONYMOUS_SUPPORTED" "1 << 4")
)
)
@@ -236,8 +232,6 @@
)
)
-;; From /opt/gnome2/include/glib-2.0/gio/goutputstream.h
-
(define-flags-extended OutputStreamSpliceFlags
(in-module "G")
(c-name "GOutputStreamSpliceFlags")
Modified: trunk/gio/src/gio_methods.defs
==============================================================================
--- trunk/gio/src/gio_methods.defs (original)
+++ trunk/gio/src/gio_methods.defs Fri Jul 25 13:28:14 2008
@@ -1062,6 +1062,14 @@
)
)
+(define-function g_content_type_guess_for_tree
+ (c-name "g_content_type_guess_for_tree")
+ (return-type "char**")
+ (parameters
+ '("GFile*" "root")
+ )
+)
+
(define-function g_content_types_get_registered
(c-name "g_content_types_get_registered")
(return-type "GList*")
Modified: trunk/gio/src/gio_signals.defs
==============================================================================
--- trunk/gio/src/gio_signals.defs (original)
+++ trunk/gio/src/gio_signals.defs Fri Jul 25 13:28:14 2008
@@ -121,6 +121,15 @@
;; From GFileEnumerator
+(define-property container
+ (of-object "GFileEnumerator")
+ (prop-type "GParamObject")
+ (docs "The container that is being enumerated")
+ (readable #f)
+ (writable #t)
+ (construct-only #t)
+)
+
;; From GFileInfo
;; From GFileIcon
@@ -418,4 +427,13 @@
)
)
+(define-signal drive-eject-button
+ (of-object "GVolumeMonitor")
+ (return-type "void")
+ (when "last")
+ (parameters
+ '("GDrive*" "p0")
+ )
+)
+
Modified: trunk/gio/src/mount.hg
==============================================================================
--- trunk/gio/src/mount.hg (original)
+++ trunk/gio/src/mount.hg Fri Jul 25 13:28:14 2008
@@ -217,7 +217,7 @@
* @newin2p18
*/
void guess_content_type(bool force_rescan = true);
- _IGNORE(g_mount_eject)
+ _IGNORE(g_mount_guess_content_type)
#m4 _CONVERSION(`gchar**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]