Thanks a lot, Let me try it.

I am still wondering why the popup(caret) menu works and standard menubar
doesn't.

btw, i figured out why tool buttons don't have icons, this is one of two
main issues to implement standard toolbar. Once i get the menubar disappear
issue fixed, the other issue will fixed too.


~ yu

--
No one will come, Yu has to make it happen by Yu-self.


2013/1/19 Carlos López González <[email protected]>

> Looking to the message text it seems that you cannot attach a widget
> already attached a second time.
> Then the solution would be one of those two:
> 1) Create a menu bar widget inside the canvas view class and attach that
> widget to the table.
> 2) Attach the menu bar at the toolbox (one time only) and update it every
> time a canvas view instance is focused.
> The correct way would be the second one for a simple window interface but
> it would be more complex. I think the first one is easier at this moment
> and the second solution can be addressed later.
> Notice that you cannot focus two canvas view simultaneously so the second
> solution is the correct one, I think.
>
> To do the solution 1 you need to add a Gtk:: MenuBar member to the
> CanvasView class constructed from the menu structure.
>
> I hope it helps.
> Carlos
> El 18/01/2013 20:48, "Carlos López González" <[email protected]>
> escribió:
>
> Hi Yu!
>>
>>
>>
>> 2013/1/18 Yu Chen <[email protected]>
>>
>>> Hi Carlos,
>>>
>>> Hope you are getting better.
>>>
>>> I just pushed initial code[1] for implementation of standard menubar for
>>> canvas window:
>>>
>>> 1) add a gtkmm standard menubar for canvas window,
>>> 2) cleanup the code for further development
>>> 3) add stock icons for some menu item
>>>
>>>
>>> The curent questions need your help:
>>>
>>> 1) when new canvas instant created, the menu lost with a message:
>>>     (synfigstudio:6046): Gtk-CRITICAL **: IA__gtk_table_attach:
>>> assertion `child->parent == NULL' failed
>>>
>> Apart of that message :
>> (synfigstudio:44990): Gtk-CRITICAL **: void gtk_table_attach(GtkTable *,
>> GtkWidget *, guint, guint, guint, guint, GtkAttachOptions,
>> GtkAttachOptions, guint, guint): assertion `child->parent == NULL' failed
>>
>> I also have other warning when close the instance that has menu:
>> (synfigstudio:44990): Gtk-CRITICAL **: void
>> gtk_ui_manager_remove_action_group(GtkUIManager *, GtkActionGroup *):
>> assertion `g_list_find (self->private_data->action_groups, action_group) !=
>> NULL' failed
>>
>> And also, when close the document that doesn't have the menu I have lots
>> of:
>> (synfigstudio:44990): Gtk-CRITICAL **: void
>> gtk_container_remove(GtkContainer *, GtkWidget *): assertion
>> `GTK_IS_CONTAINER (container)' failed
>>
>> (synfigstudio:44990): Gtk-CRITICAL **: void
>> gtk_container_foreach(GtkContainer *, GtkCallback, gpointer): assertion
>> `GTK_IS_CONTAINER (container)' failed
>>
>> I'm researching about it.
>>
>>
>>
>>> 2) I found the actions are staying in two source files, app.cpp and
>>> canvasview.cpp. In canvasview.cpp, there is a function named init_menus(),
>>> in it, there are a lot of menu actions defined, my question is should we
>>> move these definitions into app.cpp?
>>>
>>>
>>> Just take your time, at the same time, I am still digging the code. ^__^
>>>
>>> [1] https://github.com/jcome/synfig/commits/menubar_toolbar
>>>
>>>
>>> Cheers!
>>>
>>> ~ yu
>>>
>>> --
>>> No one will come, Yu has to make it happen by Yu-self.
>>>
>>
>>
>>
>> --
>> Carlos
>> http://synfig.org
>>
>
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to