[E-devel] PATCH: button for executable selection with efm in .desktop file editor

2007-06-29 Thread Brian 'morlenxus' Miculcy
This patch adds an extra button to the .desktop file editor which allows
to select an executable file using the file selection dialog.
People will like it i guess. :)

Greets,
Brian 'morlenxus' Miculcy
Index: e_eap_editor.c
===
RCS file: /var/cvs/e/e17/apps/e/src/bin/e_eap_editor.c,v
retrieving revision 1.83
diff -u -r1.83 e_eap_editor.c
--- e_eap_editor.c  19 May 2007 03:29:08 -  1.83
+++ e_eap_editor.c  29 Jun 2007 13:40:56 -
@@ -36,10 +36,16 @@
 static Evas_Object   *_e_desktop_edit_basic_create_widgets(E_Config_Dialog 
*cfd, Evas *evas, E_Config_Dialog_Data *data);
 static Evas_Object   *_e_desktop_edit_advanced_create_widgets(E_Config_Dialog 
*cfd, Evas *evas, E_Config_Dialog_Data *data);
 static void   _e_desktop_editor_cb_icon_select(void *data1, void 
*data2);
-static void   _e_desktop_edit_select_cb(void *data, Evas_Object *obj);
+static void   _e_desktop_edit_cb_icon_select_destroy(void *obj);
 static void   _e_desktop_edit_cb_icon_select_ok(void *data, E_Dialog 
*dia);
 static void   _e_desktop_edit_cb_icon_select_cancel(void *data, 
E_Dialog *dia);
 static void   _e_desktop_editor_icon_update(E_Config_Dialog_Data 
*cfdata);
+static void   _e_desktop_editor_cb_exec_select(void *data1, void 
*data2);
+static void   _e_desktop_edit_cb_exec_select_destroy(void *obj);
+static void   _e_desktop_edit_cb_exec_select_ok(void *data, E_Dialog 
*dia);
+static void   _e_desktop_edit_cb_exec_select_cancel(void *data, 
E_Dialog *dia);
+static void   _e_desktop_editor_exec_update(E_Config_Dialog_Data 
*cfdata);
+static void   _e_desktop_edit_select_cb(void *data, Evas_Object *obj);
 
 #define IFADD(src, dst) if (src) dst = evas_stringshare_add(src); else dst = 
NULL
 #define IFDEL(src) if (src) evas_stringshare_del(src);  src = NULL;
@@ -465,10 +471,14 @@
e_widget_frametable_object_append(o, e_widget_label_add(evas, 
_("Executable")),
 0, 1, 1, 1,
 1, 1, 1, 1);
-   e_widget_frametable_object_append(o, e_widget_entry_add(evas, 
&(cfdata->exec)),
+   editor->entry_widget = e_widget_entry_add(evas, &(cfdata->exec));
+   e_widget_frametable_object_append(o, editor->entry_widget,
 1, 1, 1, 1,
 1, 1, 1, 1);
-
+   e_widget_frametable_object_append(o, e_widget_button_add(evas, "...", NULL,
+_e_desktop_editor_cb_exec_select, cfdata, 
editor),
+2, 1, 1, 1,
+1, 1, 1, 1);
e_widget_frametable_object_append(o, e_widget_label_add(evas, _("Comment")),
 0, 2, 1, 1,
 1, 1, 1, 1);
@@ -563,10 +573,11 @@
editor = data2;
cfdata = data1;
 
-   if (editor->fsel_dia) return;
+   if (editor->icon_fsel_dia) return;
 
dia = e_dialog_new(cfdata->editor->cfd->con, "E", 
"_eap_icon_select_dialog");
if (!dia) return;
+   e_object_del_attach_func_set(E_OBJECT(dia), 
_e_desktop_edit_cb_icon_select_destroy);
e_dialog_title_set(dia, _("Select an Icon"));
dia->data = cfdata;
 
@@ -591,7 +602,7 @@
  }

evas_object_show(o);
-   editor->fsel = o;
+   editor->icon_fsel = o;
e_widget_min_size_get(o, &mw, &mh);
e_dialog_content_set(dia, o, mw, mh);
 
@@ -602,7 +613,61 @@
e_win_centered_set(dia->win, 1);
e_dialog_show(dia);
e_win_resize(dia->win, 475, 341);
-   editor->fsel_dia = dia;
+   editor->icon_fsel_dia = dia;
+}
+
+static void
+_e_desktop_editor_cb_exec_select(void *data1, void *data2)
+{
+   E_Config_Dialog_Data *cfdata;
+   E_Dialog *dia;
+   Evas_Object *o;
+   Evas_Coord mw, mh;
+   E_Desktop_Edit *editor;
+   char *dir = NULL;
+
+   editor = data2;
+   cfdata = data1;
+
+   if (editor->exec_fsel_dia) return;
+
+   dia = e_dialog_new(cfdata->editor->cfd->con, "E", 
"_eap_exec_select_dialog");
+   if (!dia) return;
+   e_object_del_attach_func_set(E_OBJECT(dia), 
_e_desktop_edit_cb_exec_select_destroy);
+   e_dialog_title_set(dia, _("Select an Executable"));
+   dia->data = cfdata;
+
+   /* absolute path to exe */
+   if (cfdata->exec) 
+ dir = ecore_file_get_dir(cfdata->exec);
+
+   if (dir)
+ {
+   o = e_widget_fsel_add(dia->win->evas, dir, "/", NULL, NULL,
+ _e_desktop_edit_select_cb, cfdata,
+ NULL, cfdata, 1);
+   free(dir);
+ }
+   else
+ {
+   o = e_widget_fsel_add(dia->win->evas, "~/", "/", NULL, NULL,
+ _e_desktop_edit_select_cb, cfdata,
+ NULL, cfdata, 1);
+ }
+   
+   evas_object_show(o);
+   editor->exec_fsel = o;
+   e_widget_min_size_get(o, &mw, &mh);
+   e_dialog_content_set(dia, o, mw, mh);
+
+   /* buttons at the bottom */
+   e_dialog_button_add(dia, _("OK"), NULL, _e_desktop_edit_cb_exec_

Re: [E-devel] [PATCH] e_utils missing -lecore_file

2007-06-29 Thread Christopher Michael
Christian Wiese wrote:
> Sorry ... forgot to attach the patch the first time ;)
> 
> Hi folks,
> 
> while building e_utils today I discovered that e_utils failed because
> of undefined references to 'ecore_file_get_file' linking e17setroot,
> because it is not linked using '-lecore_file'.
> 
> Funny thing is that it build nicely with a CVS snapshot from 2007-06-22
> so maybe some side effects have been introduced by other changes since
> then, causing the problem.
> 
> The attached patch seems to solve the build problem, but any comment is
> highly appreciated.
> 
> Cheers,
> Chris
> 
Thanks, in cvs :)

devilhorns

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] download.enlightenment.org - Feature request

2007-06-29 Thread Albin Tonnerre
 +1. that would be life-saving for the debian packages as well. btw, thank
you guys for putting that on, it's awesome

Albin
-- 
Albin Tonnerre, aka Lutin
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: proto chaos

2007-06-29 Thread Hisham Mardam Bey
On 6/29/07, Gustavo Sverzut Barbieri <[EMAIL PROTECTED]> wrote:
>
> imo this should be changed to int and enums.

This is something a couple of us discussed on irc the other day, and I
do agree that it should be moved in that direction.

-- 
Hisham Mardam Bey
http://hisham.cc/
+9613609386
Codito Ergo Sum (I Code Therefore I Am)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] download.enlightenment.org - Feature request

2007-06-29 Thread Massimiliano Calamelli
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm very happy to see that we have a tarballs more recents than fdo.org
It simplifies my work with buildroot, now i can download directly from
internet the packages without packaging by hand cvs sources.
Here's my request: under snapshots/ i find two (atm) dirs
date-related, so i've to set this path "hardcoded" into buildroot .mk

For example, eet:
http://download.enlightenment.org/snapshots/2007-06-17/eet-0.9.10.039.tar.gz

It will more useful the presence of a symlink called "latest" that
points to the newest directory.

Thanks
Massimiliano
- -- 
Massimiliano Calamelli
http://mcalamelli.netsons.org
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.4 (MingW32)

iD8DBQFGhLvLleGEL56NNP4RAntqAJ9YoeEUYmHdOpvSD00Coy/5BdghCwCfQokq
QnUiwgxeN6huyQcnVHUI0AA=
=q4Cn
-END PGP SIGNATURE-

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel