summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorChristopher Michael <cpmichael1@comcast.net>2006-01-25 04:06:51 +0000
committerChristopher Michael <cpmichael1@comcast.net>2006-01-25 04:06:51 +0000
commit36aa7e2d7005c0da010f34c8b56f8bc9bf3e2048 (patch)
tree627c7e77fa63166a0ce85e769b806c6edba8aca2 /src/bin
parent02bfb82b01ea2566af3f1dfc4a930c92ad0cd944 (diff)
downloadenlightenment-36aa7e2d7005c0da010f34c8b56f8bc9bf3e2048.tar.gz
Add some functions to e_ilist and e_widget_ilist.c . Fix commented
unused variables (just removed them). Added Cursor Settings and Startup Settings dialogue. Removed General Settings dialog. SVN revision: 20020
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/e_configure.c3
-rw-r--r--src/bin/e_ilist.c15
-rw-r--r--src/bin/e_ilist.h1
-rw-r--r--src/bin/e_int_config_background.c2
-rw-r--r--src/bin/e_int_config_general.c165
-rw-r--r--src/bin/e_int_config_general.h9
-rw-r--r--src/bin/e_maximize.c4
-rw-r--r--src/bin/e_widget_ilist.c23
-rw-r--r--src/bin/e_widget_ilist.h1
9 files changed, 43 insertions, 180 deletions
diff --git a/src/bin/e_configure.c b/src/bin/e_configure.c
index 77753bfbd9..595c3d3ec9 100644
--- a/src/bin/e_configure.c
+++ b/src/bin/e_configure.c
@@ -65,11 +65,12 @@ e_configure_show(E_Container *con)
e_configure_standard_item_add(eco, "enlightenment/desktops", _("Background Settings"), e_int_config_background);
e_configure_standard_item_add(eco, "enlightenment/themes", _("Theme Selector"), e_int_config_theme);
e_configure_standard_item_add(eco, "enlightenment/modules", _("Module Settings"), e_int_config_modules);
- e_configure_standard_item_add(eco, "enlightenment/e", _("General Settings"), e_int_config_general);
+ e_configure_standard_item_add(eco, "enlightenment/mouse", _("Cursor Settings"), e_int_config_cursor);
e_configure_standard_item_add(eco, "enlightenment/desktops", _("Desktop Settings"), e_int_config_desks);
e_configure_standard_item_add(eco, "enlightenment/e", _("Focus Settings"), e_int_config_focus);
e_configure_standard_item_add(eco, "enlightenment/favorites", _("Menu Settings"), e_int_config_menus);
e_configure_standard_item_add(eco, "enlightenment/configuration", _("Performance Settings"), e_int_config_performance);
+ e_configure_standard_item_add(eco, "enlightenment/run", _("Startup Settings"), e_int_config_startup);
e_configure_standard_item_add(eco, "enlightenment/windows", _("Window List Settings"), e_int_config_winlist);
e_configure_standard_item_add(eco, "enlightenment/windows", _("Window Display Settings"), e_int_config_window_display);
e_configure_standard_item_add(eco, "enlightenment/windows", _("Window Manipulation Settings"), e_int_config_window_manipulation);
diff --git a/src/bin/e_ilist.c b/src/bin/e_ilist.c
index fb2db8d47c..78d1ac024d 100644
--- a/src/bin/e_ilist.c
+++ b/src/bin/e_ilist.c
@@ -296,6 +296,21 @@ e_ilist_count(Evas_Object *obj)
return evas_list_count(sd->items);
}
+EAPI void
+e_ilist_clear(Evas_Object *obj)
+{
+ INTERNAL_ENTRY;
+ while (sd->items)
+ {
+ E_Smart_Item *si;
+
+ si = sd->items->data;
+ sd->items = evas_list_remove_list(sd->items, sd->items);
+ if (si->icon_obj) evas_object_del(si->icon_obj);
+ evas_object_del(si->base_obj);
+ free(si);
+ }
+}
/* local subsystem functions */
static void
diff --git a/src/bin/e_ilist.h b/src/bin/e_ilist.h
index 4e51b59346..360141e4e7 100644
--- a/src/bin/e_ilist.h
+++ b/src/bin/e_ilist.h
@@ -21,6 +21,7 @@ EAPI int e_ilist_selector_get (Evas_Object *obj);
EAPI void e_ilist_remove_num (Evas_Object *obj, int n);
EAPI void e_ilist_remove_label (Evas_Object *obj, char *label);
EAPI int e_ilist_count (Evas_Object *obj);
+EAPI void e_ilist_clear (Evas_Object *obj);
#endif
#endif
diff --git a/src/bin/e_int_config_background.c b/src/bin/e_int_config_background.c
index 5a7a510a32..7fd335265d 100644
--- a/src/bin/e_int_config_background.c
+++ b/src/bin/e_int_config_background.c
@@ -455,7 +455,7 @@ _bg_file_added(void *data, Ecore_File_Monitor *monitor, Ecore_File_Event event,
ic = e_thumb_generate_begin((char *)path, 48, 48, evas, &ic, NULL, NULL);
else
ic = e_thumb_evas_object_get((char *)path, evas, 48, 48, 1);
- e_widget_ilist_append(il, ic, ecore_file_strip_ext(file), _ilist_cb_bg_selected, cfd, (char *)path);
+ e_widget_ilist_append(il, ic, ecore_file_strip_ext(file), _ilist_cb_bg_selected, cfd, (char *)path);
}
}
free(file);
diff --git a/src/bin/e_int_config_general.c b/src/bin/e_int_config_general.c
deleted file mode 100644
index 899a96061f..0000000000
--- a/src/bin/e_int_config_general.c
+++ /dev/null
@@ -1,165 +0,0 @@
-#include "e.h"
-
-static void *_create_data(E_Config_Dialog *cfd);
-static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-static int _basic_apply_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 _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
-
-struct _E_Config_Dialog_Data
-{
- int show_splash;
- int use_e_cursor;
-
- /* Advanced */
- int cursor_size;
-};
-
-EAPI E_Config_Dialog *
-e_int_config_general(E_Container *con)
-{
- E_Config_Dialog *cfd;
- E_Config_Dialog_View *v;
-
- v = E_NEW(E_Config_Dialog_View, 1);
-
- v->create_cfdata = _create_data;
- v->free_cfdata = _free_data;
- v->basic.apply_cfdata = _basic_apply_data;
- v->basic.create_widgets = _basic_create_widgets;
- v->advanced.apply_cfdata = _advanced_apply_data;
- v->advanced.create_widgets = _advanced_create_widgets;
-
- cfd = e_config_dialog_new(con, _("General Settings"), NULL, 0, v, NULL);
- return cfd;
-}
-
-static void
-_fill_data(E_Config_Dialog_Data *cfdata)
-{
- cfdata->show_splash = e_config->show_splash;
- cfdata->use_e_cursor = e_config->use_e_cursor;
- cfdata->cursor_size = e_config->cursor_size;
-}
-
-static void *
-_create_data(E_Config_Dialog *cfd)
-{
- E_Config_Dialog_Data *cfdata;
-
- cfdata = E_NEW(E_Config_Dialog_Data, 1);
- return cfdata;
-}
-
-static void
-_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
-{
- free(cfdata);
-}
-
-static int
-_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
-{
- int changed = 0;
-
- if (e_config->use_e_cursor != cfdata->use_e_cursor) changed = 1;
-
- e_border_button_bindings_ungrab_all();
- e_config->show_splash = cfdata->show_splash;
- e_config->use_e_cursor = cfdata->use_e_cursor;
- e_border_button_bindings_grab_all();
- e_config_save_queue();
-
- if (changed)
- {
- Evas_List *l;
-
- for (l = e_manager_list(); l; l = l->next)
- {
- E_Manager *man;
- man = l->data;
- if (man->pointer) e_object_del(E_OBJECT(man->pointer));
- man->pointer = e_pointer_window_new(man->root);
- }
- }
- return 1;
-}
-
-static Evas_Object *
-_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
-{
- Evas_Object *o, *of, *ob;
-
- _fill_data(cfdata);
-
- o = e_widget_list_add(evas, 0, 0);
-
- of = e_widget_framelist_add(evas, _("General Settings"), 0);
- ob = e_widget_check_add(evas, _("Show Splash Screen At Boot"), &(cfdata->show_splash));
- e_widget_framelist_object_append(of, ob);
- e_widget_list_object_append(o, of, 1, 1, 0.5);
-
- of = e_widget_framelist_add(evas, _("Mouse Pointer Settings"), 0);
- ob = e_widget_check_add(evas, _("Use E Mouse Pointer"), &(cfdata->use_e_cursor));
- e_widget_framelist_object_append(of, ob);
- e_widget_list_object_append(o, of, 1, 1, 0.5);
- return o;
-}
-
-
-static int
-_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
-{
- int changed = 0;
-
- if (e_config->use_e_cursor != cfdata->use_e_cursor) changed = 1;
- if (e_config->cursor_size != cfdata->cursor_size) changed = 1;
-
- e_border_button_bindings_ungrab_all();
- e_config->show_splash = cfdata->show_splash;
- e_config->use_e_cursor = cfdata->use_e_cursor;
- if (cfdata->cursor_size <= 0) cfdata->cursor_size = 1;
- e_config->cursor_size = cfdata->cursor_size;
-
- e_border_button_bindings_grab_all();
- e_config_save_queue();
- if (changed)
- {
- Evas_List *l;
-
- e_pointers_size_set(e_config->cursor_size);
- for (l = e_manager_list(); l; l = l->next)
- {
- E_Manager *man;
- man = l->data;
- if (man->pointer) e_object_del(E_OBJECT(man->pointer));
- man->pointer = e_pointer_window_new(man->root);
- }
- }
- return 1;
-}
-
-static Evas_Object *
-_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
-{
- Evas_Object *o, *ob, *of;
-
- _fill_data(cfdata);
-
- o = e_widget_list_add(evas, 0, 0);
- of = e_widget_framelist_add(evas, _("General Settings"), 0);
- ob = e_widget_check_add(evas, _("Show Splash Screen At Boot"), &(cfdata->show_splash));
- e_widget_framelist_object_append(of, ob);
- e_widget_list_object_append(o, of, 1, 1, 0.5);
-
- of = e_widget_framelist_add(evas, _("Mouse Pointer Settings"), 0);
- ob = e_widget_check_add(evas, _("Use E Mouse Pointer"), &(cfdata->use_e_cursor));
- e_widget_framelist_object_append(of, ob);
- ob = e_widget_label_add(evas, _("Mouse Pointer Size"));
- e_widget_framelist_object_append(of, ob);
- ob = e_widget_slider_add(evas, 1, 0, _("%1.0f pixels"), 0, 1024, 1, 0, NULL, &(cfdata->cursor_size), 150);
- e_widget_framelist_object_append(of, ob);
- e_widget_list_object_append(o, of, 1, 1, 0.5);
- return o;
-}
diff --git a/src/bin/e_int_config_general.h b/src/bin/e_int_config_general.h
deleted file mode 100644
index 67b42196e1..0000000000
--- a/src/bin/e_int_config_general.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifdef E_TYPEDEFS
-#else
-#ifndef E_INT_CONFIG_GENERAL_H
-#define E_INT_CONFIG_GENERAL_H
-
-EAPI E_Config_Dialog *e_int_config_general(E_Container *con);
-
-#endif
-#endif
diff --git a/src/bin/e_maximize.c b/src/bin/e_maximize.c
index 08589eb8f6..cbaa53a8fb 100644
--- a/src/bin/e_maximize.c
+++ b/src/bin/e_maximize.c
@@ -37,14 +37,12 @@ int _e_mzone_cb_height_reverse_sort(void *e1, void *e2); // not used yet
EAPI void
e_maximize_border_gadman_fit(E_Border *bd, int *x1, int *y1, int *x2, int *y2)
{
- /* Unused variables int ii, jj; */
Evas_List *l, *ll;
Evas_List *mzones = NULL;
Evas_List *tmp_mzones = NULL;
struct _m_zone *mzone = NULL;
- /* Unused variable: struct _m_zone *mzone_split; */
mzone = (struct _m_zone *)malloc(sizeof(struct _m_zone));
if (mzone == NULL)
@@ -136,7 +134,6 @@ e_maximize_border_gadman_fit(E_Border *bd, int *x1, int *y1, int *x2, int *y2)
else if (mzones != NULL && mzones->next != NULL)
{
Evas_List *wl = NULL;
- /* Unused var *hl = NULL; */
/* The use of *_width_reverse_sort or *_height_reverse_sort depends
* on the preferences of the user - what window he/she would like to
@@ -144,7 +141,6 @@ e_maximize_border_gadman_fit(E_Border *bd, int *x1, int *y1, int *x2, int *y2)
*/
wl = evas_list_sort(mzones, evas_list_count(mzones), _e_mzone_cb_width_reverse_sort);
mzones = NULL;
- /* hl = evas_list_sort(mzones, -1, _e_mzone_cb_height_reverse_sort); */
mzone = wl->data;
/* mzone = hl->data; */
diff --git a/src/bin/e_widget_ilist.c b/src/bin/e_widget_ilist.c
index f2b304421b..450893a9cb 100644
--- a/src/bin/e_widget_ilist.c
+++ b/src/bin/e_widget_ilist.c
@@ -161,6 +161,29 @@ e_widget_ilist_count(Evas_Object *obj)
return e_ilist_count(wd->o_ilist);
}
+EAPI void
+e_widget_ilist_clear(Evas_Object *obj)
+{
+ E_Widget_Data *wd;
+ int mw, mh, vw, vh, w, h;
+
+ wd = e_widget_data_get(obj);
+ e_ilist_clear(wd->o_ilist);
+
+ e_ilist_min_size_get(wd->o_ilist, &mw, &mh);
+ evas_object_resize(wd->o_ilist, mw, mh);
+ e_scrollframe_child_viewport_size_get(wd->o_scrollframe, &vw, &vh);
+ evas_object_geometry_get(wd->o_scrollframe, NULL, NULL, &w, &h);
+ if (mw > vw)
+ {
+ Evas_Coord wmw, wmh;
+
+ e_widget_min_size_get(obj, &wmw, &wmh);
+ e_widget_min_size_set(obj, mw + (w - vw), wmh);
+ }
+ return;
+}
+
static void
_e_wid_del_hook(Evas_Object *obj)
{
diff --git a/src/bin/e_widget_ilist.h b/src/bin/e_widget_ilist.h
index 02a3cc9a26..4f66e36fd8 100644
--- a/src/bin/e_widget_ilist.h
+++ b/src/bin/e_widget_ilist.h
@@ -16,6 +16,7 @@ EAPI const char *e_widget_ilist_selected_label_get(Evas_Object *obj);
EAPI void e_widget_ilist_remove_num(Evas_Object *obj, int n);
EAPI void e_widget_ilist_remove_label(Evas_Object *obj, char *label);
EAPI int e_widget_ilist_count(Evas_Object *obj);
+EAPI void e_widget_ilist_clear(Evas_Object *obj);
#endif
#endif