Hello,
I commited a trivial patch to tclock to disable the tooltip entry if
the check is disabled. While hacking around I did a mistake before that
could reproducible freeze E17 or X. I'm not sure how to find out.
See here the wrong patch:
Index: e_mod_config.c
===================================================================
RCS file: /cvs/e/e_modules/tclock/e_mod_config.c,v
retrieving revision 1.36
diff -u -u -r1.36 e_mod_config.c
--- e_mod_config.c 26 Dec 2007 01:18:56 -0000 1.36
+++ e_mod_config.c 24 Jan 2008 17:54:38 -0000
@@ -20,6 +20,7 @@
E_Config_Dialog_Data * cfdata);
static void _cb_time_check (void *data, Evas_Object * obj);
static void _cb_date_check (void *data, Evas_Object * obj);
+static void _cb_tooltip_check (void *data, Evas_Object * obj);
void
_config_tclock_module (Config_Item * ci)
@@ -84,7 +85,9 @@
_basic_create_widgets (E_Config_Dialog * cfd, Evas * evas,
E_Config_Dialog_Data * cfdata)
{
Evas_Object *o, *of, *ob;
- Evas_Object *time_entry, *time_check, *date_entry, *date_check;
+ Evas_Object *time_entry, *time_check;
+ Evas_Object *date_entry, *date_check;
+ Evas_Object *tooltip_entry, *tooltip_check;
o = e_widget_list_add (evas, 0, 0);
@@ -117,10 +120,13 @@
e_widget_list_object_append (o, of, 1, 1, 0.5);
of = e_widget_frametable_add (evas, D_ ("Tool Tip"), 1);
- ob = e_widget_check_add (evas, D_ ("Show Tooltip"), &(cfdata->show_tip));
- e_widget_frametable_object_append (of, ob, 0, 0, 1, 1, 1, 0, 1, 0);
- ob = e_widget_entry_add (evas, &cfdata->tip_format, NULL, NULL, NULL);
- e_widget_min_size_set (ob, 150, 1);
+ tooltip_check =
+ e_widget_check_add (evas, D_ ("Show Tooltip"), &(cfdata->show_tip));
+ e_widget_frametable_object_append (of, tooltip_check, 0, 0, 1, 1, 1, 0, 1,
0);
+ tooltip_entry = e_widget_entry_add (evas, &cfdata->tip_format, NULL, NULL,
NULL);
+ e_widget_on_change_hook_set (tooltip_check, _cb_date_check, tooltip_entry);
+ // disabled
+ e_widget_min_size_set (tooltip_entry, 150, 1);
e_widget_frametable_object_append (of, ob, 0, 1, 1, 1, 1, 0, 1, 0);
^
---------
This line above was a mistake by me. It should be:
e_widget_frametable_object_append (of, tooltip_entry, 0, 1, 1, 1, 1, 0, 1, 0);
---------
ob =
e_widget_label_add (evas, D_ ("Consult strftime(3) for format syntax"));
@@ -166,6 +172,15 @@
static void
_cb_date_check (void *data, Evas_Object *obj)
+{
+ int checked;
+
+ checked = e_widget_check_checked_get (obj);
+ e_widget_disabled_set (data, !checked);
+}
+
+static void
+_cb_tooltip_check (void *data, Evas_Object *obj)
{
int checked;
The result was that the line "see strftime(3)..." was printed two times below
the
check instead of the entry. Ok, I noticed the mistake and corrected it later
before
commiting. But the really strange thing was that after pressing on the "close"
button
E17 or X was frozen. The button did come up from the pressed position. If I
remember
correct even the mouse cursor was frozen. But not sure here. I should reproduce
it if
needed.
Any ideas what's the problem here? Is this a expected behaviour by such a
programming
mistake?
regards
Andreas
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel