glibmm r575 - in trunk: . gio/src tools/extra_defs_gen
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r575 - in trunk: . gio/src tools/extra_defs_gen
- Date: Mon, 4 Feb 2008 00:46:32 +0000 (GMT)
Author: murrayc
Date: Mon Feb 4 00:46:32 2008
New Revision: 575
URL: http://svn.gnome.org/viewvc/glibmm?rev=575&view=rev
Log:
2008-02-04 Murray Cumming <murrayc murrayc com>
* tools/extra_defs_gen/generate_defs_gio.cc: Added types.
* gio/src/gio_signals.defs: Regenerated.
* gio/src/Makefile_list_of_hg.am_fragment:
* gio/src/filenamecompleter.hg:
* gio/src/themedicon.hg: Added FilenameCompleter and ThemedIcon.
Added:
trunk/gio/src/filenamecompleter.ccg
- copied unchanged from r573, /trunk/gio/src/filemonitor.ccg
trunk/gio/src/filenamecompleter.hg
- copied, changed from r573, /trunk/gio/src/filemonitor.hg
trunk/gio/src/themedicon.ccg
- copied unchanged from r573, /trunk/gio/src/fileicon.ccg
trunk/gio/src/themedicon.hg
- copied, changed from r573, /trunk/gio/src/fileicon.hg
Modified:
trunk/ChangeLog
trunk/gio/src/Makefile_list_of_hg.am_fragment
trunk/gio/src/gio_signals.defs
trunk/tools/extra_defs_gen/generate_defs_gio.cc
Modified: trunk/gio/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- trunk/gio/src/Makefile_list_of_hg.am_fragment (original)
+++ trunk/gio/src/Makefile_list_of_hg.am_fragment Mon Feb 4 00:46:32 2008
@@ -7,11 +7,11 @@
files_win32_hg =
files_general_hg = appinfo.hg asyncresult.hg cancellable.hg drive.hg error.hg file.hg fileattributeinfo.hg \
fileattributeinfolist.hg fileenumerator.hg fileicon.hg fileinfo.hg fileinputstream.hg fileoutputstream.hg \
- filemonitor.hg filterinputstream.hg filteroutputstream.hg \
+ filemonitor.hg filterinputstream.hg filteroutputstream.hg filenamecompleter.hg \
icon.hg inputstream.hg loadableicon.hg mount.hg mountoperation.hg outputstream.hg \
seekable.hg simpleasyncresult.hg volume.hg volumemonitor.hg bufferedinputstream.hg \
bufferedoutputstream.hg datainputstream.hg dataoutputstream.hg enums.hg \
- memoryinputstream.hg
+ memoryinputstream.hg themedicon.hg
include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment
Copied: trunk/gio/src/filenamecompleter.hg (from r573, /trunk/gio/src/filemonitor.hg)
==============================================================================
--- /trunk/gio/src/filemonitor.hg (original)
+++ trunk/gio/src/filenamecompleter.hg Mon Feb 4 00:46:32 2008
@@ -27,41 +27,27 @@
namespace Gio
{
-_WRAP_ENUM(FileMonitorEvent, GFileMonitorEvent, NO_GTYPE)
-
class File;
-/** Monitors a file or directory for changes.
- * To obtain a FileMonitor for a file or directory, use File::monitor_file() or
- * File::monitor_directory().
- *
- * To get informed about changes to the file or directory you are monitoring,
- * connect to signal_changed.
+/** Completes partial file and directory names given a partial string by looking in the file system for clues.
+ * Can return a list of possible completion strings for widget implementation.
*
* @newin2p16
*/
-class FileMonitor : public Glib::Object
+class FilenameCompleter : public Glib::Object
{
- _CLASS_GOBJECT(FileMonitor, GFileMonitor, G_FILE_MONITOR, Glib::Object, GObject)
+ _CLASS_GOBJECT(FilenameCompleter, GFilenameCompleter, G_FILENAME_COMPLETER, Glib::Object, GObject)
protected:
-
+ _CTOR_DEFAULT
+ _IGNORE(g_filename_completer_new)
public:
-
- _WRAP_METHOD(bool cancel(), g_file_monitor_cancel)
- _WRAP_METHOD(bool is_cancelled() const, g_file_monitor_is_cancelled)
- _WRAP_METHOD(void set_rate_limit(int limit_msecs), g_file_monitor_set_rate_limit)
-
- //g_file_monitor_emit_event is for implementations.
- _IGNORE(g_file_monitor_emit_event)
-
-#m4 _CONVERSION(`GFile*',`const Glib::RefPtr<File>&',`Glib::wrap($3, true)')
- _WRAP_SIGNAL(void changed(const Glib::RefPtr<File>& file, const Glib::RefPtr<File>& other_file, FileMonitorEvent event_type), "changed")
-
- //TODO: Write .defs for the vfunc:
- _WRAP_VFUNC(bool cancel(), cancel);
+ _WRAP_CREATE()
+
+ _WRAP_METHOD(std::string get_completion_suffix(const std::string& initial_text) const, g_filename_completer_get_completion_suffix)
+ _WRAP_METHOD(Glib::StringArrayHandle get_completions(const std::string& initial_text) const, g_filename_completer_get_completions)
+ _WRAP_METHOD(void set_dirs_only(bool dirs_only = true), g_filename_completer_set_dirs_only)
- _WRAP_PROPERTY("rate-limit", int)
- _WRAP_PROPERTY("cancelled", bool)
+ _WRAP_SIGNAL(void got_completion_data(), got_completion_data)
};
} // namespace Gio
Modified: trunk/gio/src/gio_signals.defs
==============================================================================
--- trunk/gio/src/gio_signals.defs (original)
+++ trunk/gio/src/gio_signals.defs Mon Feb 4 00:46:32 2008
@@ -156,6 +156,14 @@
(construct-only #f)
)
+;; From GFilenameCompleter
+
+(define-signal got-completion-data
+ (of-object "GFilenameCompleter")
+ (return-type "void")
+ (when "last")
+)
+
;; From GFileInputStream
;; From GFileOutputStream
@@ -283,6 +291,8 @@
;; From GSimpleAsyncResult
+;; From GThemedIcon
+
;; From GVolume
;; From GVolumeMonitor
Copied: trunk/gio/src/themedicon.hg (from r573, /trunk/gio/src/fileicon.hg)
==============================================================================
--- /trunk/gio/src/fileicon.hg (original)
+++ trunk/gio/src/themedicon.hg Mon Feb 4 00:46:32 2008
@@ -28,27 +28,35 @@
namespace Gio
{
-/** FileIcon specifies an icon by pointing to an image file to be used as icon.
+/** Icon theming support
+ * ThemedIcon is an implementation of Gio::Icon that supports icon themes.
+ * ThemedIcon contains a list of all of the icons present in an icon
+ * theme, so that icons can be looked up quickly. ThemedIcon does
+ * not provide actual pixmaps for icons, just the icon names.
+ * Ideally something like Gtk::IconTheme::choose_icon() should be used to
+ * resolve the list of names so that fallback icons work nicely with
+ * themes that inherit other themes.
*
* @newin2p16
*/
-class FileIcon
+class ThemedIcon
: public Glib::Object,
- public Icon,
- public LoadableIcon
+ public Icon
{
- _CLASS_GOBJECT(FileIcon, GFileIcon, G_FILE_ICON, Glib::Object, GObject)
+ _CLASS_GOBJECT(ThemedIcon, GThemedIcon, G_THEMED_ICON, Glib::Object, GObject)
_IMPLEMENTS_INTERFACE(Icon)
- _IMPLEMENTS_INTERFACE(LoadableIcon)
protected:
- _CTOR_DEFAULT()
+ _WRAP_CTOR(ThemedIcon(const std::string& iconname), g_themed_icon_new)
public:
- _WRAP_CREATE()
+ _WRAP_CREATE(const std::string& iconname)
+ //TODO: GIcon *g_themed_icon_new_with_default_fallbacks (const char *iconname);
+ //TODO: GIcon *g_themed_icon_new_from_names (char **iconnames, int len);
- _WRAP_METHOD(Glib::RefPtr<File> get_file(), g_file_icon_get_file, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const File> get_file() const, g_file_icon_get_file, refreturn, constversion)
+ //TODO: const char * const *g_themed_icon_get_names (GThemedIcon *icon);
+
+ //There are no signals or properties.
};
} // namespace Gio
Modified: trunk/tools/extra_defs_gen/generate_defs_gio.cc
==============================================================================
--- trunk/tools/extra_defs_gen/generate_defs_gio.cc (original)
+++ trunk/tools/extra_defs_gen/generate_defs_gio.cc Mon Feb 4 00:46:32 2008
@@ -37,6 +37,7 @@
<< get_defs(G_TYPE_FILE_INFO)
<< get_defs(G_TYPE_FILE_ICON)
<< get_defs(G_TYPE_FILE_MONITOR)
+ << get_defs(G_TYPE_FILENAME_COMPLETER)
// << get_defs(G_TYPE_FILE_ATTRIBUTE_INFO_LIST)
// << get_defs(G_TYPE_FILE_ATTRIBUTE_MATCHER)
<< get_defs(G_TYPE_FILE_INPUT_STREAM)
@@ -52,6 +53,7 @@
<< get_defs(G_TYPE_MOUNT_OPERATION)
<< get_defs(G_TYPE_SEEKABLE)
<< get_defs(G_TYPE_SIMPLE_ASYNC_RESULT)
+ << get_defs(G_TYPE_THEMED_ICON)
//TODO: This causes a g_warning:
//GLib-GObject-CRITICAL **: g_param_spec_pool_list: assertion `pool != NULL' failed"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]