Enlightenment CVS committal Author : davemds Project : e17 Module : proto/edje_editor
Dir : e17/proto/edje_editor/src/bin Modified Files: callbacks.c callbacks.h interface.c interface.h main.h Log Message: * some bug fixed * change some entry functionality (less aggressive realtime) =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/callbacks.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- callbacks.c 20 Feb 2008 19:31:38 -0000 1.57 +++ callbacks.c 22 Feb 2008 02:36:40 -0000 1.58 @@ -347,25 +347,106 @@ /* Group frame callbacks */ Etk_Bool -on_GroupNameEntry_text_changed(Etk_Object *object, void *data) +on_GroupNameEntry_key_down(Etk_Object *object, Etk_Event_Key_Down *event, void *data) { - //printf("Text Changed Signal on PartNameEntry EMITTED (text: %s)\n",etk_entry_text_get(ETK_ENTRY(object))); + printf("PRESSED %s\n", event->keyname); + + if (!strcmp(event->keyname, "Return")) + on_GroupNameEntryImage_mouse_clicked( + ETK_OBJECT(ETK_ENTRY(object)->secondary_image), + NULL); + return ETK_TRUE; +} +Etk_Bool +on_GroupNameEntryImage_mouse_clicked(Etk_Object *object, void *data) +{ const char *name; - name = etk_entry_text_get(ETK_ENTRY(object)); - edje_edit_group_name_set(edje_o, name); + printf("Mouse Click Signal on GroupNameEntryImage Emitted\n"); + + name = etk_entry_text_get(ETK_ENTRY(UI_GroupNameEntry)); + + if (!name || !etk_string_length_get(Cur.group)) return ETK_TRUE; + + if (!strcmp(name, Cur.group->string)) + { + etk_widget_hide(ETK_WIDGET(UI_GroupNameEntryImage)); + return ETK_TRUE; + } + + if (!edje_edit_group_name_set(edje_o, name)) + { + ShowAlert("Can't rename group.<br>Another group with this name exist?"); + return ETK_TRUE; + } //Update Group Combobox Etk_Combobox_Item *item; item = etk_combobox_active_item_get(ETK_COMBOBOX(UI_GroupsComboBox)); - etk_signal_block("item-activated",ETK_OBJECT(UI_GroupsComboBox), on_GroupsComboBox_activated, NULL); + etk_signal_block("item-activated",ETK_OBJECT(UI_GroupsComboBox), + on_GroupsComboBox_activated, NULL); etk_combobox_item_fields_set(item, name); - etk_signal_unblock("item-activated",ETK_OBJECT(UI_GroupsComboBox), on_GroupsComboBox_activated, NULL); + etk_signal_unblock("item-activated",ETK_OBJECT(UI_GroupsComboBox), + on_GroupsComboBox_activated, NULL); //Update FakeWin title edje_object_part_text_set(EV_fakewin, "title", name); + + /* Hide the entry image */ + etk_widget_hide(ETK_WIDGET(UI_GroupNameEntryImage)); + + + //~ /* change the name in edje */ + //~ if (!edje_edit_part_name_set(edje_o, Cur.part->string, name)) + //~ { + //~ ShowAlert("Can't set part name.<br>Another name with this name exist? "); + //~ return ETK_TRUE; + //~ } + + //~ /* Set new Current name */ + //~ Cur.part = etk_string_set(Cur.part, name); + + //~ //Update PartTree + //~ row = etk_tree_selected_row_get(ETK_TREE(UI_PartsTree)); + + //~ switch (edje_edit_part_type_get(edje_o, Cur.part->string)) + //~ { + //~ case EDJE_PART_TYPE_IMAGE: + //~ etk_tree_row_fields_set(row,TRUE, + //~ COL_NAME, EdjeFile, "IMAGE.PNG", name, NULL); + //~ break; + //~ case EDJE_PART_TYPE_RECTANGLE: + //~ etk_tree_row_fields_set(row,TRUE, + //~ COL_NAME, EdjeFile, "RECT.PNG", name, NULL); + //~ break; + //~ case EDJE_PART_TYPE_TEXT: + //~ etk_tree_row_fields_set(row,TRUE, + //~ COL_NAME, EdjeFile, "TEXT.PNG", name, NULL); + //~ break; + //~ default: + //~ etk_tree_row_fields_set(row,TRUE, + //~ COL_NAME, EdjeFile, "NONE.PNG", name, NULL); + //~ break; + //~ } + + //~ /* Update hidden colon on every child */ + //~ child = etk_tree_row_first_child_get(row); + //~ etk_tree_row_fields_set(child, TRUE, COL_PARENT, name, NULL); + //~ while ((child = etk_tree_row_next_get(child))) + //~ etk_tree_row_fields_set(child, TRUE, COL_PARENT, name, NULL); + + //~ /* Update Parts_Hash */ + //~ Parts_Hash = evas_hash_del(Parts_Hash, Cur.part->string, NULL); + //~ Parts_Hash = evas_hash_add(Parts_Hash, name, row); + + //~ /* Recreate rel combobox */ + //~ PopulateRelComboBoxes(); //TODO do a focus-out callback for this (don't need to do on every key!!) + + //~ /* Hide the image */ + //~ etk_widget_hide(ETK_WIDGET(UI_PartNameEntryImage)); + return ETK_TRUE; } @@ -398,66 +479,89 @@ /* Parts & Descriptions Callbacks*/ Etk_Bool -on_PartNameEntry_text_changed(Etk_Object *object, void *data) +on_PartNameEntry_key_down(Etk_Object *object, Etk_Event_Key_Down *event, void *data) { + printf("PRESSED %s\n", event->keyname); + + if (!strcmp(event->keyname, "Return")) + on_PartNameEntryImage_mouse_clicked( + ETK_OBJECT(ETK_ENTRY(object)->secondary_image), + NULL); + return ETK_TRUE; +} + +Etk_Bool +on_PartNameEntryImage_mouse_clicked(Etk_Object *object, void *data) +{ + const char *name; Etk_Tree_Row *row; - const char *text; - //printf("Text Changed Signal on PartNameEntry EMITTED (text: %s)\n",etk_entry_text_get(ETK_ENTRY(object))); - if (etk_string_length_get(Cur.part)) + Etk_Tree_Row *child; + + printf("Mouse Click Signal on PartNameEntryImage Emitted\n"); + + name = etk_entry_text_get(ETK_ENTRY(UI_PartNameEntry)); + + if (!name || !etk_string_length_get(Cur.part)) return ETK_TRUE; + + if (!strcmp(name, Cur.part->string)) { - //Update PartTree - row = etk_tree_selected_row_get(ETK_TREE(UI_PartsTree)); - text = etk_entry_text_get(ETK_ENTRY(object)); - - printf("** TYPE: %d\n", edje_edit_part_type_get(edje_o, Cur.part->string)); - switch (edje_edit_part_type_get(edje_o, Cur.part->string)) - { - case EDJE_PART_TYPE_IMAGE: - etk_tree_row_fields_set(row,TRUE, - COL_NAME, EdjeFile, "IMAGE.PNG", text, - NULL); - break; - case EDJE_PART_TYPE_RECTANGLE: - etk_tree_row_fields_set(row,TRUE, - COL_NAME, EdjeFile, "RECT.PNG", text, - NULL); - break; - case EDJE_PART_TYPE_TEXT: - etk_tree_row_fields_set(row,TRUE, - COL_NAME, EdjeFile, "TEXT.PNG", text, - NULL); - break; - default: - etk_tree_row_fields_set(row,TRUE, - COL_NAME, EdjeFile, "NONE.PNG", text, - NULL); - break; - } - - /* Update hidden colon on every child */ - Etk_Tree_Row *child; - child = etk_tree_row_first_child_get(row); - etk_tree_row_fields_set(child, TRUE, COL_PARENT, text, NULL); - while ((child = etk_tree_row_next_get(child))) - etk_tree_row_fields_set(child, TRUE, COL_PARENT, text, NULL); - - /* Update Parts_Hash */ - Parts_Hash = evas_hash_del(Parts_Hash, Cur.part->string, NULL); - Parts_Hash = evas_hash_add(Parts_Hash, text, row); - - /* change the name in edje */ - edje_edit_part_name_set(edje_o, Cur.part->string, text); - - /* Set new Current name */ - Cur.part = etk_string_set(Cur.part, text); - - /* Recreate rel combobox */ - PopulateRelComboBoxes(); //TODO do a focus-out callback for this (don't need to do on every key!!) + etk_widget_hide(ETK_WIDGET(UI_PartNameEntryImage)); + return ETK_TRUE; } + + /* change the name in edje */ + if (!edje_edit_part_name_set(edje_o, Cur.part->string, name)) + { + ShowAlert("Can't set part name.<br>Another name with this name exist? "); + return ETK_TRUE; + } + + /* Set new Current name */ + Cur.part = etk_string_set(Cur.part, name); + + //Update PartTree + row = etk_tree_selected_row_get(ETK_TREE(UI_PartsTree)); + + switch (edje_edit_part_type_get(edje_o, Cur.part->string)) + { + case EDJE_PART_TYPE_IMAGE: + etk_tree_row_fields_set(row,TRUE, + COL_NAME, EdjeFile, "IMAGE.PNG", name, NULL); + break; + case EDJE_PART_TYPE_RECTANGLE: + etk_tree_row_fields_set(row,TRUE, + COL_NAME, EdjeFile, "RECT.PNG", name, NULL); + break; + case EDJE_PART_TYPE_TEXT: + etk_tree_row_fields_set(row,TRUE, + COL_NAME, EdjeFile, "TEXT.PNG", name, NULL); + break; + default: + etk_tree_row_fields_set(row,TRUE, + COL_NAME, EdjeFile, "NONE.PNG", name, NULL); + break; + } + + /* Update hidden colon on every child */ + child = etk_tree_row_first_child_get(row); + etk_tree_row_fields_set(child, TRUE, COL_PARENT, name, NULL); + while ((child = etk_tree_row_next_get(child))) + etk_tree_row_fields_set(child, TRUE, COL_PARENT, name, NULL); + + /* Update Parts_Hash */ + Parts_Hash = evas_hash_del(Parts_Hash, Cur.part->string, NULL); + Parts_Hash = evas_hash_add(Parts_Hash, name, row); + + /* Recreate rel combobox */ + PopulateRelComboBoxes(); //TODO do a focus-out callback for this (don't need to do on every key!!) + + /* Hide the image */ + etk_widget_hide(ETK_WIDGET(UI_PartNameEntryImage)); + + return ETK_TRUE; } - Etk_Bool on_CliptoComboBox_item_activated(Etk_Combobox *combobox, Etk_Combobox_Item *item, void *data) { @@ -499,47 +603,66 @@ } Etk_Bool -on_StateEntry_text_changed(Etk_Object *object, void *data) +on_StateEntry_key_down(Etk_Object *object, Etk_Event_Key_Down *event, void *data) { - const char *nn; //new name - printf("Text Changed Signal on StateEntry EMITTED\n"); + printf("PRESSED %s\n", event->keyname); + if (!strcmp("default 0.00", Cur.state->string)) + { + ShowAlert("You can't rename default 0.0"); + return ETK_TRUE; + } + + if (!strcmp(event->keyname, "Return")) + on_StateEntryImage_mouse_clicked( + ETK_OBJECT(ETK_ENTRY(object)->secondary_image), + NULL); + return ETK_TRUE; +} - if (etk_string_length_get(Cur.state)) +Etk_Bool +on_StateEntryImage_mouse_clicked(Etk_Object *object, void *data) +{ + const char *name; + + printf("Mouse Click Signal on StateEntryImage Emitted\n"); + + name = etk_entry_text_get(ETK_ENTRY(UI_StateEntry)); + + if (!name || !etk_string_length_get(Cur.state)) return ETK_TRUE; + + if (!strcmp(name, Cur.state->string)) + { + etk_widget_hide(ETK_WIDGET(UI_StateEntryImage)); + return ETK_TRUE; + } + + /* Change state name */ + if (strcmp("default 0.00", Cur.state->string)) { - if (strcmp("default 0.00", Cur.state->string)) + if (edje_edit_state_name_set(edje_o, Cur.part->string, Cur.state->string, name)) { - nn = etk_entry_text_get(ETK_ENTRY(object)); - if (edje_edit_state_name_set(edje_o, Cur.part->string, Cur.state->string, nn)) - { - /* update tree */ - Etk_Tree_Row *row; - row = etk_tree_selected_row_get(ETK_TREE(UI_PartsTree)); - etk_tree_row_fields_set(row,TRUE, - COL_NAME, EdjeFile, "DESC.PNG", nn, - NULL); - /* update Cur */ - Cur.state = etk_string_set(Cur.state, nn); - - } - else - { - ShowAlert("<b>Wrong name format</b><br>Name must be in the form:<br>\"default 0.00\""); - } + /* update tree */ + Etk_Tree_Row *row; + row = etk_tree_selected_row_get(ETK_TREE(UI_PartsTree)); + etk_tree_row_fields_set(row,TRUE, + COL_NAME, EdjeFile, "DESC.PNG", name, + NULL); + /* update Cur */ + Cur.state = etk_string_set(Cur.state, name); + /* Hide the entry image */ + etk_widget_hide(ETK_WIDGET(UI_StateEntryImage)); } else - { - ShowAlert("You can't rename default 0.0"); - etk_signal_block("text-changed",ETK_OBJECT(object), - on_StateEntry_text_changed, NULL); - etk_entry_text_set(ETK_ENTRY(object), Cur.state->string); - etk_signal_unblock("text-changed",ETK_OBJECT(object), - on_StateEntry_text_changed, NULL); - } + ShowAlert("<b>Wrong name format</b><br>Name must be in the form:<br>\"default 0.00\""); } - + else + ShowAlert("You can't rename default 0.0"); + return ETK_TRUE; } + + Etk_Bool on_AspectSpinner_value_changed(Etk_Range *range, double value, void *data) { @@ -933,17 +1056,37 @@ return ETK_TRUE; } + Etk_Bool -on_ProgramEntry_text_changed(Etk_Object *object, void *data) +on_ProgramEntry_key_down(Etk_Object *object, Etk_Event_Key_Down *event, void *data) { - const char *name; + printf("PRESSED %s\n", event->keyname); + + if (!strcmp(event->keyname, "Return")) + on_ProgramEntryImage_mouse_clicked( + ETK_OBJECT(ETK_ENTRY(object)->secondary_image), + NULL); + return ETK_TRUE; +} - //printf("Text Changed Signal on ProgramEntry Emitted\n"); +Etk_Bool +on_ProgramEntryImage_mouse_clicked(Etk_Object *object, void *data) +{ + const char *name; - if (!etk_string_length_get(Cur.prog)) return ETK_TRUE; + printf("Mouse Click Signal on ProgramEntryImage Emitted\n"); name = etk_entry_text_get(ETK_ENTRY(UI_ProgramEntry)); + if (!name || !etk_string_length_get(Cur.prog)) return ETK_TRUE; + + if (!strcmp(name, Cur.prog->string)) + { + etk_widget_hide(ETK_WIDGET(UI_ProgramEntryImage)); + return ETK_TRUE; + } + + if (edje_edit_program_name_set(edje_o, Cur.prog->string, name)) { /* update tree */ @@ -954,7 +1097,12 @@ NULL); /* update Cur */ Cur.prog = etk_string_set(Cur.prog, name); + + /* Hide the image */ + etk_widget_hide(ETK_WIDGET(UI_ProgramEntryImage)); } + else + ShowAlert("Can't rename program.<br>Another program with this name just exist?"); return ETK_TRUE; } @@ -1111,7 +1259,8 @@ on_DurationSpinner_value_changed(Etk_Range *range, double value, void *data) { printf("value Changed Signal on DurationSpinner Emitted\n"); - edje_edit_program_transition_time_set(edje_o, Cur.prog->string, + if (etk_string_length_get(Cur.prog)) + edje_edit_program_transition_time_set(edje_o, Cur.prog->string, etk_range_value_get(ETK_RANGE(UI_DurationSpinner))); return ETK_TRUE; @@ -1636,5 +1785,13 @@ on_AlertDialog_response(Etk_Dialog *dialog, int response_id, void *data) { etk_widget_hide(ETK_WIDGET(dialog)); + return ETK_TRUE; +} + +Etk_Bool +on_NamesEntry_text_changed(Etk_Object *object, void *data) +{ + //printf("Text Changed Signal on one of the Names Entry Emitted\n"); + etk_widget_show(ETK_WIDGET(ETK_ENTRY(object)->secondary_image)); return ETK_TRUE; } =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/callbacks.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- callbacks.h 18 Feb 2008 20:38:40 -0000 1.23 +++ callbacks.h 22 Feb 2008 02:36:40 -0000 1.24 @@ -12,11 +12,13 @@ Etk_Bool on_PartsTree_row_selected (Etk_Object *object, Etk_Tree_Row *row, void *data); void on_ColorCanvas_click (void *data, Evas *e, Evas_Object *obj, void *event_info); Etk_Bool on_ColorDialog_change (Etk_Object *object, void *data); -Etk_Bool on_PartNameEntry_text_changed (Etk_Object *object, void *data); +Etk_Bool on_PartNameEntryImage_mouse_clicked(Etk_Object *object, void *data); +Etk_Bool on_PartNameEntry_key_down (Etk_Object *object, Etk_Event_Key_Down *event, void *data); Etk_Bool on_CliptoComboBox_item_activated (Etk_Combobox *combobox, Etk_Combobox_Item *item, void *data); Etk_Bool on_PartEventsCheck_toggled (Etk_Object *object, void *data); Etk_Bool on_PartEventsRepeatCheck_toggled (Etk_Object *object, void *data); -Etk_Bool on_StateEntry_text_changed (Etk_Object *object, void *data); +Etk_Bool on_StateEntry_key_down (Etk_Object *object, Etk_Event_Key_Down *event, void *data); +Etk_Bool on_StateEntryImage_mouse_clicked (Etk_Object *object, void *data); Etk_Bool on_AllButton_click (Etk_Button *button, void *data); Etk_Bool on_AddMenu_item_activated (Etk_Object *object, void *data); Etk_Bool on_RemoveMenu_item_activated (Etk_Object *object, void *data); @@ -38,12 +40,15 @@ Etk_Bool on_ImageTweenList_row_selected (Etk_Object *object, Etk_Tree_Row *row, void *data); Etk_Bool on_EffectComboBox_changed (Etk_Combobox *combobox, void *data); Etk_Bool on_AlertDialog_response (Etk_Dialog *dialog, int response_id, void *data); -Etk_Bool on_GroupNameEntry_text_changed (Etk_Object *object, void *data); +Etk_Bool on_GroupNameEntryImage_mouse_clicked(Etk_Object *object, void *data); +Etk_Bool on_GroupNameEntry_key_down (Etk_Object *object, Etk_Event_Key_Down *event, void *data); Etk_Bool on_AspectSpinner_value_changed (Etk_Range *range, double value, void *data); Etk_Bool on_AspectComboBox_changed (Etk_Combobox *combobox, void *data); Etk_Bool on_StateMinMaxSpinner_value_changed(Etk_Range *range, double value, void *data); Etk_Bool on_ActionComboBox_changed (Etk_Combobox *combobox, void *data); -Etk_Bool on_ProgramEntry_text_changed (Etk_Object *object, void *data); +Etk_Bool on_NamesEntry_text_changed (Etk_Object *object, void *data); +Etk_Bool on_ProgramEntryImage_mouse_clicked(Etk_Object *object, void *data); +Etk_Bool on_ProgramEntry_key_down (Etk_Object *object, Etk_Event_Key_Down *event, void *data); Etk_Bool on_SourceEntry_text_changed (Etk_Object *object, void *data); Etk_Bool on_SourceEntry_item_changed (Etk_Combobox_Entry *combo, void *data); Etk_Bool on_SignalEntry_text_changed (Etk_Object *object, void *data); =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/interface.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -3 -r1.62 -r1.63 --- interface.c 20 Feb 2008 19:31:38 -0000 1.62 +++ interface.c 22 Feb 2008 02:36:40 -0000 1.63 @@ -500,26 +500,30 @@ UpdateGroupFrame(void) { //Stop signal propagation - etk_signal_block("text-changed",ETK_OBJECT(UI_GroupNameEntry), on_GroupNameEntry_text_changed, NULL); + etk_signal_block("text-changed", ETK_OBJECT(UI_GroupNameEntry), on_NamesEntry_text_changed, NULL); etk_signal_block("value-changed", ETK_OBJECT(UI_GroupMinWSpinner), ETK_CALLBACK(on_GroupSpinner_value_changed), (void *)MINW_SPINNER); etk_signal_block("value-changed", ETK_OBJECT(UI_GroupMinHSpinner), ETK_CALLBACK(on_GroupSpinner_value_changed), (void *)MINH_SPINNER); etk_signal_block("value-changed", ETK_OBJECT(UI_GroupMaxWSpinner), ETK_CALLBACK(on_GroupSpinner_value_changed), (void *)MAXW_SPINNER); etk_signal_block("value-changed", ETK_OBJECT(UI_GroupMaxHSpinner), ETK_CALLBACK(on_GroupSpinner_value_changed), (void *)MAXH_SPINNER); - //Update name - etk_entry_text_set(ETK_ENTRY(UI_GroupNameEntry),Cur.group->string); - - //Update min e max spinners - Evas_Coord w, h; - edje_object_size_min_get(edje_o, &w, &h); - etk_range_value_set(ETK_RANGE(UI_GroupMinWSpinner), (float)w); - etk_range_value_set(ETK_RANGE(UI_GroupMinHSpinner), (float)h); - edje_object_size_max_get(edje_o, &w, &h); - etk_range_value_set(ETK_RANGE(UI_GroupMaxWSpinner), (float)w); - etk_range_value_set(ETK_RANGE(UI_GroupMaxHSpinner), (float)h); - + if (etk_string_length_get(Cur.group)) + { + //Update name + etk_entry_text_set(ETK_ENTRY(UI_GroupNameEntry),Cur.group->string); + etk_widget_hide(ETK_WIDGET(UI_GroupNameEntryImage)); + + //Update min e max spinners + Evas_Coord w, h; + edje_object_size_min_get(edje_o, &w, &h); + etk_range_value_set(ETK_RANGE(UI_GroupMinWSpinner), (float)w); + etk_range_value_set(ETK_RANGE(UI_GroupMinHSpinner), (float)h); + edje_object_size_max_get(edje_o, &w, &h); + etk_range_value_set(ETK_RANGE(UI_GroupMaxWSpinner), (float)w); + etk_range_value_set(ETK_RANGE(UI_GroupMaxHSpinner), (float)h); + } + //ReEnable Signal Propagation - etk_signal_unblock("text-changed",ETK_OBJECT(UI_GroupNameEntry),on_GroupNameEntry_text_changed, NULL); + etk_signal_unblock("text-changed", ETK_OBJECT(UI_GroupNameEntry),on_NamesEntry_text_changed, NULL); etk_signal_unblock("value-changed", ETK_OBJECT(UI_GroupMinWSpinner), ETK_CALLBACK(on_GroupSpinner_value_changed), (void *)MINW_SPINNER); etk_signal_unblock("value-changed", ETK_OBJECT(UI_GroupMinHSpinner), ETK_CALLBACK(on_GroupSpinner_value_changed), (void *)MINH_SPINNER); etk_signal_unblock("value-changed", ETK_OBJECT(UI_GroupMaxWSpinner), ETK_CALLBACK(on_GroupSpinner_value_changed), (void *)MAXW_SPINNER); @@ -532,7 +536,7 @@ { //Stop signal propagation etk_signal_block("text-changed",ETK_OBJECT(UI_PartNameEntry), - on_PartNameEntry_text_changed, NULL); + on_NamesEntry_text_changed, NULL); etk_signal_block("toggled",ETK_OBJECT(UI_PartEventsCheck), on_PartEventsCheck_toggled, NULL); etk_signal_block("toggled",ETK_OBJECT(UI_PartEventsRepeatCheck), @@ -543,41 +547,45 @@ if (etk_string_length_get(Cur.part)) { etk_entry_text_set(ETK_ENTRY(UI_PartNameEntry), Cur.part->string); + etk_widget_hide(ETK_WIDGET(UI_PartNameEntryImage)); + etk_toggle_button_active_set(ETK_TOGGLE_BUTTON(UI_PartEventsCheck), edje_edit_part_mouse_events_get(edje_o, Cur.part->string)); etk_toggle_button_active_set(ETK_TOGGLE_BUTTON(UI_PartEventsRepeatCheck), edje_edit_part_repeat_events_get(edje_o, Cur.part->string)); - } - - /* Update clip_to combobox */ - Etk_Combobox_Item *item = NULL; - const char *clipto; - int i; - char *p; + - clipto = edje_edit_part_clip_to_get(edje_o, Cur.part->string); + /* Update clip_to combobox */ + Etk_Combobox_Item *item = NULL; + const char *clipto; + int i; + char *p; - if (clipto) - { - //Loop for all the item in the Combobox - i=1; - while ((item = etk_combobox_nth_item_get(ETK_COMBOBOX(UI_CliptoComboBox),i))) + clipto = edje_edit_part_clip_to_get(edje_o, Cur.part->string); + + if (clipto) { - p = etk_combobox_item_field_get(item, 1); - if (!strcmp(p, clipto)) - etk_combobox_active_item_set(ETK_COMBOBOX(UI_CliptoComboBox),item); - i++; + //Loop for all the item in the Combobox + i=1; + while ((item = etk_combobox_nth_item_get(ETK_COMBOBOX(UI_CliptoComboBox),i))) + { + p = etk_combobox_item_field_get(item, 1); + if (!strcmp(p, clipto)) + etk_combobox_active_item_set(ETK_COMBOBOX(UI_CliptoComboBox),item); + i++; + } } + else + etk_combobox_active_item_set(ETK_COMBOBOX(UI_CliptoComboBox), + etk_combobox_first_item_get(ETK_COMBOBOX(UI_CliptoComboBox))); + + edje_edit_string_free(clipto); } - else - etk_combobox_active_item_set(ETK_COMBOBOX(UI_CliptoComboBox), - etk_combobox_first_item_get(ETK_COMBOBOX(UI_CliptoComboBox))); - edje_edit_string_free(clipto); //ReEnable Signal Propagation etk_signal_unblock("text-changed",ETK_OBJECT(UI_PartNameEntry), - on_PartNameEntry_text_changed, NULL); + on_NamesEntry_text_changed, NULL); etk_signal_unblock("toggled",ETK_OBJECT(UI_PartEventsCheck), on_PartEventsCheck_toggled, NULL); etk_signal_unblock("toggled",ETK_OBJECT(UI_PartEventsRepeatCheck), @@ -592,21 +600,26 @@ UpdateDescriptionFrame(void) { //Stop signal propagation - etk_signal_block("text-changed",ETK_OBJECT(UI_StateEntry),on_StateEntry_text_changed, NULL); + etk_signal_block("text-changed", ETK_OBJECT(UI_StateEntry),on_NamesEntry_text_changed, NULL); etk_signal_block("value-changed", ETK_OBJECT(UI_AspectMinSpinner), ETK_CALLBACK(on_AspectSpinner_value_changed), NULL); etk_signal_block("value-changed", ETK_OBJECT(UI_AspectMaxSpinner), ETK_CALLBACK(on_AspectSpinner_value_changed), NULL); etk_signal_block("active-item-changed", ETK_OBJECT(UI_AspectComboBox), ETK_CALLBACK(on_AspectComboBox_changed), NULL); - etk_signal_block("value-changed",ETK_OBJECT(UI_StateMinWSpinner),ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); - etk_signal_block("value-changed",ETK_OBJECT(UI_StateMinHSpinner),ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); - etk_signal_block("value-changed",ETK_OBJECT(UI_StateMaxWSpinner),ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); - etk_signal_block("value-changed",ETK_OBJECT(UI_StateMaxHSpinner),ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); - etk_signal_block("value-changed",ETK_OBJECT(UI_StateAlignVSpinner),ETK_CALLBACK(on_FontAlignSpinner_value_changed), (void*)STATE_ALIGNV_SPINNER); - etk_signal_block("value-changed",ETK_OBJECT(UI_StateAlignHSpinner),ETK_CALLBACK(on_FontAlignSpinner_value_changed), (void*)STATE_ALIGNH_SPINNER); + etk_signal_block("value-changed", ETK_OBJECT(UI_StateMinWSpinner), ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); + etk_signal_block("value-changed", ETK_OBJECT(UI_StateMinHSpinner), ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); + etk_signal_block("value-changed", ETK_OBJECT(UI_StateMaxWSpinner), ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); + etk_signal_block("value-changed", ETK_OBJECT(UI_StateMaxHSpinner), ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); + etk_signal_block("value-changed", ETK_OBJECT(UI_StateAlignVSpinner), ETK_CALLBACK(on_FontAlignSpinner_value_changed), (void*)STATE_ALIGNV_SPINNER); + etk_signal_block("value-changed", ETK_OBJECT(UI_StateAlignHSpinner), ETK_CALLBACK(on_FontAlignSpinner_value_changed), (void*)STATE_ALIGNH_SPINNER); if (etk_string_length_get(Cur.state)) { //Set description name & index etk_entry_text_set(ETK_ENTRY(UI_StateEntry),Cur.state->string); + etk_widget_hide(ETK_WIDGET(UI_StateEntryImage)); + if (!strcmp(Cur.state->string, "default 0.00")) + etk_widget_disabled_set(ETK_WIDGET(UI_StateEntry), ETK_TRUE); + else + etk_widget_disabled_set(ETK_WIDGET(UI_StateEntry), ETK_FALSE); //Set aspect min & max etk_range_value_set(ETK_RANGE(UI_AspectMinSpinner), @@ -638,16 +651,16 @@ } //ReEnable Signal Propagation - etk_signal_unblock("text-changed",ETK_OBJECT(UI_StateEntry),on_StateEntry_text_changed, NULL); + etk_signal_unblock("text-changed", ETK_OBJECT(UI_StateEntry),on_NamesEntry_text_changed, NULL); etk_signal_unblock("value-changed", ETK_OBJECT(UI_AspectMinSpinner), ETK_CALLBACK(on_AspectSpinner_value_changed), NULL); etk_signal_unblock("value-changed", ETK_OBJECT(UI_AspectMaxSpinner), ETK_CALLBACK(on_AspectSpinner_value_changed), NULL); etk_signal_unblock("active-item-changed", ETK_OBJECT(UI_AspectComboBox), ETK_CALLBACK(on_AspectComboBox_changed), NULL); - etk_signal_unblock("value-changed",ETK_OBJECT(UI_StateMinWSpinner),ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); - etk_signal_unblock("value-changed",ETK_OBJECT(UI_StateMinHSpinner),ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); - etk_signal_unblock("value-changed",ETK_OBJECT(UI_StateMaxWSpinner),ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); - etk_signal_unblock("value-changed",ETK_OBJECT(UI_StateMaxHSpinner),ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); - etk_signal_unblock("value-changed",ETK_OBJECT(UI_StateAlignVSpinner),ETK_CALLBACK(on_FontAlignSpinner_value_changed), (void*)STATE_ALIGNV_SPINNER); - etk_signal_unblock("value-changed",ETK_OBJECT(UI_StateAlignHSpinner),ETK_CALLBACK(on_FontAlignSpinner_value_changed), (void*)STATE_ALIGNH_SPINNER); + etk_signal_unblock("value-changed", ETK_OBJECT(UI_StateMinWSpinner), ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); + etk_signal_unblock("value-changed", ETK_OBJECT(UI_StateMinHSpinner), ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); + etk_signal_unblock("value-changed", ETK_OBJECT(UI_StateMaxWSpinner), ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); + etk_signal_unblock("value-changed", ETK_OBJECT(UI_StateMaxHSpinner), ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); + etk_signal_unblock("value-changed", ETK_OBJECT(UI_StateAlignVSpinner), ETK_CALLBACK(on_FontAlignSpinner_value_changed), (void*)STATE_ALIGNV_SPINNER); + etk_signal_unblock("value-changed", ETK_OBJECT(UI_StateAlignHSpinner), ETK_CALLBACK(on_FontAlignSpinner_value_changed), (void*)STATE_ALIGNH_SPINNER); } @@ -996,7 +1009,7 @@ //Stop signal propagation etk_signal_block("text-changed", ETK_OBJECT(UI_ProgramEntry), - ETK_CALLBACK(on_ProgramEntry_text_changed), NULL); + ETK_CALLBACK(on_NamesEntry_text_changed), NULL); etk_signal_block("text-changed", ETK_OBJECT(etk_combobox_entry_entry_get(ETK_COMBOBOX_ENTRY(UI_SourceEntry))), ETK_CALLBACK(on_SourceEntry_text_changed), UI_SourceEntry); @@ -1024,8 +1037,9 @@ etk_signal_block("value-changed", ETK_OBJECT(UI_Param2Spinner), ETK_CALLBACK(on_Param2Spinner_value_changed), NULL); - //Update Program + //Update Program Entry (name) etk_entry_text_set(ETK_ENTRY(UI_ProgramEntry), Cur.prog->string); + etk_widget_hide(ETK_WIDGET(UI_ProgramEntryImage)); //Update Source s = edje_edit_program_source_get(edje_o, Cur.prog->string); @@ -1102,7 +1116,7 @@ //Reenable signal propagation etk_signal_unblock("text-changed", ETK_OBJECT(UI_ProgramEntry), - ETK_CALLBACK(on_ProgramEntry_text_changed), NULL); + ETK_CALLBACK(on_NamesEntry_text_changed), NULL); etk_signal_unblock("text-changed", ETK_OBJECT(etk_combobox_entry_entry_get(ETK_COMBOBOX_ENTRY(UI_SourceEntry))), ETK_CALLBACK(on_SourceEntry_text_changed), UI_SourceEntry); @@ -1450,6 +1464,10 @@ label = etk_label_new("Name"); etk_box_append(ETK_BOX(hbox), label, ETK_BOX_START, ETK_BOX_NONE, 0); UI_GroupNameEntry = etk_entry_new(); + UI_GroupNameEntryImage = etk_image_new_from_stock(ETK_STOCK_DIALOG_OK, + ETK_STOCK_SMALL); + etk_entry_image_set(ETK_ENTRY(UI_GroupNameEntry), ETK_ENTRY_IMAGE_SECONDARY, + ETK_IMAGE(UI_GroupNameEntryImage)); etk_box_append(ETK_BOX(hbox), UI_GroupNameEntry, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); //CurrentSizeLabel @@ -1495,8 +1513,14 @@ etk_widget_size_request_set(UI_GroupMaxHSpinner, 45, 20); etk_box_append(ETK_BOX(hbox),UI_GroupMaxHSpinner, ETK_BOX_START, ETK_BOX_NONE, 0); + etk_signal_connect("text-changed", ETK_OBJECT(UI_GroupNameEntry), - ETK_CALLBACK(on_GroupNameEntry_text_changed), NULL); + ETK_CALLBACK(on_NamesEntry_text_changed), NULL); + etk_signal_connect("key-down", ETK_OBJECT(UI_GroupNameEntry), + ETK_CALLBACK(on_GroupNameEntry_key_down), NULL); + etk_signal_connect("mouse-click", ETK_OBJECT(UI_GroupNameEntryImage), + ETK_CALLBACK(on_GroupNameEntryImage_mouse_clicked), NULL); + etk_signal_connect("value-changed", ETK_OBJECT(UI_GroupMinWSpinner), ETK_CALLBACK(on_GroupSpinner_value_changed), (void *)MINW_SPINNER); @@ -1591,6 +1615,10 @@ //StateEntry UI_StateEntry = etk_entry_new(); + UI_StateEntryImage = etk_image_new_from_stock(ETK_STOCK_DIALOG_OK, + ETK_STOCK_SMALL); + etk_entry_image_set(ETK_ENTRY(UI_StateEntry), ETK_ENTRY_IMAGE_SECONDARY, + ETK_IMAGE(UI_StateEntryImage)); etk_box_append(ETK_BOX(hbox), UI_StateEntry, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); //UI_StateIndexSpinner @@ -1705,8 +1733,14 @@ etk_widget_size_request_set(UI_StateAlignVSpinner, 45, 20); etk_box_append(ETK_BOX(hbox),UI_StateAlignVSpinner, ETK_BOX_START, ETK_BOX_NONE, 0); + + etk_signal_connect("key-down", ETK_OBJECT(UI_StateEntry), + ETK_CALLBACK(on_StateEntry_key_down), NULL); + etk_signal_connect("mouse-click", ETK_OBJECT(UI_StateEntryImage), + ETK_CALLBACK(on_StateEntryImage_mouse_clicked), NULL); etk_signal_connect("text-changed", ETK_OBJECT(UI_StateEntry), - ETK_CALLBACK(on_StateEntry_text_changed), NULL); + ETK_CALLBACK(on_NamesEntry_text_changed), NULL); + etk_signal_connect("value-changed", ETK_OBJECT(UI_AspectMinSpinner), ETK_CALLBACK(on_AspectSpinner_value_changed), NULL); etk_signal_connect("value-changed", ETK_OBJECT(UI_AspectMaxSpinner), @@ -1722,9 +1756,11 @@ etk_signal_connect("value-changed", ETK_OBJECT(UI_StateMaxHSpinner), ETK_CALLBACK(on_StateMinMaxSpinner_value_changed), NULL); etk_signal_connect("value-changed", ETK_OBJECT(UI_StateAlignVSpinner), - ETK_CALLBACK(on_FontAlignSpinner_value_changed), (void*)STATE_ALIGNV_SPINNER); + ETK_CALLBACK(on_FontAlignSpinner_value_changed), + (void*)STATE_ALIGNV_SPINNER); etk_signal_connect("value-changed", ETK_OBJECT(UI_StateAlignHSpinner), - ETK_CALLBACK(on_FontAlignSpinner_value_changed), (void*)STATE_ALIGNH_SPINNER); + ETK_CALLBACK(on_FontAlignSpinner_value_changed), + (void*)STATE_ALIGNH_SPINNER); return vbox; } @@ -2240,6 +2276,10 @@ label = etk_label_new("<b>Name</b>"); etk_table_attach(ETK_TABLE(table), label, 0, 0, 0, 0,ETK_TABLE_NONE,0,0); UI_PartNameEntry = etk_entry_new(); + UI_PartNameEntryImage = etk_image_new_from_stock(ETK_STOCK_DIALOG_OK, + ETK_STOCK_SMALL); + etk_entry_image_set(ETK_ENTRY(UI_PartNameEntry), ETK_ENTRY_IMAGE_SECONDARY, + ETK_IMAGE(UI_PartNameEntryImage)); etk_table_attach_default(ETK_TABLE(table),UI_PartNameEntry, 1, 1, 0, 0); //UI_CliptoComboBox @@ -2273,9 +2313,13 @@ etk_box_append(ETK_BOX(hbox), UI_PartEventsRepeatCheck, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); - etk_signal_connect("text-changed", ETK_OBJECT(UI_PartNameEntry), - ETK_CALLBACK(on_PartNameEntry_text_changed), NULL); + ETK_CALLBACK(on_NamesEntry_text_changed), NULL); + etk_signal_connect("key-down", ETK_OBJECT(UI_PartNameEntry), + ETK_CALLBACK(on_PartNameEntry_key_down), NULL); + etk_signal_connect("mouse-click", ETK_OBJECT(UI_PartNameEntryImage), + ETK_CALLBACK(on_PartNameEntryImage_mouse_clicked), NULL); + etk_signal_connect("toggled", ETK_OBJECT(UI_PartEventsCheck), ETK_CALLBACK(on_PartEventsCheck_toggled), NULL); etk_signal_connect("toggled", ETK_OBJECT(UI_PartEventsRepeatCheck), @@ -2291,16 +2335,23 @@ Etk_Widget *table; Etk_Widget *label; + //table table = etk_table_new(4, 10, ETK_TABLE_HHOMOGENEOUS); - //UI_ProgramEntry + //UI_ProgramEntry + image label = etk_label_new("<b>Name</b>"); etk_table_attach(ETK_TABLE(table), label, 0, 0, 0, 0,ETK_TABLE_NONE,0,0); UI_ProgramEntry = etk_entry_new(); - etk_tooltips_tip_set(UI_ProgramEntry, "Symbolic <b>name</b> of program as a unique identifier."); + etk_tooltips_tip_set(UI_ProgramEntry, "Symbolic <b>name</b> of " + "program as a unique identifier."); + UI_ProgramEntryImage = etk_image_new_from_stock(ETK_STOCK_DIALOG_OK, + ETK_STOCK_SMALL); + etk_entry_image_set(ETK_ENTRY(UI_ProgramEntry), ETK_ENTRY_IMAGE_SECONDARY, + ETK_IMAGE(UI_ProgramEntryImage)); etk_table_attach_default(ETK_TABLE(table),UI_ProgramEntry, 1, 3, 0, 0); - + + //UI_SourceEntry label = etk_label_new("<b>Source</b>"); etk_table_attach(ETK_TABLE(table), label, 0, 0, 1, 1,ETK_TABLE_NONE,0,0); @@ -2475,8 +2526,13 @@ etk_signal_connect("active-item-changed", ETK_OBJECT(UI_ActionComboBox), ETK_CALLBACK(on_ActionComboBox_changed), NULL); + etk_signal_connect("text-changed", ETK_OBJECT(UI_ProgramEntry), - ETK_CALLBACK(on_ProgramEntry_text_changed), NULL); + ETK_CALLBACK(on_NamesEntry_text_changed), NULL); + etk_signal_connect("key-down", ETK_OBJECT(UI_ProgramEntry), + ETK_CALLBACK(on_ProgramEntry_key_down), NULL); + etk_signal_connect("mouse-click", ETK_OBJECT(UI_ProgramEntryImage), + ETK_CALLBACK(on_ProgramEntryImage_mouse_clicked), NULL); etk_signal_connect("text-changed", ETK_OBJECT(etk_combobox_entry_entry_get(ETK_COMBOBOX_ENTRY(UI_SourceEntry))), ETK_CALLBACK(on_SourceEntry_text_changed), UI_SourceEntry); =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/interface.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -3 -r1.31 -r1.32 --- interface.h 18 Feb 2008 20:38:40 -0000 1.31 +++ interface.h 22 Feb 2008 02:36:40 -0000 1.32 @@ -33,6 +33,7 @@ Etk_Widget *UI_ColorPicker; /* group frame objects */ Etk_Widget *UI_GroupNameEntry; +Etk_Widget *UI_GroupNameEntryImage; Etk_Widget *UI_GroupMinWSpinner; Etk_Widget *UI_GroupMinHSpinner; Etk_Widget *UI_GroupMaxWSpinner; @@ -40,13 +41,14 @@ Etk_Widget *UI_CurrentGroupSizeLabel; /* part frame objects */ Etk_Widget *UI_PartNameEntry; +Etk_Widget *UI_PartNameEntryImage; Etk_Widget *UI_PartTypeComboBox; Etk_Widget *UI_PartEventsCheck; Etk_Widget *UI_PartEventsRepeatCheck; Etk_Widget *UI_CliptoComboBox; /* state frame objects */ Etk_Widget *UI_StateEntry; -//Etk_Widget *UI_StateIndexSpinner; +Etk_Widget *UI_StateEntryImage; Etk_Widget *UI_StateMinWSpinner; Etk_Widget *UI_StateMinHSpinner; Etk_Widget *UI_StateMaxWSpinner; @@ -96,6 +98,7 @@ Etk_Widget *UI_ScriptSaveButton; /* program frame objects */ Etk_Widget *UI_ProgramEntry; +Etk_Widget *UI_ProgramEntryImage; Etk_Widget *UI_SignalEntry; Etk_Widget *UI_ActionComboBox; Etk_Widget *UI_TransiComboBox; =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/main.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- main.h 18 Feb 2008 16:44:22 -0000 1.27 +++ main.h 22 Feb 2008 02:36:40 -0000 1.28 @@ -132,7 +132,7 @@ Evas_Hash *Parts_Hash; //Associate part names with Etk_Tree_Row* Evas_Object *EV_fakewin; //The simple window implementation -Evas_Object *EV_movebox; // FIXME +Evas_Object *EV_movebox; //The object used for moving fakewin Evas_Object *focus_handler; //The yellow box around the selected part Evas_Object *rel1_handler; //The red point Evas_Object *rel2_handler; //The blue point @@ -142,7 +142,7 @@ Evas_Object *rel2Y_parent_handler; // Evas_Object *Consolle; //The lower consolle panel Evas_List *stack; //Stack for the consolle -int consolle_count; //Counter for the consolle +int consolle_count; //Counter for the consolle /* FUNCTION PROTOTYPES*/ void DebugInfo(int full); ------------------------------------------------------------------------- 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-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs