[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[e-devel] patches, patches...



 Hello!

 Here are some patches that have been waiting to be sent for some
time ;)
>e-desktop_names-more_efficient_scanning.patch: more efficient way of
scanning when assigning a name to a desktop
>e-i18n-default_desktop_name.patch: allow translation of the default
desktop name
>e_remote_main-add_end_newline.patch: only to make the compiler shut :)
>e-screen_ratio-more_work.patch: the screen ratio wasn't used when the
selected background was not de theme default one
>exhibit-jpeg_files: add recognition of .jpeg extension

 Cheers!

                                          ilLogict
Index: apps/e/src/bin/e_desk.c
===================================================================
RCS file: /var/cvs/e/e17/apps/e/src/bin/e_desk.c,v
retrieving revision 1.59
diff -u -r1.59 e_desk.c
--- apps/e/src/bin/e_desk.c	2 Mar 2006 12:03:48 -0000	1.59
+++ apps/e/src/bin/e_desk.c	9 May 2006 18:24:19 -0000
@@ -134,7 +134,7 @@
    E_Container *con;
    E_Zone *zone;
    E_Desk *desk;
-   int d_x, d_y, ok;
+   int d_x, d_y;
    char	name[40];
    
    for (m = e_manager_list(); m; m = m->next)
@@ -151,31 +151,59 @@
 		       for (d_y = 0; d_y < zone->desk_y_count; d_y++)
 		         {
 			    desk = zone->desks[d_x + zone->desk_x_count * d_y];
-			    ok = 0;
+			    snprintf(name, sizeof(name), _(e_config->desktop_default_name), d_x, d_y);
+			    e_desk_name_set(desk,name);
+			 }
+		    }
+	       }
+	  }
+     }
+   
+   for (l = e_config->desktop_names; l; l = l->next)
+     {
+	E_Config_Desktop_Name *cfname;
+
+	cfname = l->data;
+	for (m = e_manager_list(); m; m = m->next)
+	  {
+	     man = m->data;
+	     if (cfname->container >= 0)
+	       {
+		  c = evas_list_nth_list(man->containers, cfname->container);
+		  if (!c) continue;
+	       }
+	     else
+	       {
+		  c = man->containers;
+	       }
+	     
+	     do
+	       {
+		  con = c->data;
+		  if (cfname->zone >= 0)
+		    {
+		       z = evas_list_nth_list(con->zones, cfname->zone);
+		       if (!z) continue;
+		    }
+		  else
+		    {
+		       z = con->zones;
+		    }
 
-			    for (l = e_config->desktop_names; l; l = l->next)
-			      {
-				 E_Config_Desktop_Name *cfname;
-
-				 cfname = l->data;
-				 if ((cfname->container >= 0) &&
-				     (con->num != cfname->container)) continue;
-				 if ((cfname->zone >= 0) &&
-	    			     (zone->num != cfname->zone)) continue;
-				 if ((cfname->desk_x != d_x) || (cfname->desk_y != d_y)) continue;
-				 e_desk_name_set(desk,cfname->name);
-				 ok = 1;
-				 break;
-		       	      }
-
-			    if (!ok)
-			      {
-				 snprintf(name, sizeof(name), _(e_config->desktop_default_name), d_x, d_y);
-				 e_desk_name_set(desk,name);
-			      }
+		  do
+		    {
+		       zone = z->data;
+		       if ((cfname->desk_x > zone->desk_x_count) ||
+			   (cfname->desk_y > zone->desk_y_count))
+			 {
+			    continue;
 			 }
+		       desk = zone->desks[cfname->desk_x + zone->desk_x_count * cfname->desk_y];
+		       e_desk_name_set(desk,cfname->name);
 		    }
+		  while ((cfname->zone < 0) && (z = z->next));
 	       }
+	     while ((cfname->container < 0) && (c = c->next));
 	  }
      }
 }
Index: apps/e/src/bin/e_config.c
===================================================================
RCS file: /var/cvs/e/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.166
diff -u -r1.166 e_config.c
--- apps/e/src/bin/e_config.c	21 Apr 2006 06:58:11 -0000	1.166
+++ apps/e/src/bin/e_config.c	9 May 2006 18:24:19 -0000
@@ -508,7 +508,7 @@
    IFCFG(0x008d);
    e_config->show_splash = 1;
    e_config->desktop_default_background = NULL;
-   e_config->desktop_default_name = evas_stringshare_add("Desktop %i, %i");
+   e_config->desktop_default_name = evas_stringshare_add(_("Desktop %i, %i"));
    e_config->menus_scroll_speed = 1000.0;
    e_config->menus_fast_mouse_move_threshhold = 300.0;
    e_config->menus_click_drag_timeout = DEF_MENUCLICK;
Index: apps/e/src/bin/e_remote_main.c
===================================================================
RCS file: /var/cvs/e/e17/apps/e/src/bin/e_remote_main.c,v
retrieving revision 1.53
diff -u -r1.53 e_remote_main.c
--- apps/e/src/bin/e_remote_main.c	10 Mar 2006 05:48:46 -0000	1.53
+++ apps/e/src/bin/e_remote_main.c	9 May 2006 18:24:21 -0000
@@ -272,4 +272,4 @@
 	printf("%s\n", opt->desc);
      }
 }
-#endif
\ No newline at end of file
+#endif
Index: apps/e/src/bin/e_int_config_background.c
===================================================================
RCS file: /var/cvs/e/e17/apps/e/src/bin/e_int_config_background.c,v
retrieving revision 1.48
diff -u -r1.48 e_int_config_background.c
--- apps/e/src/bin/e_int_config_background.c	2 May 2006 06:23:55 -0000	1.48
+++ apps/e/src/bin/e_int_config_background.c	9 May 2006 18:24:20 -0000
@@ -306,7 +306,7 @@
 	else
 	  ic = e_thumb_evas_object_get(c, cfd->dia->win->evas, 48, 48, 1);
 
-	e_widget_ilist_append(il, ic, "Theme Background", _ilist_cb_bg_selected, cfd, "");
+	e_widget_ilist_append(il, ic, _("Theme Background"), _ilist_cb_bg_selected, cfd, "");
 	if (!e_config->desktop_default_background) selnum = i;
 	i++;
      }
@@ -316,8 +316,6 @@
 			     e_zone_current_get(cfd->dia->win->container)->w);
    e_widget_preview_edje_set(im, f, "desktop/background");
    evas_object_del(bg_obj);
-//   im = e_widget_preview_add_from_object(cfd->dia->win->evas, bg_obj, 320, 240);
-//   e_widget_preview_object_set(im, e_thumb_evas_object_get(c, cfd->dia->win->evas, 320, 240, 1));
 
    evas_object_del(o);
    ecore_evas_free(eebuf);
@@ -384,10 +382,10 @@
 		  selnum = i;
 		  
 		  evas_object_del(im);
-		  im = e_widget_preview_add(cfd->dia->win->evas, 320, 240);
+		  im = e_widget_preview_add(cfd->dia->win->evas, 320, 
+					    (320 * e_zone_current_get(cfd->dia->win->container)->h) /
+					    e_zone_current_get(cfd->dia->win->container)->w);
 		  e_widget_preview_edje_set(im, e_config->desktop_default_background, "desktop/background");
-		  // im = e_widget_preview_add_from_object(cfd->dia->win->evas, o, 320, 240);
-		  // e_widget_preview_object_set(im, e_thumb_evas_object_get(full_path, cfd->dia->win->evas, 320, 240, 1));
 	       }
 	     i++;
 	  }
@@ -420,12 +418,10 @@
 	
 	theme = e_theme_edje_file_get("base/theme/backgrounds", "desktop/background");
 	e_widget_preview_edje_set(cfd->data, theme, "desktop/background");
-//	e_widget_preview_object_set(cfd->data, e_thumb_evas_object_get(strdup(theme), evas, 320, 240, 1));
      }
    else
      {
 	e_widget_preview_edje_set(cfd->data, cfdata->bg, "desktop/background");
-//	e_widget_preview_object_set(cfd->data, e_thumb_evas_object_get(cfdata->bg, evas, 320, 240, 1));
      }
 
    if (cfdata->current_bg)
Index: apps/e/src/bin/e_int_config_desklock.c
===================================================================
RCS file: /var/cvs/e/e17/apps/e/src/bin/e_int_config_desklock.c,v
retrieving revision 1.14
diff -u -r1.14 e_int_config_desklock.c
--- apps/e/src/bin/e_int_config_desklock.c	30 Apr 2006 04:31:42 -0000	1.14
+++ apps/e/src/bin/e_int_config_desklock.c	9 May 2006 18:24:20 -0000
@@ -8,7 +8,8 @@
 #define BG_LIST_ICON_SIZE_H 32
 
 #define BG_PREVIEW_W 280
-#define BG_PREVIEW_H 200
+#define BG_PREVIEW_H ((BG_PREVIEW_W * e_zone_current_get(cfd->dia->win->container)->h) / \
+		     e_zone_current_get(cfd->dia->win->container)->w)
 
 #define DEF_DESKLOCK_BACKGROUND	"theme_desklock_background"
 #define DEF_THEME_BACKGROUND	"theme_background"
@@ -53,6 +54,8 @@
 
 struct _E_Config_Dialog_Data
 {
+   E_Config_Dialog *cfd;
+   
    char *desklock_passwd;
    char *desklock_passwd_cp;
    int show_password; // local
@@ -203,6 +206,7 @@
   cfdata = E_NEW(E_Config_Dialog_Data, 1);
   cfdata->desklock_passwd = strdup("");
   cfdata->desklock_passwd_cp = strdup("");
+  cfdata->cfd = cfd;
 
   _fill_desklock_data(cfdata);
 
@@ -654,6 +658,7 @@
 static void
 _load_bgs(E_Config_Dialog_Data *cfdata)
 {
+  E_Config_Dialog *cfd;
   Evas_Object *o, *ic, *im;
   Ecore_Evas *eebuf;
   Evas *evasbuf;
@@ -664,6 +669,7 @@
   if (!cfdata || !cfdata->gui.bg_list)
     return;
 
+  cfd = cfdata->cfd;
   eebuf = ecore_evas_buffer_new(1, 1);
   evasbuf = ecore_evas_get(eebuf);
 
@@ -680,7 +686,7 @@
       else
 	ic = e_thumb_evas_object_get(c, cfdata->evas, BG_LIST_ICON_SIZE_W, BG_LIST_ICON_SIZE_H, 1);
 
-      e_widget_ilist_append(cfdata->gui.bg_list, ic, "Theme DeskLock Background",
+      e_widget_ilist_append(cfdata->gui.bg_list, ic, _("Theme DeskLock Background"),
 			    _ibg_list_cb_bg_selected, cfdata, DEF_DESKLOCK_BACKGROUND);
     }
 
@@ -690,9 +696,6 @@
 
    im = e_widget_preview_add(cfdata->evas, BG_PREVIEW_W, BG_PREVIEW_H);
    e_widget_preview_edje_set(im, c, "desktop/background");
-//   im = e_widget_image_add_from_object(cfdata->evas, bg_obj, BG_PREVIEW_W, BG_PREVIEW_H);
-//   e_widget_image_object_set(im, e_thumb_evas_object_get(c, cfdata->evas, BG_PREVIEW_W,
-//							 BG_PREVIEW_H, 1));
 
   evas_object_del(o);
   ecore_evas_free(eebuf);
@@ -716,7 +719,7 @@
       else
 	ic = e_thumb_evas_object_get(c, cfdata->evas, BG_LIST_ICON_SIZE_W, BG_LIST_ICON_SIZE_H, 1);
 
-      e_widget_ilist_append(cfdata->gui.bg_list, ic, "Theme Background", _ibg_list_cb_bg_selected,
+      e_widget_ilist_append(cfdata->gui.bg_list, ic, _("Theme Background"), _ibg_list_cb_bg_selected,
 			    cfdata, DEF_THEME_BACKGROUND);
     }
 
@@ -726,9 +729,6 @@
        e_widget_ilist_selected_set(cfdata->gui.bg_list, 1);
        im = e_widget_preview_add(cfdata->evas, BG_PREVIEW_W, BG_PREVIEW_H);
        e_widget_preview_edje_set(im, c, "desktop/background");
-//      im = e_widget_image_add_from_object(cfdata->evas, bg_obj, BG_PREVIEW_W, BG_PREVIEW_H);
-//      e_widget_image_object_set(im, e_thumb_evas_object_get(c, cfdata->evas, BG_PREVIEW_W,
-//							    BG_PREVIEW_H, 1));
     }
 
   evas_object_del(o);
@@ -774,10 +774,6 @@
 		   evas_object_del(im);
 		   im = e_widget_preview_add(cfdata->evas, BG_PREVIEW_W, BG_PREVIEW_H);
 		   e_widget_preview_edje_set(im, full_path, "desktop/background");
-//		  im = e_widget_image_add_from_object(cfdata->evas, o, BG_PREVIEW_W, BG_PREVIEW_H);
-//		  e_widget_image_object_set(im, e_thumb_evas_object_get(full_path, cfdata->evas,
-//									BG_PREVIEW_W, BG_PREVIEW_H,
-//									1));
 		}
 	      i++;
 	    }
@@ -807,9 +803,6 @@
 	     
 	     theme = e_theme_edje_file_get("base/theme/desklock", "desklock/background");
 	     e_widget_preview_edje_set(cfdata->preview_image, theme, "desktop/background");
-//	   e_widget_image_object_set(cfdata->preview_image, 
-//				    e_thumb_evas_object_get(strdup(theme), cfdata->evas,
-//							    BG_PREVIEW_W, BG_PREVIEW_H, 1));
 	  }
 	else if (strcmp(cfdata->cur_bg, DEF_THEME_BACKGROUND) == 0)
 	  {
@@ -817,16 +810,10 @@
 	     
 	     theme = e_theme_edje_file_get("base/theme/backgrounds", "desktop/background");
 	     e_widget_preview_edje_set(cfdata->preview_image, theme, "desktop/background");
-//	   e_widget_image_object_set(cfdata->preview_image, 
-//				     e_thumb_evas_object_get(strdup(theme), cfdata->evas,
-//							     BG_PREVIEW_W, BG_PREVIEW_H, 1));
 	  }
 	else
 	  {
 	     e_widget_preview_edje_set(cfdata->preview_image, cfdata->cur_bg, "desktop/background");
-//	    e_widget_image_object_set(cfdata->preview_image,
-//				      e_thumb_evas_object_get(cfdata->cur_bg, cfdata->evas,
-//							      BG_PREVIEW_W, BG_PREVIEW_H, 1));
 	  }
      }
    else
@@ -835,9 +822,6 @@
 	
 	theme = e_theme_edje_file_get("base/theme/desklock", "desklock/background");
 	e_widget_preview_edje_set(cfdata->preview_image, theme, "desktop/background");
-//	e_widget_image_object_set(cfdata->preview_image, 
-//				  e_thumb_evas_object_get(strdup(theme), cfdata->evas,
-//							  BG_PREVIEW_W, BG_PREVIEW_H, 1));
      }
 }
 
Index: proto/exhibit/src/bin/exhibit_file.c
===================================================================
RCS file: /var/cvs/e/e17/proto/exhibit/src/bin/exhibit_file.c,v
retrieving revision 1.7
diff -u -r1.7 exhibit_file.c
--- proto/exhibit/src/bin/exhibit_file.c	10 Apr 2006 23:46:24 -0000	1.7
+++ proto/exhibit/src/bin/exhibit_file.c	9 May 2006 18:24:36 -0000
@@ -4,6 +4,7 @@
 char *viewables[] =
 {
    ".jpg",
+   ".jpeg",
    ".png",
    ".gif",
    ".tiff",

Attachment: pgpjWe1UYnUHp.pgp
Description: PGP signature