Hannes Janetzek wrote:
> hi,
> if this patch is ok iwould go on and fix some of the other dialog
> layouts. 
> 
> a screenshot is here:
> http://www.informatik.uni-bremen.de/~jeff/conf2.jpg
> 
> Regards,
> Hannes "jeffdameth" Janetzek
> 
> 
> ------------------------------------------------------------------------
> 
> Index: e_int_config_wallpaper.c
> ===================================================================
> RCS file: 
> /var/cvs/e/e17/apps/e/src/modules/conf_wallpaper/e_int_config_wallpaper.c,v
> retrieving revision 1.1
> diff -u -r1.1 e_int_config_wallpaper.c
> --- e_int_config_wallpaper.c  4 Jul 2007 15:09:24 -0000       1.1
> +++ e_int_config_wallpaper.c  14 Jul 2007 18:07:58 -0000
> @@ -57,7 +57,7 @@
>  e_int_config_wallpaper_desk(E_Container *con, const char *params)
>  {
>     int con_num, zone_num, desk_x, desk_y;
> -   
> +
>     if (!params) return NULL;
>     con_num = zone_num = desk_x = desk_y = -1;
>     if (sscanf(params, "%i %i %i %i", &con_num, &zone_num, &desk_x, &desk_y) 
> != 4)
> @@ -75,7 +75,7 @@
>     if (e_config_dialog_find("E", "_config_wallpaper_dialog")) return NULL;
>     v = E_NEW(E_Config_Dialog_View, 1);
>     cw = E_NEW(E_Config_Wallpaper, 1);
> -  
> +
>     v->create_cfdata           = _create_data;
>     v->free_cfdata             = _free_data;
>     v->basic.apply_cfdata      = _basic_apply_data;
> @@ -109,7 +109,7 @@
>     E_Config_Dialog_Data *cfdata;
>     char path[4096];
>     const char *homedir;
> -   
> +
>     cfdata = dia->cfdata;
>     homedir = e_user_homedir_get();
>     cfdata->fmdir = 1;
> @@ -132,7 +132,7 @@
>  e_int_config_wallpaper_import_done(E_Config_Dialog *dia)
>  {
>     E_Config_Dialog_Data *cfdata;
> -   
> +
>     cfdata = dia->cfdata;
>     cfdata->win_import = NULL;
>  }
> @@ -141,7 +141,7 @@
>  e_int_config_wallpaper_gradient_done(E_Config_Dialog *dia)
>  {
>     E_Config_Dialog_Data *cfdata;
> -   
> +
>     cfdata = dia->cfdata;
>     cfdata->dia_gradient = NULL;
>  }
> @@ -150,7 +150,7 @@
>  _cb_button_up(void *data1, void *data2)
>  {
>     E_Config_Dialog_Data *cfdata;
> -   
> +
>     cfdata = data1;
>     if (cfdata->o_fm)
>       e_fm2_parent_go(cfdata->o_fm);
> @@ -162,7 +162,7 @@
>  _cb_files_changed(void *data, Evas_Object *obj, void *event_info)
>  {
>     E_Config_Dialog_Data *cfdata;
> -   
> +
>     cfdata = data;
>     if (!cfdata->o_fm) return;
>     if (!e_fm2_has_parent_get(cfdata->o_fm))
> @@ -187,7 +187,7 @@
>     E_Fm2_Icon_Info *ici;
>     const char *realpath;
>     char buf[4096];
> -   
> +
>     cfdata = data;
>     if (!cfdata->o_fm) return;
>     selected = e_fm2_selected_list_get(cfdata->o_fm);
> @@ -225,7 +225,7 @@
>     E_Config_Dialog_Data *cfdata;
>     const char *p, *homedir;
>     char buf[4096];
> -   
> +
>     cfdata = data;
>     if (!cfdata->bg) return;
>     if (!cfdata->o_fm) return;
> @@ -247,18 +247,18 @@
>       else
>         p = cfdata->bg;
>       }
> -   
> +
>     e_fm2_select_set(cfdata->o_fm, p, 1);
>     e_fm2_file_show(cfdata->o_fm, p);
>  }
>  
>  static void
> -_cb_files_files_deleted(void *data, Evas_Object *obj, void *event_info) 
> +_cb_files_files_deleted(void *data, Evas_Object *obj, void *event_info)
>  {
>     E_Config_Dialog_Data *cfdata;
>     Evas_List *sel, *all, *n;
>     E_Fm2_Icon_Info *ici, *ic;
> -   
> +
>     cfdata = data;
>     if (!cfdata->bg) return;
>     if (!cfdata->o_fm) return;
> @@ -269,23 +269,23 @@
>     if (!sel) return;
>  
>     ici = sel->data;
> -   
> +
>     all = evas_list_find_list(all, ici);
>     n = evas_list_next(all);
> -   if (!n) 
> +   if (!n)
>       {
>       n = evas_list_prev(all);
>       if (!n) return;
>       }
> -   
> +
>     ic = n->data;
>     if (!ic) return;
> -   
> +
>     e_fm2_select_set(cfdata->o_fm, ic->file, 1);
>     e_fm2_file_show(cfdata->o_fm, ic->file);
> -   
> +
>     evas_list_free(n);
> -   
> +
>     evas_object_smart_callback_call(cfdata->o_fm, "selection_change", cfdata);
>  }
>  
> @@ -294,7 +294,7 @@
>  {
>     E_Config_Dialog_Data *cfdata;
>     const char *f;
> -   
> +
>     cfdata = data;
>     if (cfdata->use_theme_bg)
>       {
> @@ -320,7 +320,7 @@
>     E_Config_Dialog_Data *cfdata;
>     char path[4096];
>     const char *homedir;
> -   
> +
>     cfdata = data;
>     if (cfdata->fmdir == 1)
>       {
> @@ -338,11 +338,11 @@
>  _cb_import(void *data1, void *data2)
>  {
>     E_Config_Dialog_Data *cfdata;
> -   
> +
>     cfdata = data1;
>     if (cfdata->win_import)
>       e_win_raise(cfdata->win_import);
> -   else 
> +   else
>       cfdata->win_import = e_int_config_wallpaper_import(cfdata->cfd);
>  }
>  
> @@ -350,11 +350,11 @@
>  _cb_gradient(void *data1, void *data2)
>  {
>     E_Config_Dialog_Data *cfdata;
> -   
> +
>     cfdata = data1;
>     if (cfdata->dia_gradient)
>       e_win_raise(cfdata->dia_gradient->win);
> -   else 
> +   else
>       cfdata->dia_gradient = e_int_config_wallpaper_gradient(cfdata->cfd);
>  }
>  
> @@ -364,7 +364,7 @@
>     char path[4096];
>     E_Config_Wallpaper *cw;
>     const E_Config_Desktop_Background *cfbg;
> -  
> +
>     cw = cfdata->cfd->data;
>  
>     if (cw->specific_config)
> @@ -400,10 +400,10 @@
>            cfdata->bg = strdup(cfbg->file);
>         }
>       }
> -   
> -   if ((!cfdata->bg) && e_config->desktop_default_background) 
> +
> +   if ((!cfdata->bg) && e_config->desktop_default_background)
>       cfdata->bg = strdup(e_config->desktop_default_background);
> -   
> +
>     if (cfdata->bg)
>       {
>       const char *f;
> @@ -434,9 +434,9 @@
>  static void
>  _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
>  {
> -   if (cfdata->win_import) 
> +   if (cfdata->win_import)
>       e_int_config_wallpaper_del(cfdata->win_import);
> -   if (cfdata->dia_gradient) 
> +   if (cfdata->dia_gradient)
>       e_int_config_wallpaper_gradient_del(cfdata->dia_gradient);
>     E_FREE(cfdata->bg);
>     E_FREE(cfd->data);
> @@ -453,15 +453,15 @@
>     E_Zone *z;
>     E_Radio_Group *rg;
>     int mw, mh;
> -   
> +
>     homedir = e_user_homedir_get();
>  
>     z = e_zone_current_get(cfd->con);
> -   
> +
>     ot = e_widget_table_add(evas, 0);
>     ol = e_widget_table_add(evas, 0);
>     il = e_widget_table_add(evas, 1);
> -   
> +
>     rg = e_widget_radio_group_new(&(cfdata->fmdir));
>     o = e_widget_radio_add(evas, _("Personal"), 0, rg);
>     cfdata->o_personal = o;
> @@ -471,19 +471,19 @@
>     cfdata->o_system = o;
>     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);
> -   
> +
>     o = e_widget_button_add(evas, _("Go up a Directory"), "widget/up_dir",
>                          _cb_button_up, cfdata, NULL);
>     cfdata->o_up_button = o;
>     e_widget_table_object_append(ol, o, 0, 1, 1, 1, 0, 0, 0, 0);
> -   
> +
>     if (cfdata->fmdir == 1)
>       snprintf(path, sizeof(path), "%s/data/backgrounds", 
> e_prefix_data_get());
>     else
>       snprintf(path, sizeof(path), "%s/.e/e/backgrounds", homedir);
> -   
> +
>     o = e_fm2_add(evas);
>     cfdata->o_fm = o;
>     memset(&fmc, 0, sizeof(E_Fm2_Config));
> @@ -515,7 +515,7 @@
>                                 _cb_files_files_changed, cfdata);
>     evas_object_smart_callback_add(o, "files_deleted",
>                                 _cb_files_files_deleted, cfdata);
> -   
> +
>     e_fm2_path_set(o, path, "/");
>  
>     of = e_widget_scrollframe_pan_add(evas, o,
> @@ -527,9 +527,9 @@
>     e_widget_min_size_set(of, 160, 160);
>     e_widget_table_object_append(ol, of, 0, 2, 1, 1, 1, 1, 1, 1);
>     e_widget_table_object_append(ot, ol, 0, 0, 1, 1, 1, 1, 1, 1);
> -   
> +
>     of = e_widget_list_add(evas, 0, 0);
> -   
> +
>     il = e_widget_list_add(evas, 0, 1);
>     o = e_widget_check_add(evas, _("Use Theme Wallpaper"), 
> &cfdata->use_theme_bg);
>     cfdata->o_theme_bg = o;
> @@ -558,9 +558,9 @@
>     e_widget_preview_edje_set(o, f, "e/desktop/background");
>     e_widget_aspect_child_set(oa, o);
>     e_widget_list_object_append(of, oa, 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);
>     return ot;
>  }
> @@ -602,43 +602,31 @@
>  static Evas_Object *
>  _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, 
> E_Config_Dialog_Data *cfdata)
>  {
> -   Evas_Object *o, *ot, *of, *il, *ol;
> +  Evas_Object *o, *ot, *of, *il, *ol, *oa;
>     char path[4096];
>     const char *f, *homedir;
>     E_Fm2_Config fmc;
>     E_Zone *z;
>     E_Radio_Group *rg;
> -   
> +   int mw, mh;
> +
>     homedir = e_user_homedir_get();
>  
>     z = e_zone_current_get(cfd->con);
> -   
> +
>     ot = e_widget_table_add(evas, 0);
>     ol = e_widget_table_add(evas, 0);
> -   il = e_widget_table_add(evas, 1);
> -   
> -   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);
> -   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);
> -   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);
> -   
> +
>     o = e_widget_button_add(evas, _("Go up a Directory"), "widget/up_dir",
>                          _cb_button_up, cfdata, NULL);
>     cfdata->o_up_button = o;
> -   e_widget_table_object_append(ol, o, 0, 1, 1, 1, 0, 0, 0, 0);
> -   
> +   e_widget_table_object_append(ol, o, 0, 0, 1, 1, 1, 0, 1, 0);
> +
>     if (cfdata->fmdir == 1)
>       snprintf(path, sizeof(path), "%s/data/backgrounds", 
> e_prefix_data_get());
>     else
>       snprintf(path, sizeof(path), "%s/.e/e/backgrounds", homedir);
> -   
> +
>     o = e_fm2_add(evas);
>     cfdata->o_fm = o;
>     memset(&fmc, 0, sizeof(E_Fm2_Config));
> @@ -676,17 +664,13 @@
>                                    e_fm2_pan_max_get,
>                                    e_fm2_pan_child_size_get);
>     cfdata->o_frame = of;
> -   e_widget_min_size_set(of, 160, 160);
> -   e_widget_table_object_append(ol, of, 0, 2, 1, 1, 1, 1, 1, 1);
> -   e_widget_table_object_append(ot, ol, 0, 0, 1, 1, 1, 1, 1, 1);
> -   
> -   of = e_widget_list_add(evas, 0, 0);
> -   
> -   il = e_widget_list_add(evas, 0, 1);
> -   o = e_widget_check_add(evas, _("Use Theme Wallpaper"), 
> &cfdata->use_theme_bg);
> -   cfdata->o_theme_bg = o;
> -   evas_object_smart_callback_add(o, "changed", _cb_theme_wallpaper, cfdata);
> -   e_widget_list_object_append(il, o, 1, 0, 0.5);
> +   e_widget_min_size_set(of, 220, 160);
> +
> +   e_widget_table_object_append(ol, of, 0, 1, 1, 1, 1, 1, 1, 1);
> +
> +   e_widget_table_object_append(ot, ol, 0, 0, 1, 1, 1, 1, 0, 1);
> +
> +   of = e_widget_table_add(evas, 0);
>  
>     ol = e_widget_list_add(evas, 1, 1);
>     o = e_widget_button_add(evas, _("Picture..."), "enlightenment/picture",
> @@ -695,18 +679,46 @@
>     o = e_widget_button_add(evas, _("Gradient..."), "enlightenment/gradient",
>                          _cb_gradient, cfdata, NULL);
>     e_widget_list_object_append(ol, o, 1, 0, 0.5);
> -   e_widget_list_object_append(il, ol, 1, 0, 0.5);
> -   e_widget_list_object_append(of, il, 1, 0, 0.0);
> -   
> -   o = e_widget_preview_add(evas, 320, (320 * z->h) / z->w);
> +
> +   e_widget_table_object_append(of, ol, 0, 0, 2, 1, 1, 0, 1, 0);
> +
> +   mw = 320;
> +   mh = (320 * z->h) / z->w;
> +   oa = e_widget_aspect_add(evas, mw, mh);
> +   o = e_widget_preview_add(evas, mw, mh);
>     cfdata->o_preview = o;
>     if (cfdata->bg)
>       f = cfdata->bg;
>     else
>       f = e_theme_edje_file_get("base/theme/backgrounds", 
> "e/desktop/background");
>     e_widget_preview_edje_set(o, f, "e/desktop/background");
> -   e_widget_list_object_append(of, o, 0, 0, 0.5);
> -   
> +   e_widget_aspect_child_set(oa, o);
> +
> +   e_widget_table_object_append(of, oa, 0, 1, 2, 1, 1, 1, 1, 1);
> +
> +   ol = e_widget_framelist_add(evas, _("Select Source"), 0);
> +
> +   il = e_widget_table_add(evas, 1);
> +
> +   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);
> +   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);
> +   e_widget_table_object_append(il, o, 1, 0, 1, 1, 1, 1, 0, 0);
> +
> +   e_widget_framelist_object_append(ol, il);
> +
> +   o = e_widget_check_add(evas, _("Use Theme Wallpaper"), 
> &cfdata->use_theme_bg);
> +   cfdata->o_theme_bg = o;
> +   evas_object_smart_callback_add(o, "changed", _cb_theme_wallpaper, cfdata);
> +   e_widget_framelist_object_append(ol, o);
> +
> +   e_widget_table_object_append(of, ol, 0, 2, 1, 1, 1, 1, 1, 0);
> +
>     ol = e_widget_framelist_add(evas, _("Where to place the Wallpaper"), 0);
>     e_widget_framelist_content_align_set(ol, 0.0, 0.0);
>     rg = e_widget_radio_group_new(&(cfdata->all_this_desk_screen));
> @@ -720,11 +732,11 @@
>        (e_util_container_zone_number_get(1, 0))))
>       e_widget_disabled_set(o, 1);
>     e_widget_framelist_object_append(ol, o);
> -   
> -   e_widget_list_object_append(of, ol, 1, 0, 0.5);
> -   
> -   e_widget_table_object_append(ot, of, 1, 0, 1, 1, 0, 0, 0, 0);
> -   
> +
> +   e_widget_table_object_append(of, ol, 1, 2, 1, 1, 1, 1, 1, 0);
> +
> +   e_widget_table_object_append(ot, of, 1, 0, 1, 1, 1, 1, 1, 1);
> +
>     e_dialog_resizable_set(cfd->dia, 1);
>     return ot;
>  }
> @@ -735,7 +747,7 @@
>     Evas_List *fl = NULL, *l;
>     E_Zone *z;
>     E_Desk *d;
> -   
> +
>     z = e_zone_current_get(cfdata->cfd->con);
>     if (!z) return 0;
>     d = e_desk_current_get(z);
> @@ -769,18 +781,18 @@
>            e_bg_del(-1, z->num, d->x, d->y);
>            e_bg_del(-1, -1, d->x, d->y);
>            e_bg_add(z->container->num, z->num, d->x, d->y, cfdata->bg);
> -          
> +
>         }
>       else if (cfdata->all_this_desk_screen == E_CONFIG_WALLPAPER_SCREEN)
>         {
>            for (l = e_config->desktop_backgrounds; l; l = l->next)
>              {
>                 E_Config_Desktop_Background *cfbg;
> -               
> +
>                 cfbg = l->data;
>                 if (
>                     (cfbg->container == z->container->num) &&
> -                   (cfbg->zone == z->num) 
> +                   (cfbg->zone == z->num)
>                    )
>                   fl = evas_list_append(fl, cfbg);
>              }
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

(accidently i replied to Raster instead of the list.)

I'm going to be really anal about this.

Do we really really need to have a "go up a directory button" ? isn't 
that what the file dialog is for ? That's enough questions, but don't 
you think both the personal, system, including the theme wallpaper 
should be part of the list itself (at all times) (you could even add a 
header, to separate them or make them more visible to the user). I don't 
see why we need 3 different sources when they could all be selected from 
the list itself.

Now if you allow me to be more critical, the arrow on the "go up a 
directory button never once changes states. Its always the same image, 
regardless of the button state.

-- 
Alberto Castro
http://cored.org/
Interface guidelines: An art form that was never alive.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to