gtkmm r1012 - in trunk: . gtk/src
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkmm r1012 - in trunk: . gtk/src
- Date: Wed, 23 Jul 2008 11:16:30 +0000 (UTC)
Author: murrayc
Date: Wed Jul 23 11:16:29 2008
New Revision: 1012
URL: http://svn.gnome.org/viewvc/gtkmm?rev=1012&view=rev
Log:
Increased version
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/configure.in
trunk/gtk/src/builder.ccg
trunk/gtk/src/builder.hg
trunk/gtk/src/cellrenderercombo.ccg
trunk/gtk/src/cellrenderercombo.hg
trunk/gtk/src/gtk_methods.defs
trunk/gtk/src/menu.hg
trunk/gtk/src/printer.hg
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Jul 23 11:16:29 2008
@@ -1,3 +1,15 @@
+2.13.5 (unstable):
+
+Gtk:
+* FileChooser: get_preview_widget(): Avoid an endless loop.
+ Bug #543288 (Jens Georg)
+
+Build:
+* pangomm is now in its own tarball.
+* MSVC_Net2003 project files: Mention new source files
+ for builder, scalebutton, tooltip, and volumebutton.
+ Bug #543294.
+
2.13.4 (unstable):
Gtk:
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Wed Jul 23 11:16:29 2008
@@ -15,7 +15,7 @@
#We use pushdef here because we can't use shell variables before AC_INIT, but we want to use a variable with AC_INIT:
pushdef([GTKMM_MAJOR_VERSION], [2])
pushdef([GTKMM_MINOR_VERSION], [13])
-pushdef([GTKMM_MICRO_VERSION], [4])
+pushdef([GTKMM_MICRO_VERSION], [5])
pushdef([GTKMM_EXTRA_VERSION], [])
pushdef([GTKMM_VERSION], GTKMM_MAJOR_VERSION.GTKMM_MINOR_VERSION.GTKMM_MICRO_VERSION[]GTKMM_EXTRA_VERSION)
AC_INIT([gtkmm], GTKMM_VERSION, [gtkmm-list gnome org])
@@ -201,7 +201,7 @@
gtkmm_min_giomm_version=2.16.0
gtkmm_min_gtk_version=2.13.4
gtkmm_min_cairomm_version=1.2.2
-gtkmm_min_pangomm_version=2.13.1
+gtkmm_min_pangomm_version=2.13.5
GLIBMM_LIBDIR=`pkg-config --variable=libdir glibmm-2.4`
Modified: trunk/gtk/src/builder.ccg
==============================================================================
--- trunk/gtk/src/builder.ccg (original)
+++ trunk/gtk/src/builder.ccg Wed Jul 23 11:16:29 2008
@@ -57,6 +57,26 @@
}
//static
+Glib::RefPtr<Builder> Builder::create_from_file(const std::string& filename, const Glib::ustring& object_id)
+{
+ Glib::RefPtr<Builder> builder = Builder::create();
+ if(builder->add_from_file(filename, object_id))
+ return builder;
+ else
+ return Glib::RefPtr<Builder>();
+}
+
+//static
+Glib::RefPtr<Builder> Builder::create_from_file(const std::string& filename, const Glib::StringArrayHandle& object_ids)
+{
+ Glib::RefPtr<Builder> builder = Builder::create();
+ if(builder->add_from_file(filename, object_ids))
+ return builder;
+ else
+ return Glib::RefPtr<Builder>();
+}
+
+//static
Glib::RefPtr<Builder> Builder::create_from_string(const Glib::ustring& buffer)
{
Glib::RefPtr<Builder> builder = Builder::create();
@@ -66,6 +86,42 @@
return Glib::RefPtr<Builder>();
}
+//static
+Glib::RefPtr<Builder> Builder::create_from_string(const Glib::ustring& buffer, const Glib::ustring& object_id)
+{
+ Glib::RefPtr<Builder> builder = Builder::create();
+ if(builder->add_from_string(buffer, object_id))
+ return builder;
+ else
+ return Glib::RefPtr<Builder>();
+}
+
+//static
+Glib::RefPtr<Builder> Builder::create_from_string(const Glib::ustring& buffer, const Glib::StringArrayHandle& object_ids)
+{
+ Glib::RefPtr<Builder> builder = Builder::create();
+ if(builder->add_from_string(buffer, object_ids))
+ return builder;
+ else
+ return Glib::RefPtr<Builder>();
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+bool Builder::add_from_file(const std::string& filename, const Glib::ustring& object_id)
+#else
+bool Builder::add_from_file(const std::string& filename, const Glib::ustring& object_id, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ std::list<Glib::ustring> object_ids;
+ object_ids.push_back(object_id);
+
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ return add_from_file(filename, object_ids);
+ #else
+ return add_from_file(filename, object_ids, error);
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+}
+
#ifdef GLIBMM_EXCEPTIONS_ENABLED
bool Builder::add_from_string(const Glib::ustring& buffer)
@@ -86,6 +142,41 @@
return retvalue;
}
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+bool Builder::add_from_string(const Glib::ustring& buffer, const Glib::ustring& object_id)
+#else
+bool Builder::add_from_string(const Glib::ustring& buffer, const Glib::ustring& object_id, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ std::list<Glib::ustring> object_ids;
+ object_ids.push_back(object_id);
+
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ return add_from_string(buffer, object_ids);
+ #else
+ return add_from_string(buffer, object_ids, error);
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+bool Builder::add_from_string(const Glib::ustring& buffer, const Glib::StringArrayHandle& object_ids)
+#else
+bool Builder::add_from_string(const Glib::ustring& buffer, const Glib::StringArrayHandle& object_ids, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ GError* gerror = 0;
+ bool retvalue = gtk_builder_add_objects_from_string(gobj(), buffer.c_str(), -1 /* means null-terminated */, const_cast<char**>(object_ids.data()), &(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
+
+ return retvalue;
+}
+
GtkWidget* Builder::get_cwidget(const Glib::ustring& name)
{
GObject *cobject = gtk_builder_get_object (gobj(), name.c_str());
Modified: trunk/gtk/src/builder.hg
==============================================================================
--- trunk/gtk/src/builder.hg (original)
+++ trunk/gtk/src/builder.hg Wed Jul 23 11:16:29 2008
@@ -62,10 +62,43 @@
**/
static Glib::RefPtr<Builder> create_from_file(const std::string& filename);
+ /** Parses a file containing a GtkBuilder UI definition, building only the requested object.
+ *
+ * If you are adding an object that depends on an object that is not
+ * its child (for instance a GtkTreeView that depends on its
+ * GtkTreeModel), you have to explicitely list all of them.
+ *
+ * @param filename the name of the file to parse.
+ * @param object_id The object to build.
+ * @result A new Builder object, or a null pointer if an error occurred.
+ * @throws Glib::FileError, Glib::MarkupError
+ *
+ * @newin2p14
+ **/
+ static Glib::RefPtr<Builder> create_from_file(const std::string& filename, const Glib::ustring& object_id);
+
+ /** Parses a file containing a GtkBuilder UI definition, building only the requested objects.
+ *
+ * If you are adding an object that depends on an object that is not
+ * its child (for instance a GtkTreeView that depends on its
+ * GtkTreeModel), you have to explicitely list all of them.
+ *
+ * @param filename the name of the file to parse.
+ * @param object_ids The objects to build.
+ * @result A new Builder object, or a null pointer if an error occurred.
+ * @throws Glib::FileError, Glib::MarkupError
+ *
+ * @newin2p14
+ **/
+ static Glib::RefPtr<Builder> create_from_file(const std::string& filename, const Glib::StringArrayHandle& object_ids);
+ _IGNORE(gtk_builder_add_objects_from_file)
+
+
+
/** Parses a string containing a GtkBuilder UI definition.
*
- * @buffer: the string to parse
+ * @param buffer: the string to parse
* @result A new Builder object, or a null pointer if an error occurred.
* @throws Glib::MarkupError
*
@@ -73,12 +106,64 @@
**/
static Glib::RefPtr<Builder> create_from_string(const Glib::ustring& buffer);
+ /** Parses a string containing a GtkBuilder UI definition building only the requested object.
+ *
+ * @param buffer The string to parse.
+ * @param object_id The object to build.
+ * @result A new Builder object, or a null pointer if an error occurred.
+ * @throws Glib::MarkupError
+ *
+ * @newin2p14
+ **/
+ static Glib::RefPtr<Builder> create_from_string(const Glib::ustring& buffer, const Glib::ustring& object_id);
+
+ /** Parses a string containing a GtkBuilder UI definition building only the requested objects.
+ *
+ * If you are adding an object that depends on an object that is not
+ * its child (for instance a GtkTreeView that depends on its
+ * GtkTreeModel), you have to explicitely list all of them.
+ *
+ * @param buffer the string to parse
+ * @param object_ids The objects to build.
+ * @result A new Builder object, or a null pointer if an error occurred.
+ * @throws Glib::MarkupError
+ *
+ * @newin2p14
+ **/
+ static Glib::RefPtr<Builder> create_from_string(const Glib::ustring& buffer, const Glib::StringArrayHandle& object_ids);
+ _IGNORE(gtk_builder_add_objects_from_file)
+
+
_WRAP_METHOD(bool add_from_file(const std::string& filename), gtk_builder_add_from_file, errthrow)
+ /** Parses a file containing a GtkBuilder UI definition,
+ * building only the requested object,
+ * and merges it with the current contents of the builder.
+ *
+ * If you are adding an object that depends on an object that is not
+ * its child (for instance a GtkTreeView that depends on its
+ * GtkTreeModel), you have to explicitely list all of them.
+ *
+ * @param buffer The file to parse.
+ * @param The object to build.
+ * @result true on success or false if an error occurred.
+ * @throws Glib::MarkupError
+ *
+ * @newin2p14
+ **/
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ bool add_from_file(const std::string& filename, const Glib::ustring& object_id);
+ #else
+ bool add_from_file(const std::string& filename, const Glib::ustring& object_id, std::auto_ptr<Glib::Error>& error);
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+
+#m4 _CONVERSION(`const Glib::StringArrayHandle&',`gchar**',`const_cast<char**>(($3).data())')
+ _WRAP_METHOD(bool add_from_file(const std::string& filename, const Glib::StringArrayHandle& object_ids), gtk_builder_add_objects_from_file, errthrow)
+
/** Parses a string containing a GtkBuilder UI definition
* and merges it with the current contents of the builder.
*
- * @buffer: the string to parse
+ * @param buffer The string to parse.
* @result true on success or false if an error occurred.
* @throws Glib::MarkupError
*
@@ -90,6 +175,41 @@
bool add_from_string(const Glib::ustring& buffer, std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
+ /** Parses a string containing a GtkBuilder UI definition,
+ * building only the requested object,
+ * and merges it with the current contents of the builder.
+ *
+ * @param buffer The string to parse.
+ * @param The object to build.
+ * @result true on success or false if an error occurred.
+ * @throws Glib::MarkupError
+ *
+ * @newin2p14
+ **/
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ bool add_from_string(const Glib::ustring& buffer, const Glib::ustring& object_id);
+ #else
+ bool add_from_string(const Glib::ustring& buffer, const Glib::ustring& object_id, std::auto_ptr<Glib::Error>& error);
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+
+ /** Parses a string containing a GtkBuilder UI definition,
+ * building only the requested objects,
+ * and merges it with the current contents of the builder.
+ *
+ * @param buffer The string to parse.
+ * @param The objects to build.
+ * @result true on success or false if an error occurred.
+ * @throws Glib::MarkupError
+ *
+ * @newin2p14
+ **/
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ bool add_from_string(const Glib::ustring& buffer, const Glib::StringArrayHandle& object_ids);
+ #else
+ bool add_from_string(const Glib::ustring& buffer, const Glib::StringArrayHandle& object_ids, std::auto_ptr<Glib::Error>& error);
+ #endif //GLIBMM_EXCEPTIONS_ENABLED
+ _IGNORE(gtk_builder_add_objects_from_string)
+
_WRAP_METHOD(bool add_from_string(const char* buffer, gsize length), gtk_builder_add_from_string, errthrow)
//TODO: Custom-implement this and prevent it from being used with GTK_WIDGET-derived types?
Modified: trunk/gtk/src/cellrenderercombo.ccg
==============================================================================
--- trunk/gtk/src/cellrenderercombo.ccg (original)
+++ trunk/gtk/src/cellrenderercombo.ccg Wed Jul 23 11:16:29 2008
@@ -21,6 +21,18 @@
*/
#include <gtk/gtkcellrenderercombo.h>
+#include <gtk/gtktreeview.h>
+
+///This is used only by signal_changed's generated implementation.
+static GtkTreeModel* _get_model(GtkCellRendererCombo* renderer)
+{
+ if(!renderer)
+ return 0;
+
+ GtkTreeModel* combo_model = 0;
+ g_object_get(G_OBJECT(renderer), "model", &combo_model, NULL);
+ return combo_model;
+}
namespace Gtk
{
Modified: trunk/gtk/src/cellrenderercombo.hg
==============================================================================
--- trunk/gtk/src/cellrenderercombo.hg (original)
+++ trunk/gtk/src/cellrenderercombo.hg Wed Jul 23 11:16:29 2008
@@ -47,9 +47,15 @@
_CTOR_DEFAULT
- //TODO: Handle creation of the iter, providing the model. murrayc.
+#m4begin
+dnl // We need this special conversion here since the C++ Gtk::TreeIter carries
+dnl // a pointer to the Gtk::TreeModel, whereas the plain GtkTreeIter struct does
+dnl // not.
+ _CONVERSION(`GtkTreeIter*',`const TreeModel::iterator&',`TreeModel::iterator(_get_model(self), $3)')
+#m4end
+
#m4 _CONVERSION(`const gchar*',`const Glib::ustring&',__GCHARP_TO_USTRING)
- //_WRAP_SIGNAL(void changed(const Glib::ustring& path, const Gtk::TreeModel::iterator& iter), "changed", no_default_handler)
+ _WRAP_SIGNAL(void changed(const Glib::ustring& path, const TreeModel::iterator& iter), "changed", no_default_handler)
_WRAP_PROPERTY("model", Glib::RefPtr<Gtk::TreeModel>)
_WRAP_PROPERTY("text_column", int)
Modified: trunk/gtk/src/gtk_methods.defs
==============================================================================
--- trunk/gtk/src/gtk_methods.defs (original)
+++ trunk/gtk/src/gtk_methods.defs Wed Jul 23 11:16:29 2008
@@ -4905,6 +4905,29 @@
)
)
+(define-method add_objects_from_file
+ (of-object "GtkBuilder")
+ (c-name "gtk_builder_add_objects_from_file")
+ (return-type "guint")
+ (parameters
+ '("const-gchar*" "filename")
+ '("gchar**" "object_ids")
+ '("GError**" "error")
+ )
+)
+
+(define-method add_objects_from_string
+ (of-object "GtkBuilder")
+ (c-name "gtk_builder_add_objects_from_string")
+ (return-type "guint")
+ (parameters
+ '("const-gchar*" "buffer")
+ '("gsize" "length")
+ '("gchar**" "object_ids")
+ '("GError**" "error")
+ )
+)
+
(define-method get_object
(of-object "GtkBuilder")
(c-name "gtk_builder_get_object")
@@ -17055,6 +17078,24 @@
)
)
+(define-method set_is_paused
+ (of-object "GtkPrinter")
+ (c-name "gtk_printer_set_is_paused")
+ (return-type "gboolean")
+ (parameters
+ '("gboolean" "val")
+ )
+)
+
+(define-method set_is_accepting_jobs
+ (of-object "GtkPrinter")
+ (c-name "gtk_printer_set_is_accepting_jobs")
+ (return-type "gboolean")
+ (parameters
+ '("gboolean" "val")
+ )
+)
+
(define-method set_has_details
(of-object "GtkPrinter")
(c-name "gtk_printer_set_has_details")
@@ -17118,15 +17159,6 @@
)
)
-(define-method set_is_active
- (of-object "GtkPrinter")
- (c-name "gtk_printer_set_is_active")
- (return-type "none")
- (parameters
- '("gboolean" "active")
- )
-)
-
;; From gtkprintcontext.h
@@ -17274,6 +17306,18 @@
(return-type "gboolean")
)
+(define-method is_paused
+ (of-object "GtkPrinter")
+ (c-name "gtk_printer_is_paused")
+ (return-type "gboolean")
+)
+
+(define-method is_accepting_jobs
+ (of-object "GtkPrinter")
+ (c-name "gtk_printer_is_accepting_jobs")
+ (return-type "gboolean")
+)
+
(define-method is_virtual
(of-object "GtkPrinter")
(c-name "gtk_printer_is_virtual")
Modified: trunk/gtk/src/menu.hg
==============================================================================
--- trunk/gtk/src/menu.hg (original)
+++ trunk/gtk/src/menu.hg Wed Jul 23 11:16:29 2008
@@ -127,15 +127,6 @@
_WRAP_PROPERTY("tearoff-title", Glib::ustring)
_WRAP_PROPERTY("tearoff-state", bool)
_WRAP_PROPERTY("monitor", int)
- _WRAP_PROPERTY("vertical-padding", int)
- _WRAP_PROPERTY("horizontal-padding", int)
- _WRAP_PROPERTY("vertical-offset", int)
- _WRAP_PROPERTY("horizontal-offset", int)
- _WRAP_PROPERTY("double-arrows", bool)
- _WRAP_PROPERTY("left-attach", int)
- _WRAP_PROPERTY("right-attach", int)
- _WRAP_PROPERTY("top-attach", int)
- _WRAP_PROPERTY("bottom-attach", int)
protected:
Modified: trunk/gtk/src/printer.hg
==============================================================================
--- trunk/gtk/src/printer.hg (original)
+++ trunk/gtk/src/printer.hg Wed Jul 23 11:16:29 2008
@@ -44,7 +44,8 @@
public:
//TODO: _WRAP_CREATE() - probably not, it's only accessible through PrintUnixDialog + GtkPrintBackend should be ignored
//TODO: I think these are not needed as well, and that Printer should generally be read-only - marko.
- _IGNORE(gtk_printer_is_new, gtk_printer_set_state_message, gtk_printer_set_is_default)
+ _IGNORE(gtk_printer_is_new, gtk_printer_set_state_message, gtk_printer_set_is_default,
+ gtk_printer_set_is_accepting_jobs, gtk_printer_set_is_paused)
_IGNORE(gtk_printer_set_is_active, gtk_printer_set_has_details, gtk_printer_set_description)
_IGNORE(gtk_printer_set_icon_name, gtk_printer_set_job_count, gtk_printer_set_is_new, gtk_printer_set_location)
@@ -62,6 +63,8 @@
_WRAP_METHOD(Glib::ustring get_icon_name() const, gtk_printer_get_icon_name)
_WRAP_METHOD(int get_job_count() const, gtk_printer_get_job_count)
_WRAP_METHOD(bool is_active() const, gtk_printer_is_active)
+ _WRAP_METHOD(bool is_paused() const, gtk_printer_is_paused)
+ _WRAP_METHOD(bool is_accepting_jobs() const, gtk_printer_is_accepting_jobs)
_WRAP_METHOD(bool is_virtual() const, gtk_printer_is_virtual)
_WRAP_METHOD(bool is_default() const, gtk_printer_is_default)
_WRAP_METHOD(bool accepts_pdf() const, gtk_printer_accepts_pdf)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]