E CVS: libs/ewl ningerso

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir : e17/libs/ewl/src/lib


Modified Files:
ewl_theme.c ewl_theme.h 


Log Message:
Make theme key lookup return values consistent to prevent memory leaks and
improve cache performance.
Add theme reset to clear cached values on specified widgets.
Update theme test to cache API change.

===
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_theme.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- ewl_theme.c 6 Feb 2007 13:42:17 -   1.38
+++ ewl_theme.c 28 Feb 2007 12:24:46 -  1.39
@@ -253,27 +253,19 @@
DCHECK_PARAM_PTR("cache", cache);
DCHECK_PARAM_PTR("k", k);
 
-   if (v != EWL_THEME_KEY_NOMATCH) {
-   if (v) {
-   ecore_hash_set(cache, (void *)ecore_string_instance(k), 
-   (void 
*)ecore_string_instance(v));
-   }
-   /*
-* Mark unmatched keys in the cache.
-*/
-   else {
-   ecore_hash_set(cache, (void *)ecore_string_instance(k), 
-   EWL_THEME_KEY_NOMATCH);
-   }
-   }
+   /*
+* The v value should already be a string instance at this point so we
+* can set the value directly whether its a match or no match.
+*/
+   ecore_hash_set(cache, (void *)ecore_string_instance(k), (void *)v);
 
DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
-static char *
+static const char *
 ewl_theme_lookup_key(Ecore_Hash *cache, const char *path, const char *k)
 {
-   char *ret;
+   const char *ret;
 
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR_RET("cache", cache, NULL);
@@ -281,18 +273,50 @@
 
ret = ecore_hash_get(cache, k);
if (!ret) {
+   char *tmp = NULL;
 
/*
 * Resort to looking in the edje.
 */
if (path)
-   ret = edje_file_data_get(path, k);
+   tmp = edje_file_data_get(path, k);
+
+   /*
+* Get a string instance for the value so we can treat the
+* return type consistently and not leak memory.
+*/
+   if (tmp) {
+   ret = ecore_string_instance(tmp);
+   FREE(tmp);
+   }
}
+   else
+   ret = ecore_string_instance(ret);
 
DRETURN_PTR(ret, DLEVEL_STABLE);
 }
 
 /**
+ * @param w: the widget to reset theme settings
+ * @return Returns no value.
+ * @brief Reset the theme settings for the widget @a w.
+ */
+void
+ewl_theme_data_reset(Ewl_Widget *w)
+{
+   DENTER_FUNCTION(DLEVEL_STABLE);
+   DCHECK_PARAM_PTR("w", w);
+   DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
+
+   if (w->theme) {
+   ecore_hash_destroy(w->theme);
+   w->theme = NULL;
+   }
+
+   DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
  * @param w: the widget to search
  * @param k: the key to search for
  * @return Returns the string associated with @a k on success, NULL on failure.
@@ -301,7 +325,8 @@
 const char *
 ewl_theme_data_str_get(Ewl_Widget *w, char *k)
 {
-   char *ret = NULL;
+   Ecore_Hash *cache = NULL;
+   const char *ret = NULL;
char *temp = NULL;
char key[PATH_MAX];
 
@@ -357,8 +382,10 @@
if (w && w->theme)
ret = ewl_theme_lookup_key(w->theme, w->theme_path, 
temp);
 
-   if (ret)
+   if (ret) {
+   cache = w->theme;
break;
+   }
 
temp++;
temp = strchr(temp, '/');
@@ -376,18 +403,24 @@
while (temp && !ret) {
ret = ewl_theme_lookup_key(ewl_theme_def_data,
ewl_theme_path, temp);
-   if (ret)
+   if (ret) {
+   cache = ewl_theme_def_data;
break;
+   }
 
temp++;
temp = strchr(temp, '/');
}
 
-   /*
-* Mark unmatched keys in the cache.
-*/
-   ewl_theme_lookup_cache(ewl_theme_def_data, key, ret);
}
+
+   if (!cache)
+   cache = ewl_theme_def_data;
+
+   /*
+* Mark all keys matched and unmatched in the cache.
+*/
+   ewl_theme_lookup_cache(cache, key, ret);
 
/*
 * Fixup unmatched keys in the cache.
===
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_theme.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3

E CVS: libs/ewl ningerso

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir : e17/libs/ewl/src/bin/tests/theme


Modified Files:
ewl_theme.c 


Log Message:
Make theme key lookup return values consistent to prevent memory leaks and
improve cache performance.
Add theme reset to clear cached values on specified widgets.
Update theme test to cache API change.

===
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/theme/ewl_theme.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_theme.c 17 Jan 2007 12:56:48 -  1.6
+++ ewl_theme.c 28 Feb 2007 12:24:46 -  1.7
@@ -117,6 +117,7 @@
 
snprintf(theme_filename, sizeof(theme_filename), 
PACKAGE_DATA_DIR "/ewl/themes/%s", (char *)data);
+   ewl_theme_data_reset(notebook);
ewl_theme_data_str_set(notebook, "/file", theme_filename);
 
if (selected_theme) free(selected_theme);



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: apps/e devilhorns

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir : e17/apps/e/data/themes


Modified Files:
default_button.edc 


Log Message:
Support e,action,icon,hide for the button widget.

===
RCS file: /cvs/e/e17/apps/e/data/themes/default_button.edc,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- default_button.edc  6 Oct 2006 00:27:29 -   1.10
+++ default_button.edc  28 Feb 2007 02:59:11 -  1.11
@@ -339,6 +339,13 @@
 target: "e.swallow.icon";
   }
   program {
+name:   "icon_invisible";
+signal: "e,action,hide,icon";
+source: "e";
+action: STATE_SET "default" 0.0;
+target: "e.swallow.icon";
+  }
+  program {
 name: "button_in";
 signal: "mouse,in";
 source: "button_image";



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: apps/e devilhorns

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir : e17/apps/e/src/bin


Modified Files:
e_int_config_theme.c e_widget_button.c 


Log Message:
Allow setting a widget_button's icon to NULL so that a button icon can be
unset.

Some formatting on the theme dialog.

===
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_theme.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- e_int_config_theme.c15 Jan 2007 17:43:19 -  1.44
+++ e_int_config_theme.c28 Feb 2007 02:58:39 -  1.45
@@ -355,13 +355,11 @@
rg = e_widget_radio_group_new(&(cfdata->fmdir));
o = e_widget_radio_add(evas, _("Personal"), 0, rg);
cfdata->o_personal = o;
-   evas_object_smart_callback_add(o, "changed",
- _cb_dir, cfdata);
+   evas_object_smart_callback_add(o, "changed", _cb_dir, cfdata);
e_widget_table_object_append(il, o, 0, 0, 1, 1, 1, 1, 0, 0);
o = e_widget_radio_add(evas, _("System"), 1, rg);
cfdata->o_system = o;
-   evas_object_smart_callback_add(o, "changed",
- _cb_dir, cfdata);
+   evas_object_smart_callback_add(o, "changed", _cb_dir, cfdata);
e_widget_table_object_append(il, o, 1, 0, 1, 1, 1, 1, 0, 0);

e_widget_table_object_append(ol, il, 0, 0, 1, 1, 0, 0, 0, 0);
@@ -431,11 +429,12 @@

o = e_widget_preview_add(evas, 320, (320 * z->h) / z->w);
cfdata->o_preview = o;
-   if (cfdata->theme)
- f = cfdata->theme;
-   e_widget_preview_edje_set(o, f, "e/desktop/background");
+   if (cfdata->theme) 
+ {
+   f = cfdata->theme;
+   e_widget_preview_edje_set(o, f, "e/desktop/background");
+ }
e_widget_list_object_append(of, o, 1, 1, 0.5);
-   
e_widget_table_object_append(ot, of, 1, 0, 1, 1, 1, 1, 1, 1);

e_dialog_resizable_set(cfd->dia, 1);
===
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_button.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_widget_button.c   23 Aug 2006 03:39:02 -  1.13
+++ e_widget_button.c   28 Feb 2007 02:58:40 -  1.14
@@ -86,13 +86,24 @@
E_Widget_Data *wd;
 
wd = e_widget_data_get(obj);
-   wd->o_icon = icon;
-   edje_object_part_swallow(wd->o_button, "e.swallow.icon", icon);
-   edje_object_signal_emit(wd->o_button, "e,action,show,icon", "e");
-   edje_object_message_signal_process(wd->o_button);
-   evas_object_pass_events_set(icon, 1);
-   evas_object_show(icon);
-   e_widget_sub_object_add(obj, icon);
+   if (!icon)
+ {
+   evas_object_hide(wd->o_icon);
+   edje_object_signal_emit(wd->o_button, "e,action,hide,icon", "e");
+   edje_object_message_signal_process(wd->o_button);
+   edje_object_part_unswallow(wd->o_button, wd->o_icon);
+   evas_object_del(wd->o_icon);
+ }
+   else
+ {
+   wd->o_icon = icon;
+   edje_object_part_swallow(wd->o_button, "e.swallow.icon", icon);
+   edje_object_signal_emit(wd->o_button, "e,action,show,icon", "e");
+   edje_object_message_signal_process(wd->o_button);
+   evas_object_pass_events_set(icon, 1);
+   evas_object_show(icon);
+   e_widget_sub_object_add(obj, icon);
+ }
 }
 
 static void



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: apps/emphasis lok

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : lok
Project : e17
Module  : apps/emphasis

Dir : e17/apps/emphasis/src/bin


Modified Files:
emphasis_callbacks.c 


Log Message:
Small fix on the playlists. Thanks Pavel.

===
RCS file: /cvs/e/e17/apps/emphasis/src/bin/emphasis_callbacks.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- emphasis_callbacks.c27 Feb 2007 22:30:11 -  1.20
+++ emphasis_callbacks.c27 Feb 2007 22:33:51 -  1.21
@@ -1145,7 +1145,7 @@
   if (!row) return;
   etk_tree_row_fields_get(row, ETK_FALSE, col, &playlist_name, NULL);
 
-//  mpc_playlist_clear();
+  mpc_playlist_clear();
   etk_tree_multiple_select_set(ETK_TREE(player->media.pls_content), ETK_TRUE);
   etk_tree_select_all(ETK_TREE(player->media.pls_content));
   emphasis_playlist_append_selected(ETK_TREE(player->media.pls_content),



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: apps/emphasis lok

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : lok
Project : e17
Module  : apps/emphasis

Dir : e17/apps/emphasis/src/bin


Modified Files:
emphasis_callbacks.c emphasis_gui.c emphasis_mpc.c 


Log Message:


===
RCS file: /cvs/e/e17/apps/emphasis/src/bin/emphasis_callbacks.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- emphasis_callbacks.c17 Jan 2007 01:30:09 -  1.19
+++ emphasis_callbacks.c27 Feb 2007 22:30:11 -  1.20
@@ -1142,9 +1142,10 @@
   player = data;
   col = etk_tree_nth_col_get(ETK_TREE(player->media.pls_list), 0);
   row = etk_tree_selected_row_get(ETK_TREE(player->media.pls_list));
+  if (!row) return;
   etk_tree_row_fields_get(row, ETK_FALSE, col, &playlist_name, NULL);
 
-  mpc_playlist_clear();
+//  mpc_playlist_clear();
   etk_tree_multiple_select_set(ETK_TREE(player->media.pls_content), ETK_TRUE);
   etk_tree_select_all(ETK_TREE(player->media.pls_content));
   emphasis_playlist_append_selected(ETK_TREE(player->media.pls_content),
===
RCS file: /cvs/e/e17/apps/emphasis/src/bin/emphasis_gui.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- emphasis_gui.c  17 Jan 2007 01:30:09 -  1.12
+++ emphasis_gui.c  27 Feb 2007 22:30:11 -  1.13
@@ -79,7 +79,6 @@
   ETK_CALLBACK(cb_pls_contextual_menu), gui);
etk_signal_connect("mouse_down", ETK_OBJECT(player->media.track), 
   ETK_CALLBACK(cb_pls_contextual_menu), gui);
-
 }
 
 /**
===
RCS file: /cvs/e/e17/apps/emphasis/src/bin/emphasis_mpc.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- emphasis_mpc.c  17 Jan 2007 01:30:09 -  1.14
+++ emphasis_mpc.c  27 Feb 2007 22:30:11 -  1.15
@@ -557,6 +557,7 @@
 {
   song =
 mpd_playlist_get_changes(mo, mpd_playlist_get_old_playlist_id(mo));
+  if (!song) return;
   mpc_play_id(song->song->id);
   mpd_data_free(song);
 }



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: debian kaethorn

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : kaethorn
Project : e_modules
Module  : debian

Dir : e_modules/debian


Modified Files:
control 
Added Files:
emodule0-forecasts.install 


Log Message:
add forecasts module.

===
RCS file: /cvs/e/e_modules/debian/control,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- control 9 Nov 2006 12:11:20 -   1.19
+++ control 27 Feb 2007 19:39:38 -  1.20
@@ -51,9 +51,16 @@
 Depends: ${shlibs:Depends}, enlightenment
 Provides: emodule-flame
 Description: An E17 module that draws flames on the desktop
- Eflame is an E17 module which draws flames of configurable colors on
+ Flame is an E17 module which draws flames of configurable colors on
  the lower part of the screen.
 
+Package: emodule0-forecasts
+Architecture: any
+Depends: ${shlibs:Depends}, enlightenment
+Provides: emodule-forecasts
+Description: An E17 module which displays weather forecasts
+ Forecasts is an E17 module which displays the weather forecast.
+
 Package: emodule0-language
 Architecture: any
 Depends: ${shlibs:Depends}, enlightenment, libexml
@@ -187,7 +194,7 @@
 Depends: ${shlibs:Depends}, enlightenment
 Provides: emodule-weather
 Description: An E17 weather module
- An E17 module displaying the current weather conditions and forecast.
+ An E17 module displaying the current weather conditions.
  Features are:
  - choose between simple and detailed view
  - specify poll time
@@ -214,7 +221,7 @@
 
 Package: emodules0-all
 Architecture: any
-Depends: enlightenment, emodule0-alarm, emodule0-bling, emodule0-cpu, 
emodule0-deskshow, emodule0-emu, emodule0-flame, emodule0-language, 
emodule0-mail, emodule0-mem, emodule0-mixer, emodule0-moon, emodule0-net, 
emodule0-photo, emodule0-rain, emodule0-screenshot, emodule0-slideshow, 
emodule0-snow, emodule0-taskbar, emodule0-tclock, emodule0-uptime, 
emodule0-weather, emodule0-winselector, emodule0-wlan
+Depends: enlightenment, emodule0-alarm, emodule0-bling, emodule0-cpu, 
emodule0-deskshow, emodule0-emu, emodule0-flame, emodule0-forecasts, 
emodule0-language, emodule0-mail, emodule0-mem, emodule0-mixer, emodule0-moon, 
emodule0-net, emodule0-photo, emodule0-rain, emodule0-screenshot, 
emodule0-slideshow, emodule0-snow, emodule0-taskbar, emodule0-tclock, 
emodule0-uptime, emodule0-weather, emodule0-winselector, emodule0-wlan
 Conflicts: emodules-extra, evolume
 Provides: emodules-all, e17-modules
 Description: A dummy package for installing all modules for E17
@@ -226,6 +233,7 @@
  Emu : A module front end that runs arbitrary back ends
written in any language.
  Flame   : Displays flames at the bottom of the screen.
+ Forecasts   : Shows the weather forecast.
  Language: Allows to control keyboard layout, model and variant.
  Mail: A mail module supporting pop3, imap, mailbox and mdir.
  Mem : Monitors memory usage.



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: apps/e devilhorns

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir : e17/apps/e/src/bin


Modified Files:
e_actions.c e_border.c e_border.h e_int_border_menu.c 


Log Message:
Ravenlock's pin-cleanup and pin-action patches to address concerns about a
new border property versus reusing what exists. This now eliminates using a
new border property in favor of re-using the 3 properties that exist and
also adds a key/mouse binding.

Some formatting issues I found in e_border and e_action while
looking/testing this.

===
RCS file: /cvs/e/e17/apps/e/src/bin/e_actions.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -3 -r1.90 -r1.91
--- e_actions.c 10 Feb 2007 17:23:05 -  1.90
+++ e_actions.c 27 Feb 2007 16:16:03 -  1.91
@@ -580,17 +580,25 @@
   {
  if (v == 1)
{
-  if (!strcmp(buf, "up")) e_border_shade(bd, 
E_DIRECTION_UP);
-  else if (!strcmp(buf, "down")) e_border_shade(bd, 
E_DIRECTION_DOWN);
-  else if (!strcmp(buf, "left")) e_border_shade(bd, 
E_DIRECTION_LEFT);
-  else if (!strcmp(buf, "right")) e_border_shade(bd, 
E_DIRECTION_RIGHT);
+  if (!strcmp(buf, "up")) 
+e_border_shade(bd, E_DIRECTION_UP);
+  else if (!strcmp(buf, "down")) 
+e_border_shade(bd, E_DIRECTION_DOWN);
+  else if (!strcmp(buf, "left")) 
+e_border_shade(bd, E_DIRECTION_LEFT);
+  else if (!strcmp(buf, "right")) 
+e_border_shade(bd, E_DIRECTION_RIGHT);
}
  else if (v == 0)
{
-  if (!strcmp(buf, "up")) e_border_unshade(bd, 
E_DIRECTION_UP);
-  else if (!strcmp(buf, "down")) e_border_unshade(bd, 
E_DIRECTION_DOWN);
-  else if (!strcmp(buf, "left")) e_border_unshade(bd, 
E_DIRECTION_LEFT);
-  else if (!strcmp(buf, "right")) e_border_unshade(bd, 
E_DIRECTION_RIGHT);
+  if (!strcmp(buf, "up")) 
+e_border_unshade(bd, E_DIRECTION_UP);
+  else if (!strcmp(buf, "down")) 
+e_border_unshade(bd, E_DIRECTION_DOWN);
+  else if (!strcmp(buf, "left")) 
+e_border_unshade(bd, E_DIRECTION_LEFT);
+  else if (!strcmp(buf, "right")) 
+e_border_unshade(bd, E_DIRECTION_RIGHT);
}
   }
  }
@@ -600,7 +608,8 @@
 /***/
 ACT_FN_GO(window_borderless_toggle)
 {
-   if ((!obj) || (obj->type != E_BORDER_TYPE)) obj = 
E_OBJECT(e_border_focused_get());
+   if ((!obj) || (obj->type != E_BORDER_TYPE)) 
+ obj = E_OBJECT(e_border_focused_get());
if (!obj) return;
if (!((E_Border *)obj)->lock_border)
  {
@@ -617,6 +626,26 @@
  }
 }
 
+ /***/
+ACT_FN_GO(window_pinned_toggle) 
+{ 
+   if ((!obj) || (obj->type != E_BORDER_TYPE)) 
+ obj = E_OBJECT(e_border_focused_get()); 
+   if (!obj) return; 
+   if (!((E_Border *)obj)->lock_border) 
+ {
+   E_Border *bd; 
+   
+   bd = (E_Border *)obj;
+
+   if ((bd->client.netwm.state.stacking == E_STACKING_BELOW) && 
+ (bd->user_skip_winlist) && (bd->borderless))
+ e_border_pinned_set(bd, 0);
+   else
+ e_border_pinned_set(bd, 1);
+ } 
+}
+
 /***/
 ACT_FN_GO(window_move_by)
 {
@@ -630,22 +659,23 @@
if (params)
  {
int dx, dy;
-
+   
if (sscanf(params, "%i %i", &dx, &dy) == 2)
  {
 E_Border *bd;
-
+
 bd = (E_Border *)obj;
-
+
 e_border_move(bd, bd->x + dx, bd->y + dy);
-
+
 if (e_config->focus_policy != E_FOCUS_CLICK)
   ecore_x_pointer_warp(bd->zone->container->win,
bd->x + (bd->w / 2),
bd->y + (bd->h / 2));
-   }
+ }
  }
 }
+
 /***/
 ACT_FN_GO(window_move_to)
 {
@@ -721,8 +751,7 @@
 
 if (e_config->focus_policy != E_FOCUS_CLICK)
   ecore_x_pointer_warp(bd->zone->container->win,
-   bd->x + (dw / 2),
-   bd->y + (dh / 2));
+   bd->x + (dw / 2), bd->y + (dh / 2));
  }
  }
 }
@@ -805,8 +834,7 @@
 
 if (e_config->focus_policy != E_FOCUS_CLICK)
  

E CVS: test doursse

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : test

Dir : e17/test/orig/evas


Modified Files:
evas_software_xcb_main.c 


Log Message:
update the test wrt the changes in the xcb software engine

===
RCS file: /cvs/e/e17/test/orig/evas/evas_software_xcb_main.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_software_xcb_main.c28 Oct 2006 08:23:28 -  1.1
+++ evas_software_xcb_main.c27 Feb 2007 16:09:37 -  1.2
@@ -202,10 +202,13 @@
{
   Evas_Engine_Info_Software_Xcb *einfo;
 
-  einfo = (Evas_Engine_Info_Software_Xcb *) evas_engine_info_get(evas);
+  einfo = (Evas_Engine_Info_Software_Xcb *)
+  evas_engine_info_get(evas);
+  if (!einfo) printf ("merde\n");
 
   /* the following is specific to the engine */
   einfo->info.conn = conn;
+  einfo->info.screen = screen;
   einfo->info.visual = visualtype_get(conn, screen);
   einfo->info.colormap = screen->default_colormap;
   einfo->info.drawable = win;
@@ -231,6 +234,7 @@
 
   /* the following is specific to the engine */
   einfo->info.conn = conn;
+  einfo->info.screen = screen;
   einfo->info.visual = visualtype_get(conn, screen);
   einfo->info.colormap = screen->default_colormap;
   einfo->info.drawable = win;
@@ -256,6 +260,7 @@
 
   /* the following is specific to the engine */
   einfo->info.conn = conn;
+  einfo->info.screen = screen;
   einfo->info.visual = visualtype_get(conn, screen);
   einfo->info.colormap = screen->default_colormap;
   einfo->info.drawable = win;
@@ -281,6 +286,7 @@
 
   /* the following is specific to the engine */
   einfo->info.conn = conn;
+  einfo->info.screen = screen;
   einfo->info.visual = visualtype_get(conn, screen);
   einfo->info.colormap = screen->default_colormap;
   einfo->info.drawable = win;
@@ -306,6 +312,7 @@
 
   /* the following is specific to the engine */
   einfo->info.conn = conn;
+  einfo->info.screen = screen;
   einfo->info.visual = visualtype_get(conn, screen);
   einfo->info.colormap = screen->default_colormap;
   einfo->info.drawable = win;



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas doursse

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_xcb


Modified Files:
Evas_Engine_Software_Xcb.h evas_engine.c evas_engine.h 
evas_outbuf.c evas_xcb_buffer.c 


Log Message:
pass the default screen to the info, as it is not stored by XCB itself. Speed 
up a bit evas_software_xcb_x_can_do_shm

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_xcb/Evas_Engine_Software_Xcb.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- Evas_Engine_Software_Xcb.h  1 Oct 2006 18:26:24 -   1.5
+++ Evas_Engine_Software_Xcb.h  27 Feb 2007 16:08:41 -  1.6
@@ -14,6 +14,7 @@
/* engine specific data & parameters it needs to set up */
struct {
   xcb_connection_t  *conn;
+  xcb_screen_t  *screen;
   xcb_drawable_t drawable;
   xcb_drawable_t mask;
   xcb_visualtype_t  *visual;
@@ -38,6 +39,7 @@
 
   Evas_Performance *(*performance_test) (Evas *e,
 xcb_connection_t *conn,
+ xcb_screen_t *screen,
 xcb_visualtype_t *vis,
 xcb_colormap_tcmap,
 xcb_drawable_tdraw,
@@ -47,6 +49,7 @@
   char *(*performance_key_get)  (Evas_Performance *perf);
   Evas_Performance *(*performance_new)  (Evas *e,
 xcb_connection_t *conn,
+ xcb_screen_t *screen,
 xcb_visualtype_t *vis,
 xcb_colormap_tcmap,
 xcb_drawable_tdraw,
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_xcb/evas_engine.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- evas_engine.c   13 Nov 2006 23:23:44 -  1.16
+++ evas_engine.c   27 Feb 2007 16:08:41 -  1.17
@@ -20,12 +20,12 @@
 };
 
 /* prototypes we will use here */
-static void *_output_setup(int w, int h, int rot, xcb_connection_t *conn, 
xcb_drawable_t draw, xcb_visualtype_t *vis, xcb_colormap_t cmap, int depth, int 
debug, int grayscale, int max_colors, xcb_drawable_t mask, int shape_dither, 
int destination_alpha);
+static void *_output_setup(int w, int h, int rot, xcb_connection_t *conn, 
xcb_screen_t *screen, xcb_drawable_t draw, xcb_visualtype_t *vis, 
xcb_colormap_t cmap, int depth, int debug, int grayscale, int max_colors, 
xcb_drawable_t mask, int shape_dither, int destination_alpha);
 static xcb_visualtype_t *_best_visual_get(xcb_connection_t *conn, int screen);
 static xcb_colormap_t _best_colormap_get(xcb_connection_t *conn, int screen);
 static int _best_depth_get(xcb_connection_t *conn, int screen);
-static Evas_Performance *_output_perf_new(Evas *e, xcb_connection_t *conn, 
xcb_visualtype_t *vis, xcb_colormap_t cmap, xcb_drawable_t draw, int depth);
-static Evas_Performance *_output_perf_test(Evas *e, xcb_connection_t *conn, 
xcb_visualtype_t *vis, xcb_colormap_t cmap, xcb_drawable_t draw, int depth);
+static Evas_Performance *_output_perf_new(Evas *e, xcb_connection_t *conn, 
xcb_screen_t *screen, xcb_visualtype_t *vis, xcb_colormap_t cmap, 
xcb_drawable_t draw, int depth);
+static Evas_Performance *_output_perf_test(Evas *e, xcb_connection_t *conn, 
xcb_screen_t *screen, xcb_visualtype_t *vis, xcb_colormap_t cmap, 
xcb_drawable_t draw, int depth);
 static char *_output_perf_data(Evas_Performance *perf);
 static char *_output_perf_key(Evas_Performance *perf);
 static void _output_perf_free(Evas_Performance *perf);
@@ -50,6 +50,7 @@
  int   h,
  int   rot,
  xcb_connection_t *conn,
+  xcb_screen_t *screen,
  xcb_drawable_tdraw,
  xcb_visualtype_t *vis,
  xcb_colormap_tcmap,
@@ -85,10 +86,11 @@
evas_software_xcb_outbuf_init();
 
/* get any stored performance metrics from device (xserver) */
-   perf = evas_software_xcb_outbuf_perf_restore_x(conn, draw, vis, cmap, 
depth);
+   perf = evas_software_xcb_outbuf_perf_restore_x(conn, screen, draw, vis, 
cmap, depth);
re->ob = evas_software_xcb_outbuf_setup_x(w, h, rot,
 OUTBUF_DEPTH_INHERIT,
 conn,
+ screen,
 draw,
 vis,
   

E CVS: libs/evas doursse

2007-02-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_xcb


Modified Files:
evas_outbuf.c evas_xcb_buffer.c 


Log Message:
update software xcb engine to match xlib engine improvements during startup

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_xcb/evas_outbuf.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- evas_outbuf.c   27 Feb 2007 13:39:44 -  1.13
+++ evas_outbuf.c   27 Feb 2007 15:17:18 -  1.14
@@ -154,6 +154,7 @@
 else
pm = PAL_MODE_MONO;
  }
+/* FIXME: only alloc once per display+cmap */
buf->priv.pal =
   evas_software_xcb_x_color_allocate(conn,
  cmap,
@@ -771,14 +772,19 @@
 {
/* create an "empty" perf struct with just the system & display info */
Outbuf_Perf   *perf;
+#if 0
xcb_drawable_t root;
struct utsname un;
FILE  *f;
+#endif
 
perf = calloc(1, sizeof(Outbuf_Perf));
 
perf->x.conn = conn;
 
+   perf->min_shm_image_pixel_count = 200 * 200;/* default hard-coded */
+
+#if 0
/* FIXME: should use the default screen */
root = xcb_setup_roots_iterator ((xcb_setup_t *)xcb_get_setup 
(conn)).data->root;
if (draw)
@@ -814,8 +820,6 @@
perf->x.screen_count = xcb_setup_roots_iterator((xcb_setup_t 
*)xcb_get_setup(conn)).rem;
perf->x.depth= x_depth;
 
-   perf->min_shm_image_pixel_count = 200 * 200;/* default hard-coded */
-
if (!uname(&un))
  {
perf->os.name = strdup(un.sysname);
@@ -879,9 +883,8 @@
  }
if (!perf->cpu.info)
   perf->cpu.info = strdup("");
+#endif
return perf;
-   vis = NULL;
-   cmap = 0;
 }
 
 char *
@@ -889,6 +892,8 @@
 {
/* get a seriazed string that is a unique identifier for your */
/* hardware/x/connection setup. */
+   return NULL;
+#if 0
char  buf[32768];
int   sum1, sum2, i;
char *p;
@@ -912,12 +917,15 @@
  }
snprintf(buf, sizeof(buf), "%08x%08x", sum1, sum2);
return strdup(buf);
+#endif
 }
 
 void
 evas_software_xcb_outbuf_perf_store_x(Outbuf_Perf *perf)
 {
/* write performance results to x root property */
+   return;
+#if 0
xcb_intern_atom_cookie_t cookie_atom;
xcb_get_input_focus_cookie_t cookie_focus;
xcb_intern_atom_reply_t *reply_atom;
@@ -951,6 +959,7 @@
free(reply_focus);
free(str);
free (reply_atom);
+#endif
 }
 
 Outbuf_Perf *
@@ -961,15 +970,19 @@
int   x_depth)
 {
/* read performance results from root window */
+#if 0
xcb_intern_atom_reply_t  *type_rep;
xcb_get_property_cookie_t cookie;
xcb_get_property_reply_t *prop_rep;
char *type_str;
xcb_atom_ttype, format;
+#endif
Outbuf_Perf  *perf;
 
perf = evas_software_xcb_outbuf_perf_new_x(conn, draw, vis, cmap, x_depth);
+   return perf;
 
+#if 0
type_str = "__EVAS_PERF_ENGINE_SOFTWARE";
type_rep = xcb_intern_atom_reply(conn,
 xcb_intern_atom_unchecked(conn,
@@ -1007,18 +1020,21 @@
  free(prop_rep);
 
return perf;
+#endif
 }
 
 void
 evas_software_xcb_outbuf_perf_free(Outbuf_Perf *perf)
 {
/* free the perf struct */
+#if 0
free(perf->x.display);
free(perf->x.vendor);
free(perf->os.name);
free(perf->os.version);
free(perf->os.machine);
free(perf->cpu.info);
+#endif
free(perf);
 }
 
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_xcb/evas_xcb_buffer.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_xcb_buffer.c   10 Oct 2006 19:32:36 -  1.9
+++ evas_xcb_buffer.c   27 Feb 2007 15:17:18 -  1.10
@@ -62,10 +62,14 @@
 int
 evas_software_xcb_x_can_do_shm(xcb_connection_t *c)
 {
+   static xcb_connection_t  *cached_c = NULL;
+   static intcached_result = 0;
xcb_get_geometry_reply_t *geom;
xcb_drawable_tdrawable;
int   depth;
 
+   if (c == cached_c) return cached_result;
+   cached_c = c;
/* FIXME: get the corect screen */
drawable = xcb_setup_roots_iterator (xcb_get_setup(c)).data->root;
geom = xcb_get_geometry_reply (c, xcb_get_geometry_unchecked(c, drawable), 
0);
@@ -85,10 +89,16 @@
  16,
  2,
  NULL);
-   if (!xcbob) return 0;
+   if (!xcbob)
+ {
+cached_result = 0;
+return 0;
+ }
evas_software_xcb_x_output_buffer_free(xcbob, 1);
+   cached