2006-04-20 04:30:25 -07:00
|
|
|
#include "e.h"
|
2005-12-12 20:47:41 -08:00
|
|
|
#include "e_mod_main.h"
|
|
|
|
|
2006-01-14 08:10:57 -08:00
|
|
|
struct _E_Config_Dialog_Data
|
2005-12-12 20:47:41 -08:00
|
|
|
{
|
2009-03-11 08:13:42 -07:00
|
|
|
const char *dir;
|
2009-05-19 15:53:46 -07:00
|
|
|
int show_label, eap_label;
|
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
Evas_Object *tlist;
|
2006-06-04 02:29:15 -07:00
|
|
|
Evas_Object *radio_name;
|
|
|
|
Evas_Object *radio_comment;
|
|
|
|
Evas_Object *radio_generic;
|
2007-04-30 16:08:06 -07:00
|
|
|
E_Confirm_Dialog *dialog_delete;
|
2005-12-12 20:47:41 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Protos */
|
|
|
|
static void *_create_data(E_Config_Dialog *cfd);
|
2006-01-14 08:10:57 -08:00
|
|
|
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
|
|
|
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
|
|
|
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
2006-06-02 12:09:08 -07:00
|
|
|
static void _cb_add(void *data, void *data2);
|
|
|
|
static void _cb_del(void *data, void *data2);
|
2007-01-22 11:55:18 -08:00
|
|
|
static void _cb_config(void *data, void *data2);
|
2006-06-02 12:09:08 -07:00
|
|
|
static void _cb_entry_ok(char *text, void *data);
|
|
|
|
static void _cb_confirm_dialog_yes(void *data);
|
2007-04-30 16:08:06 -07:00
|
|
|
static void _cb_confirm_dialog_destroy(void *data);
|
2006-06-02 12:09:08 -07:00
|
|
|
static void _load_tlist(E_Config_Dialog_Data *cfdata);
|
2006-06-04 02:29:15 -07:00
|
|
|
static void _show_label_cb_change(void *data, Evas_Object *obj);
|
2005-12-12 20:47:41 -08:00
|
|
|
|
2005-12-17 22:33:14 -08:00
|
|
|
void
|
2006-04-20 04:30:25 -07:00
|
|
|
_config_ibar_module(Config_Item *ci)
|
2005-12-12 20:47:41 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog *cfd;
|
2006-01-22 06:17:43 -08:00
|
|
|
E_Config_Dialog_View *v;
|
2006-07-03 00:35:44 -07:00
|
|
|
char buf[4096];
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-01-22 06:17:43 -08:00
|
|
|
v = E_NEW(E_Config_Dialog_View, 1);
|
2006-04-20 04:30:25 -07:00
|
|
|
|
2005-12-12 20:47:41 -08:00
|
|
|
/* Dialog Methods */
|
2006-01-22 06:17:43 -08:00
|
|
|
v->create_cfdata = _create_data;
|
|
|
|
v->free_cfdata = _free_data;
|
|
|
|
v->basic.apply_cfdata = _basic_apply_data;
|
|
|
|
v->basic.create_widgets = _basic_create_widgets;
|
2006-04-20 04:30:25 -07:00
|
|
|
v->advanced.apply_cfdata = NULL;
|
|
|
|
v->advanced.create_widgets = NULL;
|
2006-07-03 00:35:44 -07:00
|
|
|
|
2009-05-19 15:53:46 -07:00
|
|
|
snprintf(buf, sizeof(buf), "%s/e-module-ibar.edj",
|
|
|
|
e_module_dir_get(ibar_config->module));
|
|
|
|
|
2005-12-12 20:47:41 -08:00
|
|
|
/* Create The Dialog */
|
2006-04-20 04:30:25 -07:00
|
|
|
cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()),
|
2008-11-22 00:42:54 -08:00
|
|
|
_("IBar Settings"),
|
2006-08-14 08:22:46 -07:00
|
|
|
"E", "_e_mod_ibar_config_dialog",
|
|
|
|
buf, 0, v, ci);
|
2006-04-20 04:30:25 -07:00
|
|
|
ibar_config->config_dialog = cfd;
|
2005-12-12 20:47:41 -08:00
|
|
|
}
|
|
|
|
|
2005-12-17 22:33:14 -08:00
|
|
|
static void
|
2006-04-20 04:30:25 -07:00
|
|
|
_fill_data(Config_Item *ci, E_Config_Dialog_Data *cfdata)
|
2005-12-12 20:47:41 -08:00
|
|
|
{
|
2006-04-20 04:30:25 -07:00
|
|
|
if (ci->dir)
|
2009-03-11 08:13:42 -07:00
|
|
|
cfdata->dir = eina_stringshare_ref(ci->dir);
|
2006-04-20 04:30:25 -07:00
|
|
|
else
|
2009-03-11 08:13:42 -07:00
|
|
|
cfdata->dir = eina_stringshare_add("");
|
2006-05-10 00:42:39 -07:00
|
|
|
cfdata->show_label = ci->show_label;
|
2006-06-02 12:09:08 -07:00
|
|
|
cfdata->eap_label = ci->eap_label;
|
2005-12-12 20:47:41 -08:00
|
|
|
}
|
|
|
|
|
2006-01-08 00:12:39 -08:00
|
|
|
static void *
|
|
|
|
_create_data(E_Config_Dialog *cfd)
|
2005-12-12 20:47:41 -08:00
|
|
|
{
|
2006-01-14 08:10:57 -08:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
2006-04-20 04:30:25 -07:00
|
|
|
Config_Item *ci;
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-04-20 04:30:25 -07:00
|
|
|
ci = cfd->data;
|
2006-01-14 08:10:57 -08:00
|
|
|
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
2006-04-20 04:30:25 -07:00
|
|
|
_fill_data(ci, cfdata);
|
2005-12-12 20:47:41 -08:00
|
|
|
return cfdata;
|
|
|
|
}
|
|
|
|
|
2005-12-17 22:33:14 -08:00
|
|
|
static void
|
2010-08-18 17:00:56 -07:00
|
|
|
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
2005-12-12 20:47:41 -08:00
|
|
|
{
|
2009-03-11 08:13:42 -07:00
|
|
|
if (cfdata->dir) eina_stringshare_del(cfdata->dir);
|
2007-04-30 16:09:33 -07:00
|
|
|
if (cfdata->dialog_delete) e_object_del(E_OBJECT(cfdata->dialog_delete));
|
2006-04-20 04:30:25 -07:00
|
|
|
ibar_config->config_dialog = NULL;
|
2007-01-22 11:55:18 -08:00
|
|
|
E_FREE(cfdata);
|
2005-12-12 20:47:41 -08:00
|
|
|
}
|
|
|
|
|
2006-01-08 00:12:39 -08:00
|
|
|
static Evas_Object *
|
2010-08-18 17:00:56 -07:00
|
|
|
_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
|
2005-12-12 20:47:41 -08:00
|
|
|
{
|
2006-06-02 12:09:08 -07:00
|
|
|
Evas_Object *o, *of, *ol, *ob, *ot;
|
|
|
|
E_Radio_Group *rg;
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-05-10 00:42:39 -07:00
|
|
|
o = e_widget_list_add(evas, 0, 0);
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
of = e_widget_frametable_add(evas, _("Selected Bar Source"), 0);
|
2008-10-17 22:21:05 -07:00
|
|
|
ol = e_widget_ilist_add(evas, 32, 32, &(cfdata->dir));
|
2006-06-02 12:09:08 -07:00
|
|
|
cfdata->tlist = ol;
|
|
|
|
_load_tlist(cfdata);
|
2009-09-01 06:34:42 -07:00
|
|
|
e_widget_size_min_set(ol, 140, 140);
|
2006-06-04 02:29:15 -07:00
|
|
|
e_widget_frametable_object_append(of, ol, 0, 0, 1, 2, 1, 1, 1, 0);
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-06-04 02:29:15 -07:00
|
|
|
ot = e_widget_table_add(evas, 0);
|
2009-03-06 11:17:12 -08:00
|
|
|
ob = e_widget_button_add(evas, _("Add"), "list-add", _cb_add, cfdata, NULL);
|
2006-06-04 02:29:15 -07:00
|
|
|
e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 1, 1, 0);
|
2009-03-06 11:17:12 -08:00
|
|
|
ob = e_widget_button_add(evas, _("Delete"), "list-remove", _cb_del, cfdata, NULL);
|
2006-06-04 02:29:15 -07:00
|
|
|
e_widget_table_object_append(ot, ob, 0, 1, 1, 1, 1, 1, 1, 0);
|
2009-04-06 14:22:12 -07:00
|
|
|
ob = e_widget_button_add(evas, _("Setup"), "configure", _cb_config, cfdata, NULL);
|
2007-08-03 17:20:54 -07:00
|
|
|
e_widget_table_object_append(ot, ob, 0, 2, 1, 1, 1, 1, 1, 0);
|
|
|
|
|
|
|
|
if (!e_configure_registry_exists("applications/ibar_applications"))
|
|
|
|
e_widget_disabled_set(ob, 1);
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-06-04 02:29:15 -07:00
|
|
|
e_widget_frametable_object_append(of, ot, 1, 0, 1, 1, 1, 1, 1, 0);
|
|
|
|
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
of = e_widget_framelist_add(evas, _("Icon Labels"), 0);
|
|
|
|
ob = e_widget_check_add(evas, _("Show Icon Label"), &(cfdata->show_label));
|
2006-06-04 02:29:15 -07:00
|
|
|
e_widget_on_change_hook_set(ob, _show_label_cb_change, cfdata);
|
2006-06-02 12:09:08 -07:00
|
|
|
e_widget_framelist_object_append(of, ob);
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
rg = e_widget_radio_group_new(&(cfdata->eap_label));
|
2006-06-04 02:29:15 -07:00
|
|
|
|
2006-11-19 00:58:05 -08:00
|
|
|
cfdata->radio_name = e_widget_radio_add(evas, _("Display App Name"), 0, rg);
|
2006-06-04 02:29:15 -07:00
|
|
|
e_widget_framelist_object_append(of, cfdata->radio_name);
|
|
|
|
if (!cfdata->show_label) e_widget_disabled_set(cfdata->radio_name, 1);
|
|
|
|
|
2006-11-19 00:58:05 -08:00
|
|
|
cfdata->radio_comment = e_widget_radio_add(evas, _("Display App Comment"), 1, rg);
|
2006-06-04 02:29:15 -07:00
|
|
|
e_widget_framelist_object_append(of, cfdata->radio_comment);
|
|
|
|
if (!cfdata->show_label) e_widget_disabled_set(cfdata->radio_comment, 1);
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-11-19 00:58:05 -08:00
|
|
|
cfdata->radio_generic = e_widget_radio_add(evas, _("Display App Generic"), 2, rg);
|
2006-06-04 02:29:15 -07:00
|
|
|
e_widget_framelist_object_append(of, cfdata->radio_generic);
|
|
|
|
if (!cfdata->show_label) e_widget_disabled_set(cfdata->radio_generic, 1);
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
|
|
|
return o;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|
|
|
{
|
|
|
|
Config_Item *ci;
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
ci = cfd->data;
|
2008-10-15 08:12:56 -07:00
|
|
|
if (ci->dir) eina_stringshare_del(ci->dir);
|
2006-06-02 12:09:08 -07:00
|
|
|
ci->dir = NULL;
|
2009-03-11 08:13:42 -07:00
|
|
|
if (cfdata->dir) ci->dir = eina_stringshare_ref(cfdata->dir);
|
2006-06-02 12:09:08 -07:00
|
|
|
ci->show_label = cfdata->show_label;
|
|
|
|
ci->eap_label = cfdata->eap_label;
|
2007-09-15 17:02:53 -07:00
|
|
|
_ibar_config_update(ci);
|
2006-06-02 12:09:08 -07:00
|
|
|
e_config_save_queue();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2010-08-18 17:00:56 -07:00
|
|
|
_cb_add(void *data, void *data2 __UNUSED__)
|
2006-06-02 12:09:08 -07:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
cfdata = data;
|
2009-03-15 10:41:46 -07:00
|
|
|
e_entry_dialog_show(_("Create new IBar source"), "enlightenment",
|
2006-11-19 00:58:05 -08:00
|
|
|
_("Enter a name for this new source:"), "", NULL, NULL,
|
2006-06-02 12:09:08 -07:00
|
|
|
_cb_entry_ok, NULL, cfdata);
|
|
|
|
}
|
2005-12-12 20:47:41 -08:00
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
static void
|
2010-08-18 17:00:56 -07:00
|
|
|
_cb_del(void *data, void *data2 __UNUSED__)
|
2006-06-02 12:09:08 -07:00
|
|
|
{
|
|
|
|
char buf[4096];
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2007-04-30 16:08:06 -07:00
|
|
|
E_Confirm_Dialog *dialog;
|
|
|
|
|
|
|
|
cfdata = data;
|
2009-05-19 15:53:46 -07:00
|
|
|
if (cfdata->dialog_delete) return;
|
2007-04-30 16:08:06 -07:00
|
|
|
|
2007-01-22 11:55:18 -08:00
|
|
|
snprintf(buf, sizeof(buf), _("You requested to delete \"%s\".<br><br>"
|
2006-06-02 12:09:08 -07:00
|
|
|
"Are you sure you want to delete this bar source?"),
|
|
|
|
cfdata->dir);
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2007-04-30 16:08:06 -07:00
|
|
|
dialog = e_confirm_dialog_show(_("Are you sure you want to delete this bar source?"),
|
2009-03-06 14:18:15 -08:00
|
|
|
"application-exit", buf, NULL, NULL,
|
2009-05-19 15:53:46 -07:00
|
|
|
_cb_confirm_dialog_yes, NULL, cfdata, NULL,
|
|
|
|
_cb_confirm_dialog_destroy, cfdata);
|
2007-04-30 16:08:06 -07:00
|
|
|
cfdata->dialog_delete = dialog;
|
2007-01-22 11:55:18 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2010-08-18 17:00:56 -07:00
|
|
|
_cb_config(void *data, void *data2 __UNUSED__)
|
2007-01-22 11:55:18 -08:00
|
|
|
{
|
2007-07-04 04:11:03 -07:00
|
|
|
char path[PATH_MAX];
|
2007-01-22 11:55:18 -08:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2007-01-22 11:55:18 -08:00
|
|
|
cfdata = data;
|
2009-05-19 15:53:46 -07:00
|
|
|
e_user_dir_snprintf(path, sizeof(path), "applications/bar/%s/.order",
|
|
|
|
cfdata->dir);
|
2007-07-04 04:11:03 -07:00
|
|
|
e_configure_registry_call("internal/ibar_other",
|
|
|
|
e_container_current_get(e_manager_current_get()),
|
|
|
|
path);
|
2006-06-02 12:09:08 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_cb_entry_ok(char *text, void *data)
|
|
|
|
{
|
|
|
|
char buf[4096];
|
|
|
|
char tmp[4096];
|
|
|
|
FILE *f;
|
2009-04-13 07:56:38 -07:00
|
|
|
size_t len;
|
2006-06-02 12:09:08 -07:00
|
|
|
|
2009-04-13 07:56:38 -07:00
|
|
|
len = e_user_dir_snprintf(buf, sizeof(buf), "applications/bar/%s", text);
|
|
|
|
if (len + sizeof("/.order") >= sizeof(buf)) return;
|
|
|
|
if (!ecore_file_exists(buf))
|
2006-06-02 12:09:08 -07:00
|
|
|
{
|
|
|
|
ecore_file_mkdir(buf);
|
2009-04-13 07:56:38 -07:00
|
|
|
memcpy(buf + len, "/.order", sizeof("/.order"));
|
2006-06-02 12:09:08 -07:00
|
|
|
f = fopen(buf, "w");
|
2009-04-13 07:56:38 -07:00
|
|
|
if (f)
|
2006-06-02 12:09:08 -07:00
|
|
|
{
|
|
|
|
/* Populate this .order file with some defaults */
|
2007-01-04 04:44:20 -08:00
|
|
|
snprintf(tmp, sizeof(tmp), "xterm.desktop\n" "sylpheed.desktop\n"
|
|
|
|
"firefox.desktop\n" "openoffice.desktop\n" "xchat.desktop\n"
|
|
|
|
"gimp.desktop\n" "xmms.desktop\n");
|
2006-06-02 12:09:08 -07:00
|
|
|
fwrite(tmp, sizeof(char), strlen(tmp), f);
|
|
|
|
fclose(f);
|
|
|
|
}
|
|
|
|
}
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
_load_tlist(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_cb_confirm_dialog_yes(void *data)
|
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
|
|
|
char buf[4096];
|
2009-04-13 07:56:38 -07:00
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
cfdata = data;
|
2009-04-13 07:56:38 -07:00
|
|
|
if (e_user_dir_snprintf(buf, sizeof(buf), "applications/bar/%s", cfdata->dir) >= sizeof(buf))
|
|
|
|
return;
|
2006-06-02 12:09:08 -07:00
|
|
|
if (ecore_file_is_dir(buf))
|
|
|
|
ecore_file_recursive_rm(buf);
|
2009-04-13 07:56:38 -07:00
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
_load_tlist(cfdata);
|
|
|
|
}
|
|
|
|
|
2007-04-30 16:08:06 -07:00
|
|
|
static void
|
|
|
|
_cb_confirm_dialog_destroy(void *data)
|
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2007-04-30 16:08:06 -07:00
|
|
|
cfdata = data;
|
|
|
|
cfdata->dialog_delete = NULL;
|
|
|
|
}
|
|
|
|
|
2006-06-02 12:09:08 -07:00
|
|
|
static void
|
|
|
|
_load_tlist(E_Config_Dialog_Data *cfdata)
|
|
|
|
{
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
Eina_List *dirs;
|
2006-09-22 12:55:11 -07:00
|
|
|
char buf[4096], *file;
|
2006-06-02 12:09:08 -07:00
|
|
|
int selnum = -1;
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
int i = 0;
|
2009-04-13 07:56:38 -07:00
|
|
|
size_t len;
|
2006-06-02 12:09:08 -07:00
|
|
|
|
2008-10-17 22:21:05 -07:00
|
|
|
e_widget_ilist_clear(cfdata->tlist);
|
2009-04-13 07:56:38 -07:00
|
|
|
|
|
|
|
len = e_user_dir_concat_static(buf, "applications/bar");
|
|
|
|
if (len + 2 >= sizeof(buf)) return;
|
2006-04-20 04:30:25 -07:00
|
|
|
dirs = ecore_file_ls(buf);
|
2009-04-13 07:56:38 -07:00
|
|
|
|
|
|
|
buf[len] = '/';
|
|
|
|
len++;
|
|
|
|
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
EINA_LIST_FREE(dirs, file)
|
2009-04-13 07:56:38 -07:00
|
|
|
{
|
|
|
|
if (file[0] == '.') continue;
|
2010-01-30 14:11:11 -08:00
|
|
|
if (eina_strlcpy(buf + len, file, sizeof(buf) - len) >= sizeof(buf) - len)
|
2009-04-13 07:56:38 -07:00
|
|
|
continue;
|
|
|
|
if (ecore_file_is_dir(buf))
|
2006-04-20 04:30:25 -07:00
|
|
|
{
|
2009-04-13 07:56:38 -07:00
|
|
|
e_widget_ilist_append(cfdata->tlist, NULL, file, NULL, NULL, file);
|
|
|
|
if ((cfdata->dir) && (!strcmp(cfdata->dir, file)))
|
|
|
|
selnum = i;
|
|
|
|
i++;
|
|
|
|
}
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
|
|
|
|
free(file);
|
2009-04-13 07:56:38 -07:00
|
|
|
}
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
|
2008-10-17 22:21:05 -07:00
|
|
|
e_widget_ilist_go(cfdata->tlist);
|
2009-05-19 15:53:46 -07:00
|
|
|
if (selnum >= 0) e_widget_ilist_selected_set(cfdata->tlist, selnum);
|
2005-12-12 20:47:41 -08:00
|
|
|
}
|
2006-06-04 02:29:15 -07:00
|
|
|
|
|
|
|
static void
|
2010-08-18 17:00:56 -07:00
|
|
|
_show_label_cb_change(void *data, Evas_Object *obj __UNUSED__)
|
2006-06-04 02:29:15 -07:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2009-05-19 15:53:46 -07:00
|
|
|
|
2006-06-04 02:29:15 -07:00
|
|
|
cfdata = data;
|
|
|
|
if (!cfdata) return;
|
|
|
|
e_widget_disabled_set(cfdata->radio_name, !cfdata->show_label);
|
|
|
|
e_widget_disabled_set(cfdata->radio_comment, !cfdata->show_label);
|
|
|
|
e_widget_disabled_set(cfdata->radio_generic, !cfdata->show_label);
|
|
|
|
}
|