Enlightenment CVS committal
Author : lordchaos
Project : e17
Module : proto
Dir : e17/proto/entropy/src/dialogs
Modified Files:
etk_mime_dialog_main.c
Log Message:
* Populate the mime dialog
===================================================================
RCS file:
/cvsroot/enlightenment/e17/proto/entropy/src/dialogs/etk_mime_dialog_main.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- etk_mime_dialog_main.c 4 Mar 2006 01:40:02 -0000 1.1
+++ etk_mime_dialog_main.c 4 Mar 2006 01:55:06 -0000 1.2
@@ -7,6 +7,14 @@
Etk_Widget* tree = NULL;
Etk_Tree_Col* tree_col;
+ Etk_Tree_Col* col1;
+ Etk_Tree_Col* col2;
+
+
+ char* key;
+ entropy_mime_action* action;
+ Ecore_List* keys;
+
window = etk_window_new();
etk_window_title_set(ETK_WINDOW(window), "Program Associations");
@@ -18,17 +26,28 @@
tree = etk_tree_new();
etk_tree_mode_set(ETK_TREE(tree), ETK_TREE_MODE_LIST);
tree_col = etk_tree_col_new(ETK_TREE(tree), _("File Type"),
- etk_tree_model_text_new(ETK_TREE(tree)), 55);
- /*etk_tree_col_expand_set(tree_col, ETK_TRUE);*/
+ etk_tree_model_text_new(ETK_TREE(tree)), 125);
tree_col = etk_tree_col_new(ETK_TREE(tree), _("Executable"),
- etk_tree_model_text_new(ETK_TREE(tree)), 100);
+ etk_tree_model_text_new(ETK_TREE(tree)), 150);
etk_tree_col_expand_set(tree_col, ETK_TRUE);
etk_tree_build(ETK_TREE(tree));
etk_container_add(ETK_CONTAINER(window), tree);
+ /*Populate the tree*/
+ col1 = etk_tree_nth_col_get(ETK_TREE(tree), 0);
+ col2 = etk_tree_nth_col_get(ETK_TREE(tree), 1);
+
+ keys = ecore_hash_keys(entropy_core_get_core()->mime_action_hint);
+ while ((key = ecore_list_remove_first(keys))) {
+ etk_tree_append(ETK_TREE(tree),
+ col1, key,
+ col2,
((entropy_mime_action*)ecore_hash_get(entropy_core_get_core()->mime_action_hint,
key))->executable,
+ NULL);
+ }
+
etk_widget_show_all(window);
}
-------------------------------------------------------
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