From: Enlightenment C. <no...@cv...> - 2008-02-17 21:39:22
|
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.c Log Message: * implemented all edje_edit_program_*_set() functions * program frame now has editing capability =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/callbacks.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -3 -r1.49 -r1.50 --- callbacks.c 16 Feb 2008 16:52:59 -0000 1.49 +++ callbacks.c 17 Feb 2008 21:39:18 -0000 1.50 @@ -125,7 +125,7 @@ if(edje_edit_state_tween_add(edje_o, Cur.part->string, Cur.state->string, tween)) { - PupulateTweenList(); + PopulateTweenList(); row = etk_tree_last_row_get(ETK_TREE(UI_ImageTweenList)); etk_tree_row_select(row); etk_tree_row_scroll_to(row, ETK_FALSE); @@ -833,28 +833,16 @@ on_ActionComboBox_changed(Etk_Combobox *combobox, void *data) { int action; - //char param1[200],param2[200]; - //double value,value2; printf("Changed Signal on ActionComboBox EMITTED\n"); - int act; if (!etk_string_length_get(Cur.prog)) return ETK_TRUE; - //Get the current action in the current program - //action = edje_edit_program_action_get(edje_o, Cur.prog->string); - //Get the new action from the combo data action = (int)etk_combobox_item_data_get( etk_combobox_active_item_get(combobox)); - //set the action in the current program - //engrave_program_action_set(Cur.epr, action, - // param1, - // param2, - // value, - // value2 - //); - + edje_edit_program_action_set(edje_o, Cur.prog->string, action); + if (action == EDJE_ACTION_TYPE_SIGNAL_EMIT) { etk_widget_hide(UI_TargetEntry); @@ -939,19 +927,26 @@ Etk_Bool on_ProgramEntry_text_changed(Etk_Object *object, void *data) { - Etk_Tree_Col *col1=NULL; + const char *name; - printf("Text Changed Signal on ProgramEntry Emitted\n"); - engrave_program_name_set(Cur.epr,etk_entry_text_get(ETK_ENTRY(UI_ProgramEntry))); - if (Cur.epr && ecore_hash_get(hash,Cur.epr)) - { - if ((col1 = etk_tree_nth_col_get(ETK_TREE(UI_PartsTree), 0))) - etk_tree_row_fields_set(ecore_hash_get(hash,Cur.epr),TRUE, - col1,EdjeFile,"PROG.PNG",engrave_program_name_get(Cur.epr), - NULL); + //printf("Text Changed Signal on ProgramEntry Emitted\n"); + + if (!etk_string_length_get(Cur.prog)) return ETK_TRUE; + + name = etk_entry_text_get(ETK_ENTRY(UI_ProgramEntry)); + + if (edje_edit_program_name_set(edje_o, Cur.prog->string, name)) + { + /* 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, "PROG.PNG", name, + NULL); + /* update Cur */ + Cur.prog = etk_string_set(Cur.prog, name); } - //TODO Check for dependencies! only in after? - + return ETK_TRUE; } @@ -959,9 +954,8 @@ on_SourceEntry_text_changed(Etk_Object *object, void *data) { printf("Text Changed Signal on SourceEntry Emitted\n"); - engrave_program_source_set(Cur.epr, - etk_entry_text_get(ETK_ENTRY(etk_combobox_entry_entry_get(ETK_COMBOBOX_ENTRY(UI_SourceEntry))))); - + const char *str = etk_entry_text_get(ETK_ENTRY(object)); + edje_edit_program_source_set(edje_o, Cur.prog->string, str); return ETK_TRUE; } @@ -978,7 +972,27 @@ etk_combobox_entry_item_fields_get(active_item, NULL, &pname, NULL); - etk_entry_text_set(ETK_ENTRY(etk_combobox_entry_entry_get(ETK_COMBOBOX_ENTRY(UI_SourceEntry))),pname); + etk_entry_text_set(ETK_ENTRY(etk_combobox_entry_entry_get( + ETK_COMBOBOX_ENTRY(UI_SourceEntry))),pname); + + return ETK_TRUE; +} + +Etk_Bool +on_SignalEntry_item_changed(Etk_Combobox_Entry *combo, void *data) +{ + Etk_Combobox_Entry_Item *active_item = NULL; + char *pname; + + printf("Item Changed Signal on SignalEntry Emitted\n"); + + if (!(active_item = etk_combobox_entry_active_item_get(combo))) + return ETK_TRUE; + + etk_combobox_entry_item_fields_get(active_item, NULL, &pname, NULL); + + etk_entry_text_set(ETK_ENTRY(etk_combobox_entry_entry_get( + ETK_COMBOBOX_ENTRY(UI_SignalEntry))),pname); return ETK_TRUE; } @@ -987,7 +1001,8 @@ on_SignalEntry_text_changed(Etk_Object *object, void *data) { printf("Text Changed Signal on SignalEntry Emitted\n"); - engrave_program_signal_set(Cur.epr,etk_entry_text_get(ETK_ENTRY(UI_SignalEntry))); + const char *str = etk_entry_text_get(ETK_ENTRY(object)); + edje_edit_program_signal_set(edje_o, Cur.prog->string, str); return ETK_TRUE; } @@ -995,9 +1010,12 @@ on_DelaySpinners_value_changed(Etk_Range *range, double value, void *data) { printf("value Changed Signal on DelayFromSpinner Emitted\n"); - engrave_program_in_set(Cur.epr, - etk_range_value_get(ETK_RANGE(UI_DelayFromSpinner)), - etk_range_value_get(ETK_RANGE(UI_DelayRangeSpinner))); + edje_edit_program_in_from_set(edje_o, Cur.prog->string, + etk_range_value_get(ETK_RANGE(UI_DelayFromSpinner))); + + edje_edit_program_in_range_set(edje_o, Cur.prog->string, + etk_range_value_get(ETK_RANGE(UI_DelayRangeSpinner))); + return ETK_TRUE; } @@ -1010,15 +1028,15 @@ printf("Text Changed Signal on TargetEntry Emitted (text: %s)\n",text); //Empty current targets list - Cur.epr->targets=NULL; //ABSOLUTLY NOT THE RIGHT WAY!!!! TODO FIXME + edje_edit_program_targets_clear(edje_o, Cur.prog->string); //Spit the string in token and add every targets - tok = strtok(text,","); + tok = strtok(text,"|"); while (tok != NULL) { printf("'%s'\n",tok); - engrave_program_target_add(Cur.epr,tok); - tok = strtok(NULL, ","); + edje_edit_program_target_add(edje_o, Cur.prog->string, tok); + tok = strtok(NULL, "|"); } //TODO Check if all the targets exists in the group, otherwise make the text red @@ -1030,92 +1048,63 @@ Etk_Bool on_Param1Entry_text_changed(Etk_Object *object, void *data) { - Engrave_Action action; printf("Text Changed Signal on Param1Entry Emitted\n"); - //get the action from the combo data - action = (Engrave_Action)etk_combobox_item_data_get( - etk_combobox_active_item_get(ETK_COMBOBOX(UI_ActionComboBox))); - - engrave_program_action_set(Cur.epr,action, - etk_entry_text_get(ETK_ENTRY(UI_Param1Entry)), - etk_entry_text_get(ETK_ENTRY(UI_Param2Entry)), - Cur.epr->value, - Cur.epr->value2 - ); + edje_edit_program_state_set(edje_o, Cur.prog->string, + etk_entry_text_get(ETK_ENTRY(UI_Param1Entry))); + return ETK_TRUE; } Etk_Bool on_Param2Entry_text_changed(Etk_Object *object, void *data) { - Engrave_Action action; printf("Text Changed Signal on Param2Entry Emitted\n"); - //get the action from the combo data - action = (Engrave_Action)etk_combobox_item_data_get( - etk_combobox_active_item_get(ETK_COMBOBOX(UI_ActionComboBox))); - - engrave_program_action_set(Cur.epr,action, - etk_entry_text_get(ETK_ENTRY(UI_Param1Entry)), - etk_entry_text_get(ETK_ENTRY(UI_Param2Entry)), - Cur.epr->value, - Cur.epr->value2 - ); - + edje_edit_program_state2_set(edje_o, Cur.prog->string, + etk_entry_text_get(ETK_ENTRY(UI_Param2Entry))); + return ETK_TRUE; } Etk_Bool on_Param1Spinner_value_changed(Etk_Range *range, double value, void *data) { - Engrave_Action action; printf("value Changed Signal on Param1Spinner Emitted\n"); - - //get the action from the combo data - action = (Engrave_Action)etk_combobox_item_data_get( - etk_combobox_active_item_get(ETK_COMBOBOX(UI_ActionComboBox))); - - engrave_program_action_set(Cur.epr,action, - etk_entry_text_get(ETK_ENTRY(UI_Param1Entry)), - etk_entry_text_get(ETK_ENTRY(UI_Param2Entry)), - etk_range_value_get(ETK_RANGE(UI_Param1Spinner)), - Cur.epr->value2 - ); - + edje_edit_program_value_set(edje_o, Cur.prog->string, + etk_range_value_get(ETK_RANGE(UI_Param1Spinner))); return ETK_TRUE; } +Etk_Bool +on_Param2Spinner_value_changed(Etk_Range *range, double value, void *data) +{ + printf("value Changed Signal on Param2Spinner Emitted\n"); + edje_edit_program_value2_set(edje_o, Cur.prog->string, + etk_range_value_get(ETK_RANGE(UI_Param2Spinner))); + return ETK_TRUE; +} Etk_Bool on_TransitionComboBox_changed(Etk_Combobox *combobox, void *data) { - Engrave_Transition tran; + int trans; printf("Changed Signal on TransitionComboBox Emitted\n"); //get the transition from the combo data - tran = (Engrave_Transition)etk_combobox_item_data_get( - etk_combobox_active_item_get(combobox)); - - engrave_program_transition_set(Cur.epr,tran, - etk_range_value_get(ETK_RANGE(UI_DurationSpinner))); - + trans = (int)etk_combobox_item_data_get(etk_combobox_active_item_get(combobox)); + edje_edit_program_transition_set(edje_o, Cur.prog->string, trans); + return ETK_TRUE; } Etk_Bool on_DurationSpinner_value_changed(Etk_Range *range, double value, void *data) { - Engrave_Transition tran; printf("value Changed Signal on DurationSpinner Emitted\n"); - - //get the transition from the combo data - tran = (Engrave_Transition)etk_combobox_item_data_get( - etk_combobox_active_item_get(ETK_COMBOBOX(UI_TransiComboBox))); - - engrave_program_transition_set(Cur.epr,tran, - etk_range_value_get(ETK_RANGE(UI_DurationSpinner))); - + edje_edit_program_transition_time_set(edje_o, Cur.prog->string, + etk_range_value_get(ETK_RANGE(UI_DurationSpinner))); + return ETK_TRUE; } @@ -1128,15 +1117,16 @@ printf("Text Changed Signal on AfterEntry Emitted (text: %s)\n",text); //Empty current afters list - Cur.epr->afters=NULL; //ABSOLUTLY NOT THE RIGHT WAY!!!! TODO FIXME - + edje_edit_program_afters_clear(edje_o, Cur.prog->string); + //Spit the string in token and add every afters - tok = strtok (text,","); + tok = strtok (text,"|"); while (tok != NULL) { printf ("'%s'\n",tok); + edje_edit_program_after_add(edje_o, Cur.prog->string, tok); engrave_program_after_add(Cur.epr,tok); - tok = strtok (NULL, ","); + tok = strtok (NULL, "|"); } //TODO Check if all the after exists in the group, otherwise make the text red =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/callbacks.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- callbacks.h 15 Feb 2008 21:41:21 -0000 1.20 +++ callbacks.h 17 Feb 2008 21:39:18 -0000 1.21 @@ -47,11 +47,13 @@ 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); +Etk_Bool on_SignalEntry_item_changed (Etk_Combobox_Entry *combo, void *data); Etk_Bool on_DelaySpinners_value_changed (Etk_Range *range, double value, void *data); Etk_Bool on_TargetEntry_text_changed (Etk_Object *object, void *data); Etk_Bool on_Param1Entry_text_changed (Etk_Object *object, void *data); Etk_Bool on_Param2Entry_text_changed (Etk_Object *object, void *data); Etk_Bool on_Param1Spinner_value_changed (Etk_Range *range, double value, void *data); +Etk_Bool on_Param2Spinner_value_changed (Etk_Range *range, double value, void *data); Etk_Bool on_TransitionComboBox_changed (Etk_Combobox *combobox, void *data); Etk_Bool on_DurationSpinner_value_changed (Etk_Range *range, double value, void *data); Etk_Bool on_AfterEntry_text_changed (Etk_Object *object, void *data); =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/interface.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -3 -r1.56 -r1.57 --- interface.c 16 Feb 2008 16:53:00 -0000 1.56 +++ interface.c 17 Feb 2008 21:39:18 -0000 1.57 @@ -64,7 +64,7 @@ //printf("Add Part to tree: %s\n",par->name); - switch (edje_edit_part_type_get(edje_o ,part_name)) + switch (edje_edit_part_type_get(edje_o, part_name)) { case EDJE_PART_TYPE_IMAGE: strcpy(buf,"IMAGE.PNG"); break; case EDJE_PART_TYPE_TEXT: strcpy(buf,"TEXT.PNG"); break; @@ -321,41 +321,7 @@ } void -PopulateSourceComboBox(void) -{ - Evas_List *l; - Engrave_Part *ep; - - //Stop signal propagation - etk_signal_block("active-item-changed", ETK_OBJECT(UI_SourceEntry), - ETK_CALLBACK(on_SourceEntry_item_changed), NULL); - - printf("Populate Source Combobox\n"); - - etk_combobox_entry_clear(ETK_COMBOBOX_ENTRY(UI_SourceEntry)); - - for (l = Cur.eg->parts; l ; l = l->next) - { - ep = l->data; - if (ep->type == ENGRAVE_PART_TYPE_RECT) - etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SourceEntry), - etk_image_new_from_edje(EdjeFile,"RECT.PNG"),ep->name); - if (ep->type == ENGRAVE_PART_TYPE_TEXT) - etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SourceEntry), - etk_image_new_from_edje(EdjeFile,"TEXT.PNG"),ep->name); - if (ep->type == ENGRAVE_PART_TYPE_IMAGE) - etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SourceEntry), - etk_image_new_from_edje(EdjeFile,"IMAGE.PNG"),ep->name); - } - - //Renable signal propagation - etk_signal_unblock("active-item-changed", ETK_OBJECT(UI_SourceEntry), - ETK_CALLBACK(on_SourceEntry_item_changed), NULL); -} - - -void -PupulateTweenList(void) +PopulateTweenList(void) { Evas_List *tweens, *l; Etk_Tree_Col *col; @@ -381,6 +347,85 @@ } void +PopulateSourceComboEntry(void) +{ + Evas_List *l; + char buf[20]; + printf("Populate Program Source ComboEntry\n"); + + //Stop signal propagation + etk_signal_block("active-item-changed", ETK_OBJECT(UI_SourceEntry), + ETK_CALLBACK(on_SourceEntry_item_changed), NULL); + + etk_combobox_entry_clear(ETK_COMBOBOX_ENTRY(UI_SourceEntry)); + + l = edje_edit_parts_list_get(edje_o); + while (l) + { + switch (edje_edit_part_type_get(edje_o, (char*)l->data)) + { + case EDJE_PART_TYPE_IMAGE: strcpy(buf,"IMAGE.PNG"); break; + case EDJE_PART_TYPE_TEXT: strcpy(buf,"TEXT.PNG"); break; + case EDJE_PART_TYPE_RECTANGLE: strcpy(buf,"RECT.PNG"); break; + default: strcpy(buf,"NONE.PNG"); break; + } + + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SourceEntry), + etk_image_new_from_edje(EdjeFile, buf), + (char *)l->data); + + l = l->next; + } + edje_edit_string_list_free(l); + + //Renable signal propagation + etk_signal_unblock("active-item-changed", ETK_OBJECT(UI_SourceEntry), + ETK_CALLBACK(on_SourceEntry_item_changed), NULL); +} + +void +PopulateSignalComboEntry(void) +{ + printf("Populate Program Signal ComboEntry\n"); + + //Stop signal propagation + etk_signal_block("active-item-changed", ETK_OBJECT(UI_SignalEntry), + ETK_CALLBACK(on_SignalEntry_item_changed), NULL); + + etk_combobox_entry_clear(ETK_COMBOBOX_ENTRY(UI_SignalEntry)); + + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "program,start"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "program,stop"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "load"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "show"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "hide"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "resize"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "mouse,in"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "mouse,out"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "mouse,move"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "mouse,down,1"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "mouse,up,1"); + etk_combobox_entry_item_append(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + etk_image_new_from_edje(EdjeFile, "DESC.PNG"), "mouse,clicked,1"); + + //Renable signal propagation + etk_signal_unblock("active-item-changed", ETK_OBJECT(UI_SignalEntry), + ETK_CALLBACK(on_SignalEntry_item_changed), NULL); +} + + +void UpdateGroupFrame(void) { //Stop signal propagation @@ -446,7 +491,7 @@ { //Stop signal propagation etk_signal_block("text-changed",ETK_OBJECT(UI_StateEntry),on_StateEntry_text_changed, NULL); - etk_signal_block("value-changed", ETK_OBJECT(UI_StateIndexSpinner), ETK_CALLBACK(on_StateIndexSpinner_value_changed), NULL); +// etk_signal_block("value-changed", ETK_OBJECT(UI_StateIndexSpinner), ETK_CALLBACK(on_StateIndexSpinner_value_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); @@ -493,7 +538,7 @@ //ReEnable Signal Propagation etk_signal_unblock("text-changed",ETK_OBJECT(UI_StateEntry),on_StateEntry_text_changed, NULL); - etk_signal_unblock("value-changed", ETK_OBJECT(UI_StateIndexSpinner), ETK_CALLBACK(on_StateIndexSpinner_value_changed), NULL); +// etk_signal_unblock("value-changed", ETK_OBJECT(UI_StateIndexSpinner), ETK_CALLBACK(on_StateIndexSpinner_value_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); @@ -547,7 +592,7 @@ if (!etk_string_length_get(Cur.state)) return; if (!etk_string_length_get(Cur.part)) return; - PupulateTweenList(); + PopulateTweenList(); etk_widget_disabled_set(UI_DeleteTweenButton, TRUE); etk_widget_disabled_set(UI_MoveDownTweenButton, TRUE); etk_widget_disabled_set(UI_MoveUpTweenButton, TRUE); @@ -866,8 +911,9 @@ 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); - etk_signal_block("text-changed", ETK_OBJECT(UI_SignalEntry), - ETK_CALLBACK(on_SignalEntry_text_changed), NULL); + etk_signal_block("text-changed", + ETK_OBJECT(etk_combobox_entry_entry_get(ETK_COMBOBOX_ENTRY(UI_SignalEntry))), + ETK_CALLBACK(on_SignalEntry_text_changed), UI_SignalEntry); etk_signal_block("value-changed", ETK_OBJECT(UI_DelayFromSpinner), ETK_CALLBACK(on_DelaySpinners_value_changed), NULL); etk_signal_block("value-changed", ETK_OBJECT(UI_DelayRangeSpinner), @@ -886,20 +932,8 @@ ETK_CALLBACK(on_AfterEntry_text_changed), NULL); etk_signal_block("text-changed", ETK_OBJECT(UI_Param2Entry), ETK_CALLBACK(on_Param2Entry_text_changed), NULL); - - - etk_widget_disabled_set(UI_AfterEntry, TRUE); - etk_widget_disabled_set(UI_ProgramEntry, TRUE); - etk_widget_disabled_set(UI_SourceEntry, TRUE); - etk_widget_disabled_set(UI_SignalEntry, TRUE); - etk_widget_disabled_set(UI_DelayFromSpinner, TRUE); - etk_widget_disabled_set(UI_DelayRangeSpinner, TRUE); - etk_widget_disabled_set(UI_TargetEntry, TRUE); - etk_widget_disabled_set(UI_Param1Entry, TRUE); - etk_widget_disabled_set(UI_Param2Entry, TRUE); - etk_widget_disabled_set(UI_Param1Spinner, TRUE); - etk_widget_disabled_set(UI_Param2Spinner, TRUE); - etk_widget_disabled_set(UI_DurationSpinner, TRUE); + etk_signal_block("value-changed", ETK_OBJECT(UI_Param2Spinner), + ETK_CALLBACK(on_Param2Spinner_value_changed), NULL); //Update Program etk_entry_text_set(ETK_ENTRY(UI_ProgramEntry), Cur.prog->string); @@ -912,7 +946,8 @@ //Update Signal s = edje_edit_program_signal_get(edje_o, Cur.prog->string); - etk_entry_text_set(ETK_ENTRY(UI_SignalEntry),s); + etk_entry_text_set(ETK_ENTRY(etk_combobox_entry_entry_get( + ETK_COMBOBOX_ENTRY(UI_SignalEntry))),s); edje_edit_string_free(s); //Update Delay @@ -934,10 +969,10 @@ for (; l; l = l->next) { str = etk_string_append(str, l->data); - str = etk_string_append(str, ", "); + str = etk_string_append(str, "|"); } - if (str->length > 2) - str = etk_string_truncate(str, str->length - 2); + if (str->length > 1) + str = etk_string_truncate(str, str->length - 1); etk_entry_text_set(ETK_ENTRY(UI_TargetEntry),str->string); //Update Afters(s) @@ -946,10 +981,10 @@ for (; l; l = l->next) { str = etk_string_append(str,l->data); - str = etk_string_append(str,", "); + str = etk_string_append(str,"|"); } - if (str->length > 2) - str = etk_string_truncate(str, str->length - 2); + if (str->length > 1) + str = etk_string_truncate(str, str->length - 1); etk_entry_text_set(ETK_ENTRY(UI_AfterEntry),str->string); @@ -982,8 +1017,9 @@ 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); - etk_signal_unblock("text-changed", ETK_OBJECT(UI_SignalEntry), - ETK_CALLBACK(on_SignalEntry_text_changed), NULL); + etk_signal_unblock("text-changed", + ETK_OBJECT(etk_combobox_entry_entry_get(ETK_COMBOBOX_ENTRY(UI_SignalEntry))), + ETK_CALLBACK(on_SignalEntry_text_changed), UI_SignalEntry); etk_signal_unblock("value-changed", ETK_OBJECT(UI_DelayFromSpinner), ETK_CALLBACK(on_DelaySpinners_value_changed), NULL); etk_signal_unblock("value-changed", ETK_OBJECT(UI_DelayRangeSpinner), @@ -1002,7 +1038,8 @@ ETK_CALLBACK(on_AfterEntry_text_changed), NULL); etk_signal_unblock("text-changed", ETK_OBJECT(UI_Param2Entry), ETK_CALLBACK(on_Param2Entry_text_changed), NULL); - + etk_signal_unblock("value-changed", ETK_OBJECT(UI_Param2Spinner), + ETK_CALLBACK(on_Param2Spinner_value_changed), NULL); etk_object_destroy(ETK_OBJECT(str)); } @@ -1468,10 +1505,10 @@ etk_box_append(ETK_BOX(hbox), UI_StateEntry, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0); //UI_StateIndexSpinner - UI_StateIndexSpinner = etk_spinner_new(0.0, 1.0, 0.0, 0.1, 1.0); - etk_spinner_digits_set(ETK_SPINNER(UI_StateIndexSpinner), 1); - etk_widget_size_request_set(UI_StateIndexSpinner,45, 20); - etk_box_append(ETK_BOX(hbox),UI_StateIndexSpinner, ETK_BOX_START, ETK_BOX_NONE, 0); + //~ UI_StateIndexSpinner = etk_spinner_new(0.0, 1.0, 0.0, 0.1, 1.0); + //~ etk_spinner_digits_set(ETK_SPINNER(UI_StateIndexSpinner), 1); + //~ etk_widget_size_request_set(UI_StateIndexSpinner,45, 20); + //~ etk_box_append(ETK_BOX(hbox),UI_StateIndexSpinner, ETK_BOX_START, ETK_BOX_NONE, 0); //hbox hbox = etk_hbox_new(ETK_FALSE, 0); @@ -1581,8 +1618,8 @@ etk_signal_connect("text-changed", ETK_OBJECT(UI_StateEntry), ETK_CALLBACK(on_StateEntry_text_changed), NULL); - etk_signal_connect("value-changed", ETK_OBJECT(UI_StateIndexSpinner), - ETK_CALLBACK(on_StateIndexSpinner_value_changed), NULL); +// etk_signal_connect("value-changed", ETK_OBJECT(UI_StateIndexSpinner), +// ETK_CALLBACK(on_StateIndexSpinner_value_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), @@ -2194,7 +2231,13 @@ //UI_SignalEntry label = etk_label_new("<b>Signal</b>"); etk_table_attach(ETK_TABLE(table), label, 0, 0, 2, 2,ETK_TABLE_NONE,0,0); - UI_SignalEntry = etk_entry_new(); + + UI_SignalEntry = etk_combobox_entry_new(); + etk_combobox_entry_column_add(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + ETK_COMBOBOX_ENTRY_IMAGE, 24, ETK_COMBOBOX_ENTRY_NONE, 0.0); + etk_combobox_entry_column_add(ETK_COMBOBOX_ENTRY(UI_SignalEntry), + ETK_COMBOBOX_ENTRY_LABEL, 75, ETK_COMBOBOX_ENTRY_EXPAND, 0.0); + etk_combobox_entry_build(ETK_COMBOBOX_ENTRY(UI_SignalEntry)); etk_tooltips_tip_set(UI_SignalEntry, "The name of the <b>signal</b> that will trigger the program.<br>Wildcards can be used to widen the scope, ex: \"mouse,down,*\"<br>Can be a mouse signal ( mouse,in ; mouse,up,1 )<br>Or a user defined signal (emitted by the application)"); etk_table_attach_default(ETK_TABLE(table),UI_SignalEntry, 1, 3, 2, 2); @@ -2289,7 +2332,7 @@ etk_table_attach_default(ETK_TABLE(table), UI_Param1Entry, 1, 2, 7, 7); //Param1Spinner - UI_Param1Spinner = etk_spinner_new(0.0, 1.0, 0.0, 0.1, 1.0); + UI_Param1Spinner = etk_spinner_new(-999.0, 999.0, 0.0, 0.1, 1.0); etk_tooltips_tip_set(UI_Param1Spinner, "Description to set in the specified targets"); etk_spinner_digits_set(ETK_SPINNER(UI_Param1Spinner), 2); etk_widget_size_request_set(UI_Param1Spinner,45, 20); @@ -2339,7 +2382,7 @@ etk_table_attach_default(ETK_TABLE(table), UI_Param2Entry, 1, 2, 9, 9); //Param2Spinner - UI_Param2Spinner = etk_spinner_new(0.0, 1.0, 0.0, 0.1, 1.0); + UI_Param2Spinner = etk_spinner_new(-999.0, 999.0, 0.0, 0.1, 1.0); etk_tooltips_tip_set(UI_Param2Spinner, "Used for drag operation"); etk_spinner_digits_set(ETK_SPINNER(UI_Param2Spinner), 2); etk_widget_size_request_set(UI_Param2Spinner,45, 20); @@ -2349,12 +2392,17 @@ ETK_CALLBACK(on_ActionComboBox_changed), NULL); etk_signal_connect("text-changed", ETK_OBJECT(UI_ProgramEntry), ETK_CALLBACK(on_ProgramEntry_text_changed), 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); etk_signal_connect("active-item-changed", ETK_OBJECT(UI_SourceEntry), ETK_CALLBACK(on_SourceEntry_item_changed), NULL); - etk_signal_connect("text-changed", ETK_OBJECT(UI_SignalEntry), - ETK_CALLBACK(on_SignalEntry_text_changed), NULL); + + etk_signal_connect("text-changed", ETK_OBJECT(etk_combobox_entry_entry_get(ETK_COMBOBOX_ENTRY(UI_SignalEntry))), + ETK_CALLBACK(on_SignalEntry_text_changed), UI_SignalEntry); + etk_signal_connect("active-item-changed", ETK_OBJECT(UI_SignalEntry), + ETK_CALLBACK(on_SignalEntry_item_changed), NULL); + etk_signal_connect("value-changed", ETK_OBJECT(UI_DelayFromSpinner), ETK_CALLBACK(on_DelaySpinners_value_changed),NULL); etk_signal_connect("value-changed", ETK_OBJECT(UI_DelayRangeSpinner), @@ -2373,6 +2421,9 @@ ETK_CALLBACK(on_AfterEntry_text_changed), NULL); etk_signal_connect("text-changed", ETK_OBJECT(UI_Param2Entry), ETK_CALLBACK(on_Param2Entry_text_changed), NULL); + etk_signal_connect("value-changed", ETK_OBJECT(UI_Param2Spinner), + ETK_CALLBACK(on_Param2Spinner_value_changed), NULL); + return table; } =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/interface.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- interface.h 16 Feb 2008 16:53:00 -0000 1.27 +++ interface.h 17 Feb 2008 21:39:18 -0000 1.28 @@ -45,7 +45,7 @@ Etk_Widget *UI_PartEventsRepeatCheck; /* state frame objects */ Etk_Widget *UI_StateEntry; -Etk_Widget *UI_StateIndexSpinner; +//Etk_Widget *UI_StateIndexSpinner; Etk_Widget *UI_StateMinWSpinner; Etk_Widget *UI_StateMinHSpinner; Etk_Widget *UI_StateMaxWSpinner; @@ -147,6 +147,9 @@ void PopulateImagesComboBox(void); void PopulateFontsComboBox(void); void PopulateSourceComboBox(void); +void PopulateTweenList(void); +void PopulateSourceComboEntry(void); +void PopulateSignalComboEntry(void); void UpdateGroupFrame(void); void UpdatePositionFrame(void); =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/main.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- main.c 16 Feb 2008 01:22:21 -0000 1.29 +++ main.c 17 Feb 2008 21:39:18 -0000 1.30 @@ -145,12 +145,15 @@ Cur.group = etk_string_set(Cur.group, group); Cur.part = etk_string_clear(Cur.part); Cur.state = etk_string_clear(Cur.state); + Cur.tween = etk_string_clear(Cur.tween); + Cur.prog = etk_string_clear(Cur.prog); + UpdateGroupFrame(); PopulateTree(); PopulateRelComboBoxes(); - - UpdateGroupFrame(); + PopulateSourceComboEntry(); + PopulateSignalComboEntry(); //update FakeWin title edje_object_part_text_set(EV_fakewin, "title", group); |