beaver-devel
[Top][All Lists]
Advanced

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

[Beaver-devel] interface.c


From: Double 12
Subject: [Beaver-devel] interface.c
Date: Mon, 18 Aug 2008 21:12:14 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

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.

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). 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 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.

Double 12

Double 12 wrote:
Well, I'm back! You did some nice work on the Plugin system; this is a strong basis for a further popularity growth of Beaver.
Welcome back ^^

Can you tell me what's the difference between (for example) beaver_text_find_impl and beaver_text_find?
Well in essence beaver_text_find is just a pointer (actually a function pointer). beaver_text_find_impl is the implementation (hence the impl at the end :-)) of this. The function pointer is pointing to this implementation. The cool thing about this architecture is, that we can change the implementation (for example find a better search algorithm) and automatically all plugins use the new implementation, without having to recompile the plugins.

I hope I can do some good work when you're spending time on your exams.
Then hurry, got the last exams this week ^^
Until now, I haven't really written new code, I have just fixed things in Beaver, probably because of my lack of programming experience. But I can just get more experience when I write some new things. Maybe you have some good ideas?
Well there are many possibilities now that the plugin system is there ^^ A cool diff utility would be nice. Don't think that it should be hard.
At least I can fix the interface with all the functions that need to be linked to the GtkUiManager menu items.
I saw that you added an else case in box.c (in the function beaver_box_question_impl). Were there any errors before? I didn't think that the else case was necessary.

Greets
Tobias

------------------------------------------------------------------------

_______________________________________________
Beaver-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/beaver-devel




reply via email to

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