On Mon, Jul 27, 2009 at 8:58 PM, Gerald Britton<gerald.britton@xxxxxxxxx> wrote: > Sure, but dups are OK in a glade file as long as the widgets are unique > within toplevels. (at least I think so and glade-3 seems to support the > notion.) So that can't be the error. What is a secondary? If I knew that > I'd know better where to look. GtkBuilder was added to GTK+ and support added to Glade, all around the same time, all with only a few people involved - duplicate widget ids in libglade are supported withing toplevels, technically they can be supported by GtkBuilder if used in specific ways (i.e. by cherry picking the toplevels you want to build in a way the names wont conflict), but currently lacks support for that. So, if Glade transmits the notion to the user that GtkBuilder supports duplicate widget ids, sorry - its the notion I had when I implemented that code, I wouldnt be surprised if GTK+ eventually handles duplicate ids more gracefully. I dont have the time at the moment to look it up, but if the Glade file uses the widget name somehow to lookup the button name which should be secondary (I dont seem to recall it being implemented this way, but it is for dialog response widgets for instance); then duplicate widget ids could/would cause a warning similar to the one you have. Cheers, -Tristan Note, about the project preferences dialog; it comes up when you open a new project; if you startup Glade without specifying a glade file on the command line, then Glade will start up and create a new project for you instead of leaving you with an empty insensitive interface. The solution when somebody steps up to write the code could be to add a "dont show this dialog when creating new projects" checkbox and ideally add a general user preferences dialog where the default project creation options can be accessed. > > On Mon, Jul 27, 2009 at 4:54 PM, Jean Bréfort <jean.brefort@xxxxxxxxxxxxxx> > wrote: >> >> Look for ok, cancel, help and close buttons. Here are the dups. >> >> Le lundi 27 juillet 2009 à 16:33 -0400, Gerald Britton a écrit : >> > So far I've been ok with unique names within toplevels. Too bad the >> > python bindings don't support add_object_from_file yet. I could have >> > used that. Just have these annoying warnings! >> > >> > OK. Got 3.6.7. Still has that prompt on startup for preferences I >> > see. I really think that should not popup unless you start a new >> > glade file. Anyway, I opened and resaved my glade file. Only diff >> > was removal of a few iconsize properties. Still get warning when >> > starting up. >> > >> > This is an odd warning though. It's not about duplicate widgets, but: >> > >> > GtkWarning: gtk_button_box_set_child_secondary: assertion >> > `child->parent == GTK_WIDGET (widget)' failed >> > >> > Now, if I could just find which child widget it's complaining about! >> > Actually I'm not 100% sure how to interpret the message. My glade >> > file has nothing called "secondary" in it that I can see. >> > >> > On Mon, Jul 27, 2009 at 4:22 PM, Tristan Van Berkom<tvb@xxxxxxxxx> >> > wrote: >> > > On Mon, Jul 27, 2009 at 4:00 PM, Gerald >> > > Britton<gerald.britton@xxxxxxxxx> wrote: >> > >> The glade file is set to "Object names are unique within toplevels" >> > >> which fits the way my glade file is set up. Maybe I should get a >> > >> fresh copy of glade-3. I'm at Glade 3.6.3 >> > >> >> > > >> > > Yes get 3.6.7, but; if you use widget names that are unique within >> > > toplevels, you have to be careful of how you use that with GtkBuilder, >> > > dont feed it the entire Glade file at once; instead specify which ones >> > > you want to build - I think the policy right now for GtkBuilder is >> > > unique names throughout the builder instance - so you may also >> > > want to be carefull to use separate GtkBuilder instances to build >> > > separate parts of your project. >> > > >> > > Note: if you have a widget naming glitch with Glade 3.6.3, then >> > > toggle the policy property in the preferences, this will actually >> > > modify the project (it creates an undo item) and fix any duplicate >> > > names if found (you shouldnt have any such glitches with 3.6.7 >> > > though). >> > > >> > > Cheers, >> > > -Tristan >> > > >> > >> On Mon, Jul 27, 2009 at 12:49 PM, Tristan Van Berkom<tvb@xxxxxxxxx> >> > >> wrote: >> > >>> Oops I seemed to have replied to the middle of this thread. >> > >>> >> > >>> If its an issue with the widget id uniqueness, then you can >> > >>> go in Glade's project preferences and toggle the naming policy >> > >>> setting (and please use a recent build of Glade to make sure >> > >>> the policy works correctly, it had some bugs earlier this year). >> > >>> >> > >>> Cheers, >> > >>> -Tristan >> > >>> >> > >>> On Mon, Jul 27, 2009 at 12:44 PM, Tristan Van Berkom<tvb@xxxxxxxxx> >> > >>> wrote: >> > >>>> On Fri, Jun 26, 2009 at 9:11 AM, Gerald >> > >>>> Britton<gerald.britton@xxxxxxxxx> wrote: >> > >>>> [...] >> > >>>>> 1. when and why is the method gtk_button_box_set_child_secondary >> > >>>>> called by the add_from_file method? >> > >>>> >> > >>>> The fastest and easiest way to find out whats going on is to follow >> > >>>> Paul's advice and simply run it once in gdb with a breakpoint on >> > >>>> g_log. >> > >>>> >> > >>>> Thats what I would do to pinpoint exactly whats going on. >> > >>>> (it could be a malformed Glade file and maybe a bug in Glade, >> > >>>> it could also mean a bug in GTK+ parsing GtkButtonBox's). >> > >>>> >> > >>>>> 3. Can the text of the error message be changed to include the >> > >>>>> name of >> > >>>>> the widget that has the problem, if available? >> > >>>> >> > >>>> Yes, you should ask the GTK+ team to do that by filing a bug >> > >>>> against >> > >>>> gtk+:GtkBuilder, those messages can trigger without GtkBuilder >> > >>>> parsing >> > >>>> the UI but in that case gtk_buildable_get_name() will still return >> > >>>> the >> > >>>> widget's class name by default. >> > >>>> >> > >>>> Cheers, >> > >>>> -Tristan >> > >>>> >> > >>> >> > >> >> > >> >> > >> >> > >> -- >> > >> Gerald Britton >> > >> _______________________________________________ >> > >> Glade-users maillist - Glade-users@xxxxxxxxxxxxxxxx >> > >> http://lists.ximian.com/mailman/listinfo/glade-users >> > >> >> > > >> > >> > >> > >> > > > > -- > Gerald Britton > > _______________________________________________ > Glade-users maillist - Glade-users@xxxxxxxxxxxxxxxx > http://lists.ximian.com/mailman/listinfo/glade-users > > _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list