Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_int_config_apps.c 


Log Message:
*Double clicking on the left fm items opens up the eap editor for that item.
    Only shows icon here, but that may be due to un committed changes I have 
here.
    Seems that symlinks are not handeld that well be parts of E.  I'll be 
debuggitng that soon

*Added in more non functional buttons.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_apps.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_int_config_apps.c 28 Aug 2006 11:49:17 -0000      1.2
+++ e_int_config_apps.c 30 Aug 2006 03:47:43 -0000      1.3
@@ -9,7 +9,7 @@
 /* TODO:
  * DND from left side to righ side, and to ibar etc.
  * Double click or fm menu of eap/.desktop brings up eap editor.
- * FDO menu generation should put symlinks to .desktops in /all/,
+ * FDO menu generation puts symlinks to .desktops in /all/,
  *   if we edit one of those, replace symlink with resulting .desktop, 
  *   include original path in new .desktop.
  * Display contents of .order files on right side.
@@ -33,7 +33,10 @@
       Evas_Object *o_fm;
       Evas_Object *o_frame;
       Evas_Object *o_up_button;
+      Evas_Object *o_add_button;
       Evas_Object *o_create_button;
+      Evas_Object *o_delete_left_button;
+      Evas_Object *o_delete_right_button;
       Evas_Object *o_regen_button;
    } gui;
 };
@@ -126,11 +129,49 @@
 }
 
 static void
-_cb_button_delete(void *data1, void *data2)
+_cb_files_selected(void *data, Evas_Object *obj, void *event_info)
+{
+   E_Config_Dialog_Data *cfdata;
+   Evas_List *selected;
+   E_Fm2_Icon_Info *ici;
+   const char *realpath;
+   char buf[4096];
+   E_App *a;
+   
+   cfdata = data;
+   if (!cfdata->gui.o_fm_all) return;
+   selected = e_fm2_selected_list_get(cfdata->gui.o_fm_all);
+   if (!selected) return;
+   ici = selected->data;
+   realpath = e_fm2_real_path_get(cfdata->gui.o_fm_all);
+   if (!strcmp(realpath, "/"))
+     snprintf(buf, sizeof(buf), "/%s", ici->file);
+   else
+     snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file);
+   evas_list_free(selected);
+   if (ecore_file_is_dir(buf)) return;
+   a = e_app_empty_new(buf);
+   if (a)
+      e_eap_edit_show(cfdata->cfd->con, a);
+}
+
+static void
+_cb_button_delete_left(void *data1, void *data2)
+{
+}
+
+static void
+_cb_button_delete_right(void *data1, void *data2)
 {
 }
 
 static void
+_cb_button_add(void *data1, void *data2)
+{
+   e_fdo_menu_to_order();
+}
+
+static void
 _cb_button_regen(void *data1, void *data2)
 {
    e_fdo_menu_to_order();
@@ -179,6 +220,8 @@
    fmc_all.selection.single = 1;
    fmc_all.selection.windows_modifiers = 0;
    e_fm2_config_set(mt, &fmc_all);
+   evas_object_smart_callback_add(mt, "selected",
+                                 _cb_files_selected, cfdata);
    snprintf(path_all, sizeof(path_all), "%s/.e/e/applications/all", homedir);
    e_fm2_path_set(cfdata->gui.o_fm_all, path_all, "/");
 
@@ -191,9 +234,14 @@
    e_widget_min_size_set(ob, 150, 220);
    e_widget_framelist_object_append(of, ob);
 
+   mt = e_widget_button_add(evas, _("Add application ->"), "enlightenment/e",
+                          _cb_button_add, cfdata, NULL);
+   cfdata->gui.o_add_button = mt;
+   e_widget_framelist_object_append(of, mt);
+
    mt = e_widget_button_add(evas, _("Delete application"), "enlightenment/e",
-                          _cb_button_delete, cfdata, NULL);
-   cfdata->gui.o_create_button = mt;
+                          _cb_button_delete_left, cfdata, NULL);
+   cfdata->gui.o_delete_left_button = mt;
    e_widget_framelist_object_append(of, mt);
 
    e_widget_table_object_append(ot, of, 0, 0, 2, 4, 1, 1, 1, 1);
@@ -240,6 +288,10 @@
    e_widget_min_size_set(ob, 150, 220);
    e_widget_framelist_object_append(of, ob);
 
+   mt = e_widget_button_add(evas, _("Remove application"), "enlightenment/e",
+                          _cb_button_delete_right, cfdata, NULL);
+   cfdata->gui.o_delete_right_button = mt;
+   e_widget_framelist_object_append(of, mt);
 
    mt = e_widget_button_add(evas, _("Regenerate \"All Applications\" Menu"), 
"enlightenment/e",
                           _cb_button_regen, cfdata, NULL);



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to