Re: [gtkmm] Actions / UIManager and OO programming style
- From: murrayc murrayc com
- To: "Christer Palm" <palm nogui se>
- Cc: Murray Cumming <murrayc murrayc com>, gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Actions / UIManager and OO programming style
- Date: Wed, 30 Jun 2004 19:21:03 -0700 (PDT)
> Murray Cumming wrote:
>> On Wed, 2004-06-30 at 02:52 +0200, Christer Palm wrote:
>>>
>>>OK - I've been playing around trying to derive from Gtk::Action using
>>>the Action(const Glib::ConstructParams& construct_params) constructor,
>>
>>
>> No, that's not something that you should try to use - it's only for
>> internal use.
>>
>
> There are two protected constructors for Gtk::Action (at least in gtkmm
> 2.4.3 which is what I have):
>
> explicit Action(const Glib::ConstructParams& construct_params);
> explicit Action(GtkAction* castitem);
I see the problem now. It's quite a simple error that I will fix in the
next gtkmm release. We usually prefer not to fix API in the stable series,
to avoid confusion, but this seems simple and worth fixing, and it should
not actually affect many people. Please try the attached patch.
? gtkmm_access.patch
Index: gtk/src/action.hg
===================================================================
RCS file: /cvs/gnome/gtkmm/gtk/src/action.hg,v
retrieving revision 1.13
diff -u -p -r1.13 action.hg
--- gtk/src/action.hg 8 Apr 2004 17:49:29 -0000 1.13
+++ gtk/src/action.hg 1 Jul 2004 02:17:40 -0000
@@ -34,9 +34,11 @@ class Image;
class Action : public Glib::Object
{
+protected:
_CLASS_GOBJECT(Action, GtkAction, GTK_ACTION, Glib::Object, GObject)
_CTOR_DEFAULT
explicit Action(const Glib::ustring& name, const StockID& stock_id, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring());
+
public:
_WRAP_CREATE()
static Glib::RefPtr<Action> create(const Glib::ustring& name, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring());
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]