patches (see devel list) :)

SVN revision: 26725
This commit is contained in:
Carsten Haitzler 2006-10-21 02:32:14 +00:00
parent e285194a10
commit 621a58de48
11 changed files with 109 additions and 16 deletions

4
TODO
View File

@ -8,10 +8,6 @@ Some of the things (in very short form) that need to be done to E17...
BUGS / FIXES
-------------------------------------------------------------------------------
* BUG: if maximize policy == fullscreen then weird things happen on
maximize and unmaximize with gvim (probably gvim tries to resize itself
on maximize and it screws e's account keeping) but on unmax it ends up
just moving a bit, not going down in size.
* BUG: smart placement seems to screw up if a shelf is at the top of the screen
* BUG: e17 screen res diaolg doesnt work under xephyr - why?
* BUG: "match this window only" doesnt fall back to other unused remembers

View File

@ -1684,7 +1684,7 @@ e_border_maximize(E_Border *bd, E_Maximize max)
if ((bd->shaded) || (bd->shading)) return;
if (bd->fullscreen)
e_border_unfullscreen(bd);
/* Only allow changes in vertical/ horisontal maximization */
/* Only allow changes in vertical/ horizontal maximization */
if (((bd->maximized & E_MAXIMIZE_DIRECTION) == (max & E_MAXIMIZE_DIRECTION)) ||
((bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)) return;
if (bd->new_client)
@ -1899,18 +1899,29 @@ e_border_unmaximize(E_Border *bd, E_Maximize max)
if (dir & E_MAXIMIZE_HORIZONTAL)
{
/* Remove vertical */
int w,h;
signal = 0;
bd->maximized &= ~E_MAXIMIZE_VERTICAL;
e_border_move_resize(bd, bd->x, bd->saved.y, bd->w, bd->saved.h);
w = bd->w;
h = bd->saved.h;
e_border_resize_limit(bd, &w, &h);
e_border_resize_limit(bd, &w, &h);
e_border_move_resize(bd, bd->x, bd->saved.y, w, h);
bd->saved.y = bd->saved.h = 0;
e_hints_window_size_set(bd);
}
else if (dir & E_MAXIMIZE_VERTICAL)
{
/* Remove horisontal */
/* Remove horizontal */
int w,h;
signal = 0;
bd->maximized &= ~E_MAXIMIZE_HORIZONTAL;
e_border_move_resize(bd, bd->saved.x, bd->y, bd->saved.w, bd->h);
w = bd->saved.w;
h = bd->h;
e_border_resize_limit(bd, &w, &h);
e_border_move_resize(bd, bd->saved.x, bd->y, w, h);
bd->saved.x = bd->saved.w = 0;
e_hints_window_size_set(bd);
}
@ -1928,6 +1939,7 @@ e_border_unmaximize(E_Border *bd, E_Maximize max)
else h = bd->h;
bd->maximized = E_MAXIMIZE_NONE;
e_border_resize_limit(bd, &w, &h);
e_border_move_resize(bd, x, y, w, h);
bd->saved.x = bd->saved.y = bd->saved.w = bd->saved.h = 0;
e_hints_window_size_unset(bd);
@ -3544,12 +3556,7 @@ _e_border_cb_window_configure_request(void *data, int ev_type, void *ev)
}
else
{
if ((bd->maximized & E_MAXIMIZE_TYPE) != E_MAXIMIZE_NONE)
{
bd->saved.w = w;
bd->saved.h = h;
}
else
if ((bd->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_NONE)
e_border_resize(bd, w, h);
}
}

View File

@ -84,6 +84,10 @@ e_desklock_init(void)
if (e_config->desklock_use_timeout)
ecore_x_screensaver_timeout_set(e_config->desklock_timeout);
}
if (e_config->desklock_background)
e_filereg_register(e_config->desklock_background);
return 1;
}
@ -91,6 +95,9 @@ EAPI int
e_desklock_shutdown(void)
{
e_desklock_hide();
if (e_config->desklock_background)
e_filereg_deregister(e_config->desklock_background);
return 1;
}

View File

@ -594,7 +594,7 @@ static void _e_entry_key_down_windows(Evas_Object *entry, Evas_Event_Key_Down *e
}
}
/* Otherwise, we insert the corresponding character */
else if ((event->string) &&
else if ((event->string) && ((sd->enabled)) &&
((strlen(event->string) != 1) || (event->string[0] >= 0x20)))
{
if (selecting)

View File

@ -300,6 +300,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
e_widget_frametable_object_append(of, ob, x, y, 1, 1, 1, 1, 1, 1); \
ob = e_widget_entry_add(evas, &(cfdata->val)); \
if (!cfdata->val) e_widget_disabled_set(ob, 1); \
e_widget_entry_readonly_set(ob, 1); \
e_widget_min_size_get(ob, &mw, &mh); \
e_widget_min_size_set(ob, 160, mh); \
e_widget_frametable_object_append(of, ob, x + 1, y, 1, 1, 1, 1, 1, 1); \
@ -309,6 +310,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
ob = e_widget_label_add(evas, label); \
e_widget_frametable_object_append(of, ob, x, y, 1, 1, 1, 1, 1, 1); \
ob = e_widget_check_add(evas, "", &(cfdata->val)); \
e_widget_disabled_set(ob, 1); \
e_widget_frametable_object_append(of, ob, x + 1, y, 1, 1, 1, 1, 1, 1); \
}

View File

@ -499,8 +499,12 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
if (cfdata->bg)
{
if (e_config->desklock_background)
{
e_filereg_deregister(e_config->desklock_background);
evas_stringshare_del(e_config->desklock_background);
}
e_config->desklock_background = evas_stringshare_add(cfdata->bg);
e_filereg_register(e_config->desklock_background);
}
if (_e_desklock_zone_num_get() > 1)

View File

@ -131,6 +131,27 @@ e_widget_entry_password_set(Evas_Object *entry, int password_mode)
e_entry_password_set(wd->o_entry, password_mode);
}
/**
* Sets whether or not the entry widget is user-editable. This still
* allows copying and selecting, just no inserting or deleting of text.
*
* @param entry an entry widget
* @param readonly 1 to enable read-only mode, 0 to turn it off
*/
EAPI void
e_widget_entry_readonly_set(Evas_Object *entry, int readonly_mode)
{
E_Widget_Data *wd;
if (!(entry) || (!(wd = e_widget_data_get(entry))))
return;
if (readonly_mode)
e_entry_disable(wd->o_entry);
else
e_entry_enable(wd->o_entry);
}
/**
* Gets the editable object of the entry widget. It will allow you to have
* better control on the text, the cursor or the selection of the entry with

View File

@ -11,6 +11,7 @@ EAPI void e_widget_entry_text_set (Evas_Object *entry, const
EAPI const char *e_widget_entry_text_get (Evas_Object *entry);
EAPI void e_widget_entry_clear (Evas_Object *entry);
EAPI void e_widget_entry_password_set (Evas_Object *entry, int password_mode);
EAPI void e_widget_entry_readonly_set (Evas_Object *entry, int readonly_mode);
EAPI Evas_Object *e_widget_entry_editable_object_get (Evas_Object *entry);
#endif

View File

@ -29,6 +29,7 @@ struct _E_Config_Dialog_Data
int high_temp;
int sensor;
int acpizone;
};
/* Protos */
@ -67,6 +68,7 @@ static void
_fill_data(E_Config_Dialog_Data *cfdata)
{
double p;
Ecore_List *therms;
cfdata->units = temperature_config->units;
if (temperature_config->units == CELCIUS)
@ -117,6 +119,20 @@ _fill_data(E_Config_Dialog_Data *cfdata)
else if (!strcmp(temperature_config->sensor_name, "temp3"))
cfdata->sensor = 2;
}
cfdata->acpizone= 0;
if (temperature_config->acpi_sel)
{
therms = ecore_file_ls("/proc/acpi/thermal_zone");
char *tzone;
int n = 0;
while ((tzone = ecore_list_next(therms)))
{
if (!strcmp(temperature_config->acpi_sel, tzone))
cfdata->acpizone = n;
else n++;
}
ecore_list_destroy(therms);
}
}
static void *
@ -293,6 +309,25 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
}
}
}
else
{
if (!ecore_list_is_empty(therms))
{
of = e_widget_framelist_add(evas, _("ACPI Temperature"), 0);
rg = e_widget_radio_group_new(&(cfdata->acpizone));
char *tzone;
int n = 0;
while ((tzone = ecore_list_next(therms)))
{
ob = e_widget_radio_add(evas, _(tzone), n, rg);
e_widget_framelist_object_append(of, ob);
n++;
}
e_widget_list_object_append(o, of, 1, 1, 0.5);
ecore_list_destroy(therms);
therms = NULL;
}
}
if (therms) ecore_list_destroy(therms);
#endif
@ -381,6 +416,23 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
temperature_config->sensor_name = evas_stringshare_add("temp3");
break;
}
if (temperature_config->acpi_sel)
evas_stringshare_del(temperature_config->acpi_sel);
temperature_config->acpi_sel = NULL;
int n = 0;
Ecore_List *therms;
char *tzone;
therms = ecore_file_ls("/proc/acpi/thermal_zone");
if ((therms) || !ecore_list_is_empty(therms))
{
while ((tzone = ecore_list_next(therms)))
{
if (n == cfdata->acpizone)
temperature_config->acpi_sel = evas_stringshare_add(tzone);
n++;
}
}
ecore_list_destroy(therms);
_temperature_face_cb_config_updated();
e_config_save_queue();
return 1;

View File

@ -276,7 +276,7 @@ _temperature_cb_check(void *data)
{
char *p, *q;
FILE *f;
name = temperature_config->acpi_sel;
snprintf(buf, sizeof(buf), "/proc/acpi/thermal_zone/%s/temperature", name);
f = fopen(buf, "rb");
if (f)
@ -403,6 +403,7 @@ e_modapi_init(E_Module *m)
E_CONFIG_VAL(D, T, high, INT);
E_CONFIG_VAL(D, T, sensor_name, STR);
E_CONFIG_VAL(D, T, units, INT);
E_CONFIG_VAL(D, T, acpi_sel, STR);
temperature_config = e_config_domain_load("module.temperature", conf_edd);
if (!temperature_config)
@ -413,6 +414,7 @@ e_modapi_init(E_Module *m)
temperature_config->high = 80;
temperature_config->sensor_name = evas_stringshare_add("temp1");
temperature_config->units = CELCIUS;
temperature_config->acpi_sel = evas_stringshare_add("TZ1");
}
E_CONFIG_LIMIT(temperature_config->poll_time, 0.5, 1000.0);
E_CONFIG_LIMIT(temperature_config->low, 0, 100);

View File

@ -18,6 +18,7 @@ struct _Config
double poll_time;
int low, high;
const char *sensor_name;
const char *acpi_sel;
Unit units;
/* just config state */
E_Module *module;