beaver-devel
[Top][All Lists]
Advanced

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

Re: [Beaver-devel] interface.c


From: Tobias Heinzen
Subject: Re: [Beaver-devel] interface.c
Date: Mon, 18 Aug 2008 21:22:30 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

Double 12 wrote:
A while ago, I was looking at box.c and I thought it would be easier to understand if there was an else-case in for the return value. I wasn't actually planning to commit it, but I commited it accidentaly when I commited everything. ;)

I forgot that your mail was already old when I read it...so you already did most of the exams. Bit weird that you have exams at the end of the summer holiday, by the way.
Well I don't find it weird ^^ We've always got exams at the beginning of the semester (called semester end exams, who did thought) and at the end of the semester. You get used to this system.

Can you please help me with two cases in interface.c? The menu items for the doctabs and the scrollbar position only have one callback each. So Scrollbar Left/Right have the same callback. The scrollbar must be placed at a certain position depending on the value of the Action of that certain item. The callback functions must get the chosen Action supplied as argument. I got this done and it works, but the compiler warns about the fact that the callback hasn't got the right number of arguments and that the Action supplied is not really of the right kind. (see functions scrollbar_clicked and doctabs_clicked).
I think I fixed that today (got some spare time today and I was bored ^^). The problem is, that the argument was of the wrong type (it was GtkWidget* but it wanted GtkRadioButton* I think). What you have to do is to cast the button to the right type. GTK has some useful macros to do so (GTK_RADIO_BUTTON did the trick for these functions). I've commited the interface.c. I removed the tools-menu, since now theres a plugin that implements these plugins (as we discussed way back, I think when we did 0.3.0.1, that it would be best to put the tools into a plugin).
The second thing is that GTK gives a critical error during runtime: gtk_container_foreach: assertion `GTK_IS_CONTAINER (container)' failed This has something to do with the toolbar and all the boxes it is in. The weird thing is that if I add the commented line //init_toolbar (GTK_BOX(VBox)); again, the problem is solved, but that adds an extra toolbar that we don't want. I tried to examine that function a while ago, but I didn't find the cause.
I'm refactoring search.c at the moment, but I will definetively see about that in the future. It looks like there's some wrong argument, probably something like the above. But I don't know yet.

I have a question that maybe scares you, but what would you think of making a version of Beaver using the FLTK toolkit somewhere in the future? We will have to wait with that, because we first have to benefit from all the new features we add now (otherwise our efforts are wasted). The benefits of FLTK are that it's very fast and light, as Beaver should be (that's our selling point ^^) and that we can finally use an object-oriented language (C++; you can do really cool inheritance things in FLTK). The drawbacks are that most of the source code has to be rewritten (small drawback :P) and that FLTK has less built-in functions for doing several tasks. But that last drawback is the reason why FLTK is fast & light, and GTK is not. Think about it.
Well I don't know FLTK. We will have to rewrite the project probably if we want to use it, so it's definetively somwhere in the future. I will look at it, as I said I never heard of FLTK.

Greets
Tobias





reply via email to

[Prev in Thread] Current Thread [Next in Thread]