Enlightenment CVS committal
Author : lordchaos
Project : e17
Module : proto
Dir : e17/proto/entropy/src/plugins
Modified Files:
layout_etk_simple.c layout_ewl_simple.c
Log Message:
* Migrate standard location structures and associated API to EET config. Much
easier
to deal with :)
===================================================================
RCS file:
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/layout_etk_simple.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- layout_etk_simple.c 19 Mar 2006 00:35:26 -0000 1.29
+++ layout_etk_simple.c 20 Mar 2006 11:58:56 -0000 1.30
@@ -268,9 +268,8 @@
Etk_Widget* menu_item;
Etk_Widget* menu;
-
- Ecore_List* config_hash_keys;
- char *tmp,*key;
+ Evas_List* structures;
+ Entropy_Config_Structure* structure;
/*Entropy related init */
layout = entropy_malloc (sizeof (entropy_gui_component_instance));
/*Create a component instance */
@@ -373,27 +372,13 @@
gui->toplevel_row_entries = ecore_hash_new(ecore_direct_hash,
ecore_direct_compare);
- /*Config load*/
- if (!(tmp = entropy_config_str_get ("layout_ewl_simple", "structure_bar"))) {
- entropy_config_standard_structures_create ();
- tmp = entropy_config_str_get ("layout_ewl_simple", "structure_bar");
- }
-
- printf ("Config for layout is: '%s' (%d)\n", tmp, strlen (tmp));
-
- gui->config_hash = entropy_config_standard_structures_parse (layout, tmp);
- config_hash_keys = ecore_hash_keys(gui->config_hash);
- while ( (key = ecore_list_remove_first(config_hash_keys))) {
- char* uri = ecore_hash_get(gui->config_hash, key);
- layout_etk_simple_add_header (layout, key, uri);
+ for (structures = entropy_config_standard_structures_parse (layout, NULL);
structures; ) {
+ structure = structures->data;
- free(key);
- free(uri);
+ layout_etk_simple_add_header (layout, structure->name,
structure->uri);
+
+ structures = structures->next;
}
- ecore_list_destroy(config_hash_keys);
-
- entropy_free (tmp);
-
/*Initialise the list view*/
local =
entropy_plugins_type_get_first(ENTROPY_PLUGIN_GUI_COMPONENT,ENTROPY_PLUGIN_GUI_COMPONENT_LOCAL_VIEW);
===================================================================
RCS file:
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/layout_ewl_simple.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- layout_ewl_simple.c 2 Mar 2006 07:45:27 -0000 1.51
+++ layout_ewl_simple.c 20 Mar 2006 11:58:56 -0000 1.52
@@ -123,33 +123,6 @@
}
-void
-structure_configure_cb (Ewl_Widget * item, void *ev_data, void *user_data)
-{
- Ewl_Widget *parent = item;
- entropy_gui_component_instance *instance = user_data;
- entropy_layout_gui *layout = instance->data;
-
- /*printf("Structure configutre..%p\nHierarchy: ", item);
- while (parent->parent) {
- printf("'%s' : ", parent->inheritance);
- if (VISIBLE(parent))
- printf("VISIBLE ");
- else
- printf("INVISIBLE ");
-
- if (OBSCURED(parent))
- printf("OBSCURED \n");
- else
- printf("UNOBSC \n");
-
-
- parent = parent->parent;
- }
- printf("\n");
- printf("\n\n"); */
-}
-
/*TODO/FIXME - This needs a rewrite, to be dynamic, and wizard-based*/
void
location_add_execute_cb (Ewl_Widget * item, void *ev_data, void *user_data)
@@ -553,9 +526,6 @@
ewl_container_child_append (EWL_CONTAINER (hbox), visual);
ewl_object_fill_policy_set (EWL_OBJECT (visual), EWL_FLAG_FILL_HFILL);
- ewl_callback_append (visual, EWL_CALLBACK_CONFIGURE,
- structure_configure_cb, instance);
-
ewl_widget_show (visual);
}
}
@@ -719,7 +689,6 @@
{
entropy_gui_component_instance *layout;
entropy_layout_gui *gui;
- char *tmp = NULL;
_ewl_layout_count++;
@@ -738,10 +707,9 @@
Ewl_Widget *menubar;
Ewl_Widget *menu;
Ewl_Widget *item;
-
- Ecore_Hash *config_hash;
- Ecore_List *config_hash_keys;
- char* key;
+
+ Evas_List* structures;
+ Entropy_Config_Structure* structure;
Ecore_List *local_plugins;
entropy_gui_component_instance *instance;
@@ -984,27 +952,15 @@
gui->local_container);
ewl_container_child_append (EWL_CONTAINER (gui->local_container), iconbox);
- if (!(tmp = entropy_config_str_get ("layout_ewl_simple", "structure_bar"))) {
- entropy_config_standard_structures_create ();
- tmp = entropy_config_str_get ("layout_ewl_simple", "structure_bar");
- }
-
- printf ("Config for layout is: '%s' (%d)\n", tmp, strlen (tmp));
-
- config_hash = entropy_config_standard_structures_parse (layout, tmp);
- config_hash_keys = ecore_hash_keys(config_hash);
- while ( (key = ecore_list_remove_first(config_hash_keys))) {
- char* uri = ecore_hash_get(config_hash, key);
- layout_ewl_simple_add_header (layout, key, uri);
+ /*Add the loaded structure headers*/
+ for (structures = entropy_config_standard_structures_parse (layout, NULL);
structures; ) {
+ structure = structures->data;
- ecore_hash_remove(config_hash, key);
- free(key);
- free(uri);
+ layout_ewl_simple_add_header (layout, structure->name,
structure->uri);
+
+ structures = structures->next;
}
- ecore_list_destroy(config_hash_keys);
- ecore_hash_destroy(config_hash);
-
- entropy_free (tmp);
+
ewl_widget_show (box);
ewl_widget_show (vbox);
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs