Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.c e_intl.c
Log Message:
1. bulgarian
2. start working on making sure e17 follows all of icccm at a minimum. -
netwm will be next.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -3 -r1.135 -r1.136
--- e_border.c 19 Apr 2005 10:45:39 -0000 1.135
+++ e_border.c 19 Apr 2005 13:42:08 -0000 1.136
@@ -3113,20 +3113,56 @@
*h -= bd->client_inset.t + bd->client_inset.b;
if (*h < 1) *h = 1;
if (*w < 1) *w = 1;
- a = (double)*w / (double)*h;
- if ((bd->client.icccm.min_aspect != 0.0) &&
- (a < bd->client.icccm.min_aspect))
- *w = *h * bd->client.icccm.min_aspect;
- else if
- ((bd->client.icccm.max_aspect != 0.0) &&
- (a > bd->client.icccm.max_aspect))
- *h = *w / bd->client.icccm.max_aspect;
- *w = bd->client.icccm.base_w +
+ if ((bd->client.icccm.base_w >= 0) &&
+ (bd->client.icccm.base_h >= 0))
+ {
+ int tw, th;
+
+ tw = *w - bd->client.icccm.base_w;
+ th = *h - bd->client.icccm.base_h;
+ if (tw < 1) tw = 1;
+ if (th < 1) th = 1;
+ a = (double)(tw) / (double)(th);
+ if ((bd->client.icccm.min_aspect != 0.0) &&
+ (a < bd->client.icccm.min_aspect))
+ {
+ tw = th * bd->client.icccm.min_aspect;
+ *w = tw + bd->client.icccm.base_w;
+ }
+ else if ((bd->client.icccm.max_aspect != 0.0) &&
+ (a > bd->client.icccm.max_aspect))
+ {
+ th = tw / bd->client.icccm.max_aspect;
+ *h = th + bd->client.icccm.base_h;
+ }
+ }
+ else
+ {
+ a = (double)*w / (double)*h;
+ if ((bd->client.icccm.min_aspect != 0.0) &&
+ (a < bd->client.icccm.min_aspect))
+ *w = *h * bd->client.icccm.min_aspect;
+ else if
+ ((bd->client.icccm.max_aspect != 0.0) &&
+ (a > bd->client.icccm.max_aspect))
+ *h = *w / bd->client.icccm.max_aspect;
+ }
+ if (bd->client.icccm.base_w >= 0)
+ *w = bd->client.icccm.base_w +
(((*w - bd->client.icccm.base_w) / bd->client.icccm.step_w) *
bd->client.icccm.step_w);
- *h = bd->client.icccm.base_h +
+ else
+ *w = bd->client.icccm.min_w +
+ (((*w - bd->client.icccm.min_w) / bd->client.icccm.step_w) *
+ bd->client.icccm.step_w);
+ if (bd->client.icccm.base_h >= 0)
+ *h = bd->client.icccm.base_h +
(((*h - bd->client.icccm.base_h) / bd->client.icccm.step_h) *
bd->client.icccm.step_h);
+ else
+ *h = bd->client.icccm.min_h +
+ (((*h - bd->client.icccm.min_h) / bd->client.icccm.step_h) *
+ bd->client.icccm.step_h);
if (*h < 1) *h = 1;
if (*w < 1) *w = 1;
@@ -3749,10 +3785,7 @@
evas_object_resize(resize_obj, w, h);
evas_object_show(resize_obj);
- snprintf(buf, sizeof(buf), "%ix%i",
- (bd->client.w - bd->client.icccm.base_w) / bd->client.icccm.step_w,
- (bd->client.h - bd->client.icccm.base_h) / bd->client.icccm.step_h);
- edje_object_part_text_set(resize_obj, "text", buf);
+ _e_border_resize_update(bd);
ecore_evas_move(resize_ee, (bd->zone->w - w) / 2, (bd->zone->h - h) / 2);
ecore_evas_resize(resize_ee, w, h);
@@ -3779,9 +3812,15 @@
{
char buf[40];
- snprintf(buf, sizeof(buf) - 1, "%ix%i",
- (bd->client.w - bd->client.icccm.base_w) / bd->client.icccm.step_w,
- (bd->client.h - bd->client.icccm.base_h) / bd->client.icccm.step_h);
+ if ((bd->client.icccm.base_w >= 0) &&
+ (bd->client.icccm.base_h >= 0))
+ snprintf(buf, sizeof(buf), "%ix%i",
+ (bd->client.w - bd->client.icccm.base_w) /
bd->client.icccm.step_w,
+ (bd->client.h - bd->client.icccm.base_h) /
bd->client.icccm.step_h);
+ else
+ snprintf(buf, sizeof(buf), "%ix%i",
+ (bd->client.w - bd->client.icccm.min_w) /
bd->client.icccm.step_w,
+ (bd->client.h - bd->client.icccm.min_h) /
bd->client.icccm.step_h);
edje_object_part_text_set(resize_obj, "text", buf);
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_intl.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- e_intl.c 19 Apr 2005 03:19:18 -0000 1.18
+++ e_intl.c 19 Apr 2005 13:42:08 -0000 1.19
@@ -46,6 +46,7 @@
ADD_LANG("pt");
ADD_LANG("fi");
ADD_LANG("ru");
+ ADD_LANG("bg");
/* FIXME: NULL == use LANG. make this read a config value if it exists */
e_intl_language_set(getenv("LANG"));
@@ -183,6 +184,8 @@
return "fi";
if (ISL("ru") || ISL("ru_RU") || ISL("RU"))
return "ru";
+ if (ISL("bg") || ISL("bg_BG") || ISL("BG"))
+ return "bg";
/* this is the default fallback - we have no special cases for this lang
* so just strip off anything after and including the _ for country region
* and just return the language encoding
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs