On Thu, 2006-01-05 at 04:08, Ben Ford wrote: > ewl_test is still broken, but I was able to create a working notebook by > puzzling through the source. >
Ewl_Test is working fine here. Can you please send a backtrace or some indication of why it is broken as we aren't seeing any issues. (You have the latest versions of all the libs and don't have them duplicated on your system right? > Now I have a couple of other problems. If I add a notebook page to a > notebook, I can no longer cleanly shut down the program.[1] I'm > assuming that destroying the window is supposed to recurse down and > destroy children, since nothing else complains. How should I take care > of this problem? Is the notebook failing to destroy it's children? > This will need to be looked into as it appears it is doing something it shouldn't on shutdown. > The second problem is this. I'm creating a text widget: > > text2 = ewl_text_new(); > ewl_text_text_set(EWL_TEXT(text2),txt); > ewl_object_alignment_set(EWL_OBJECT(text2), EWL_FLAG_ALIGN_LEFT); > > /* none of these properties appear to set properly! */ > ewl_text_wrap_set(EWL_TEXT(text2), TRUE); > ewl_text_underline_color_set(EWL_TEXT(text2), 0, 0, 0, 255); > ewl_text_double_underline_color_set(EWL_TEXT(text2), 50, 50, 50, 255); > ewl_text_shadow_color_set(EWL_TEXT(text2), 128, 128, 128, 128); > ewl_text_outline_color_set(EWL_TEXT(text2), 200, 200, 200, 200); > ewl_text_strikethrough_color_set(EWL_TEXT(text2), 0, 0, 0, 255); > ewl_text_glow_color_set(EWL_TEXT(text2), 0, 255, 0, 128); > > ewl_container_child_append(EWL_CONTAINER(main_vbox), text2); > ewl_widget_show(text2); > > and many properties aren't being set. Am I doing something wrong? > The way the text widget works is that you can set several different attributes on the text. When you set the attribute they will apply to the text that comes _after_ you set the attribute. So, if you move your ewl_text_text_set to just before the ewl_container_child_append it should work as you expect it too. (Although I don't think wrap works correctly a the moment. Also, you've set the colours for the styles, but you never actually set the styles onto the text. You need to use something like: ewl_text_styles_set(EWL_TEXT(text2), EWL_TEXT_STYLE_UNDERLINE | EWL_TEXT_STYLE_STRIKETHROUGH); to turn on underline and strikethrough. If you want to set the text first then put formatting on later you can use the ewl_text_*_apply functions which will overlay the formatting onto the text. > And last, I needed to find the number of pages in a notebook, so I wrote > a patch to do so. Please review it. There is an easier way to do this. The notebook widget in Ewl is inherited from the Ewl_Box widget (You'll notice the first param in the notebook is an Ewl_Box box). Ewl_Box in turn inherits from Ewl_Container. So, using ewl_container_child_count_get() should return the number of pages. (And if it dosen't then I'd consider it a bug in Ewl and want to fix it as it might also include the tabs in that count which is incorrect.) Let me know if you run into any more issues. dan ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel