[gtkmm] Gtk::CssProvider: Simplify the load_from_data method. Simplify the load_from_data method by removing
- From: Fabien Parent <fparent src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::CssProvider: Simplify the load_from_data method. Simplify the load_from_data method by removing
- Date: Tue, 22 Feb 2011 22:15:05 +0000 (UTC)
commit 2e989fa7fe078157f1c9486dee6363f412a048b1
Author: Fabien Parent <parent f gmail com>
Date: Tue Feb 22 23:14:38 2011 +0100
Gtk::CssProvider: Simplify the load_from_data method.
Simplify the load_from_data method by removing the useless size parameter.
ChangeLog | 7 +++++++
gtk/src/cssprovider.ccg | 15 +++++++++++++++
gtk/src/cssprovider.hg | 4 ++--
3 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1d0b9d4..6b68746 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-22 Fabien Parent <parent f gmail com>
+
+ Gtk::CssProvider: Simplify the load_from_data method.
+
+ * gtk/src/cssprovider.[hg|ccg]: Simplify the load_from_data method by
+ removing the useless size parameter.
+
2011-02-22 Murray Cumming <murrayc murrayc-desktop>
Gdk::Rectangle: Added reference documentation.
diff --git a/gtk/src/cssprovider.ccg b/gtk/src/cssprovider.ccg
index 735bc9d..af606bb 100644
--- a/gtk/src/cssprovider.ccg
+++ b/gtk/src/cssprovider.ccg
@@ -16,3 +16,18 @@
*/
#include <gtk/gtk.h>
+
+namespace Gtk
+{
+
+bool CssProvider::load_from_data(const std::string& data)
+{
+ GError* gerror = 0;
+ bool retvalue = gtk_css_provider_load_from_data(gobj(), data.c_str(), -1, &(gerror));
+ if(gerror)
+ Glib::Error::throw_exception(gerror);
+
+ return retvalue;
+}
+
+} /* namespace Gtk */
diff --git a/gtk/src/cssprovider.hg b/gtk/src/cssprovider.hg
index 169d898..10f51a3 100644
--- a/gtk/src/cssprovider.hg
+++ b/gtk/src/cssprovider.hg
@@ -36,12 +36,12 @@ class CssProvider
_IMPLEMENTS_INTERFACE(StyleProvider)
protected:
_CTOR_DEFAULT()
- _IGNORE(gtk_css_provider_new)
+ _IGNORE(gtk_css_provider_new, gtk_css_provider_load_from_data)
public:
_WRAP_CREATE()
- _WRAP_METHOD(bool load_from_data(const std::string& data, gssize length), gtk_css_provider_load_from_data, errthrow)
+ bool load_from_data(const std::string& data);
_WRAP_METHOD(bool load_from_file(const Glib::RefPtr<const Gio::File>& file), gtk_css_provider_load_from_file, errthrow)
_WRAP_METHOD(bool load_from_path(const std::string& path), gtk_css_provider_load_from_path, errthrow)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]