[glibmm] Fix error messages from gmmproc



commit 2e8b0e638187bdb651eb3468ab9051fa8ad7567a
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Fri Feb 20 18:31:40 2015 +0100

    Fix error messages from gmmproc
    
    * gio/src/gio_extra_objects.defs: Add NetworkMonitor, Notification and
    Resource.
    * gio/src/file.hg:
    * gio/src/fileinputstream.hg:
    * gio/src/fileoutputstream.hg:
    * gio/src/notification.hg:
    * glib/src/iochannel.hg:
    * glib/src/nodetree.hg: Avoid "gtkmmproc error" messages in the generated
    files by not _IGNORE()ing non-existent functions. Unnecessary _IGNORE()s
    generate error messages after the fix in bug 737212 was implemented.

 gio/src/file.hg                |    4 +---
 gio/src/fileinputstream.hg     |   11 -----------
 gio/src/fileoutputstream.hg    |   16 ----------------
 gio/src/gio_extra_objects.defs |   18 ++++++++++++++++++
 gio/src/notification.hg        |    2 +-
 glib/src/iochannel.hg          |    1 -
 glib/src/nodetree.hg           |   19 +++++++++++--------
 7 files changed, 31 insertions(+), 40 deletions(-)
---
diff --git a/gio/src/file.hg b/gio/src/file.hg
index 08e4ce8..9dffa9f 100644
--- a/gio/src/file.hg
+++ b/gio/src/file.hg
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2007 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -1472,7 +1470,7 @@ public:
    * @param flags Flags affecting the operation.
    */
   void mount_enclosing_volume(MountMountFlags flags = MOUNT_MOUNT_NONE);
-  _IGNORE(g_file_mount_enclosing _volume)
+  _IGNORE(g_file_mount_enclosing_volume)
 
   _WRAP_METHOD(bool mount_enclosing_volume_finish(const Glib::RefPtr<AsyncResult>& result),
                g_file_mount_enclosing_volume_finish,
diff --git a/gio/src/fileinputstream.hg b/gio/src/fileinputstream.hg
index 476e391..a9cca15 100644
--- a/gio/src/fileinputstream.hg
+++ b/gio/src/fileinputstream.hg
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2007 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -102,15 +100,6 @@ public:
   _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info_finish(const Glib::RefPtr<AsyncResult>& result),
                g_file_input_stream_query_info_finish,
                errthrow)
-
-  //These seem to be just C convenience functions - they are already in the Seekable base class:
-  //See http://bugzilla.gnome.org/show_bug.cgi?id=509990
-  _IGNORE(g_file_input_stream_tell, g_file_input_stream_can_seek, g_file_input_stream_seek)
-//  _WRAP_METHOD(goffset tell() const, g_file_input_stream_tell)
-//  _WRAP_METHOD(bool can_seek() const, g_file_input_stream_can_seek)
-//  _WRAP_METHOD(bool seek(goffset offset, Glib::SeekType type, const Glib::RefPtr<Cancellable>& 
cancellable),
-//               g_file_input_stream_seek,
-//               errthrow)
 };
 
 } // namespace Gio
diff --git a/gio/src/fileoutputstream.hg b/gio/src/fileoutputstream.hg
index 4b24272..a31567b 100644
--- a/gio/src/fileoutputstream.hg
+++ b/gio/src/fileoutputstream.hg
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2007 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -138,20 +136,6 @@ public:
                refreturn, errthrow)
 
   _WRAP_METHOD(std::string get_etag() const, g_file_output_stream_get_etag)
-
-  //These seem to be just C convenience functions - they are already in the Seekable base class:
-  //See http://bugzilla.gnome.org/show_bug.cgi?id=509990
-  _IGNORE(g_file_output_stream_tell, g_file_output_stream_can_seek, g_file_output_stream_seek,
-          g_file_output_stream_can_truncate, g_file_output_stream_truncate)
-//  _WRAP_METHOD(goffset tell() const, g_file_output_stream_tell)
-//  _WRAP_METHOD(bool can_seek() const, g_file_output_stream_can_seek)
-//  _WRAP_METHOD(bool seek(goffset offset, Glib::SeekType type, const Glib::RefPtr<Cancellable>& 
cancellable),
-//               g_file_output_stream_seek,
-//               errthrow)
-//  _WRAP_METHOD(bool can_truncate() const, g_file_output_stream_can_truncate)
-//  _WRAP_METHOD(bool truncate(goffset size, const Glib::RefPtr<Cancellable>& cancellable),
-//               g_file_output_stream_truncate,
-//               errthrow)
 };
 
 } // namespace Gio
diff --git a/gio/src/gio_extra_objects.defs b/gio/src/gio_extra_objects.defs
index acfab9a..a47e231 100644
--- a/gio/src/gio_extra_objects.defs
+++ b/gio/src/gio_extra_objects.defs
@@ -151,6 +151,18 @@
   (gtype-id "G_TYPE_MENU_ITEM")
 )
 
+(define-object NetworkMonitor
+  (in-module "Gio")
+  (c-name "GNetworkMonitor")
+  (gtype-id "G_TYPE_NETWORK_MONITOR")
+)
+
+(define-object Notification
+  (in-module "Gio")
+  (c-name "GNotification")
+  (gtype-id "G_TYPE_NOTIFICATION")
+)
+
 (define-object PollableInputStream
   (in-module "Gio")
   (c-name "GPollableInputStream")
@@ -175,6 +187,12 @@
   (gtype-id "G_TYPE_PROXY_RESOLVER")
 )
 
+(define-object Resource
+  (in-module "Gio")
+  (c-name "GResource")
+  (gtype-id "G_TYPE_RESOURCE")
+)
+
 (define-object SimpleAction
   (in-module "Gio")
   (c-name "GSimpleAction")
diff --git a/gio/src/notification.hg b/gio/src/notification.hg
index 46be430..f936192 100644
--- a/gio/src/notification.hg
+++ b/gio/src/notification.hg
@@ -117,7 +117,7 @@ public:
   // Ignore functions with variable-length parameter lists.
   _IGNORE(g_notification_add_button_with_target, g_notification_set_default_action_and_target)
   // Ignore private methods
-  _IGNORE(g_notification_get_urgent, g_notification_get_button, g_notification_get_default_action)
+  _IGNORE(g_notification_get_priority, g_notification_get_button, g_notification_get_default_action)
   _IGNORE(g_notification_get_n_buttons, g_notification_get_button_with_action, g_notification_serialize)
   _IGNORE(g_notification_get_icon, g_notification_get_id, g_notification_get_body, g_notification_get_title)
 
diff --git a/glib/src/iochannel.hg b/glib/src/iochannel.hg
index bc0f404..3c3d530 100644
--- a/glib/src/iochannel.hg
+++ b/glib/src/iochannel.hg
@@ -413,7 +413,6 @@ public:
    * @return An IOSource object that can be polled from a MainContext's event loop.
    */
   Glib::RefPtr<IOSource> create_watch(IOCondition condition);
-  _IGNORE(g_io_channel_create_watch)
 
   virtual void reference()   const;
   virtual void unreference() const;
diff --git a/glib/src/nodetree.hg b/glib/src/nodetree.hg
index 5a4a4b7..2866057 100644
--- a/glib/src/nodetree.hg
+++ b/glib/src/nodetree.hg
@@ -185,7 +185,10 @@ public:
     g_node_append(gobj(), node.gobj());
     return node;
   }
-  _IGNORE(g_node_append)
+  dnl// Some glib functions are in fact preprocessor macros.
+  dnl// h2def.py does not recognize them. _IGNORE()ing them produces
+  dnl// ugly error messages in the generated nodetree.h file.
+  dnl// _IGNORE(g_node_append)
 
   /** Inserts a NodeTree as the first child.
    *
@@ -212,7 +215,7 @@ public:
     insert(position, *node);
     return node;
   }
-  _IGNORE(g_node_insert_data)
+  dnl// _IGNORE(g_node_insert_data)
 
   /** Inserts a new NodeTree before the given sibling.
    *
@@ -226,7 +229,7 @@ public:
     insert_before(sibling, *node);
     return node;
   }
-  _IGNORE(g_node_insert_data_before)
+  dnl// _IGNORE(g_node_insert_data_before)
 
   /** Inserts a new NodeTree as the last child.
    *
@@ -239,7 +242,7 @@ public:
     append(*node);
     return node;
   }
-  _IGNORE(g_node_append_data)
+  dnl// _IGNORE(g_node_append_data)
 
   /** Inserts a new NodeTree as the first child.
    *
@@ -252,7 +255,7 @@ public:
     prepend(*node);
     return node;
   }
-  _IGNORE(g_node_prepend_data)
+  dnl// _IGNORE(g_node_prepend_data)
 
   /** Reverses the order of the children.
    */
@@ -441,7 +444,7 @@ public:
   {
     return const_cast<NodeTree<T>*>(this)->first_child();
   }
-  _IGNORE(g_node_first_child)
+  dnl// _IGNORE(g_node_first_child)
 
   /** Gets the last child.
    *
@@ -515,7 +518,7 @@ public:
   {
     return const_cast<NodeTree<T>*>(this)->prev_sibling();
   }
-  _IGNORE(g_node_prev_sibling)
+  dnl// _IGNORE(g_node_prev_sibling)
 
   /** Gets the next sibling
    *
@@ -534,7 +537,7 @@ public:
   {
     return const_cast<NodeTree<T>*>(this)->next_sibling();
   }
-  _IGNORE(g_node_next_sibling)
+  dnl// _IGNORE(g_node_next_sibling)
 
   /** Gets the last sibling.
    *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]