From f780a2408ed2d945a052ba3d02b81e8f103ab719 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 17 Oct 2006 13:49:47 +0000 Subject: [PATCH] fix screen res dialog - "are you sure dialog" was a glitch with auto-remembers. fixed. also the selection jumps back to the old res too now. fix res adjust of windows to adjust right again. SVN revision: 26675 --- TODO | 11 ++++------- src/bin/e_border.c | 4 ++-- src/bin/e_fm.c | 6 ------ src/bin/e_int_config_display.c | 22 ++++++++++++++++------ 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/TODO b/TODO index 925cda0ec..2bbf27b20 100644 --- a/TODO +++ b/TODO @@ -8,13 +8,10 @@ Some of the things (in very short form) that need to be done to E17... BUGS / FIXES ------------------------------------------------------------------------------- -* BUG: on resolution (down to a lower res) change windows used to be shuffled - to a smaller size then reshuffled back to where they were when res goes up - again - but this seems to have broken. -* BUG: screen res popup with "are u sure u want to keep this res" doesnt center - itself (goes to top-left) sometimes. - This also happens with most "centered" windows (logout question dialog, - control panel dialogs), bug in e_win ? +* 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 diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 76d876ac4..8704a05e6 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -509,9 +509,10 @@ e_border_res_change_geometry_restore(E_Border *bd) E_OBJECT_CHECK(bd); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); if (!bd->pre_res_change.valid) return; + if (bd->new_client) return; memcpy(&pre_res_change, &bd->pre_res_change, sizeof(pre_res_change)); - + if (bd->fullscreen) { e_border_unfullscreen(bd); @@ -814,7 +815,6 @@ e_border_fx_offset(E_Border *bd, int x, int y) E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); if ((x == bd->fx.x) && (y == bd->fx.y)) return; - bd->pre_res_change.valid = 0; bd->fx.x = x; bd->fx.y = y; bd->changed = 1; diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index 725bebec6..d093c6887 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -5,12 +5,6 @@ #define OVERCLIP 128 -/* FIXME: display symlinks in icons somehow */ -/* FIXME: bug: drag multiple files doesnt display all files being dragged - only 1 icon shown to be dragged (instead of at least a group) */ -/* FIXME: need a mapping of mimetype to actions to do on the file - * (e actions like import as wallpaper etc. as well as execute app - * X on the file based on what mimetypes the app handles) */ /* FIXME: use edje messages & embryo for scrolling of bg's */ /* FIXME: put in code to allow for custom icons per file/dir somehow */ diff --git a/src/bin/e_int_config_display.c b/src/bin/e_int_config_display.c index d4ee303b1..af8e41034 100644 --- a/src/bin/e_int_config_display.c +++ b/src/bin/e_int_config_display.c @@ -10,10 +10,11 @@ static void *_create_data (E_Config_Dialog *cfd); static void _free_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); static int _basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); static Evas_Object *_basic_create_widgets (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); -static void _load_rates (void *data); +static void _load_rates (void *data, E_Config_Dialog_Data *cfdata); static void _ilist_item_change (void *data); static int _deferred_noxrandr_error (void *data); +/* FIXME: although this works.. this is nasty - shoudl be in cfdata */ Evas_Object *rate_list = NULL; Evas_Object *res_list = NULL; @@ -51,6 +52,7 @@ struct _E_Config_Dialog_Data int flip; int flip_x; int flip_y; + int orig_res, orig_refresh; SureBox *surebox; }; @@ -93,6 +95,8 @@ _surebox_dialog_cb_no(void *data, E_Dialog *dia) sb->cfdata->orig_size = sb->orig_size; sb->cfdata->orig_rate = sb->orig_rate; e_config_save_queue(); + e_widget_ilist_selected_set(res_list, sb->cfdata->orig_res); + e_widget_ilist_selected_set(rate_list, sb->cfdata->orig_refresh); _surebox_dialog_cb_delete(dia->win); } @@ -141,6 +145,8 @@ _surebox_timer_cb(void *data) sb->cfdata->orig_size = sb->orig_size; sb->cfdata->orig_rate = sb->orig_rate; e_config_save_queue(); + e_widget_ilist_selected_set(res_list, sb->cfdata->orig_res); + e_widget_ilist_selected_set(rate_list, sb->cfdata->orig_refresh); sb->timer = NULL; e_object_del(E_OBJECT(sb->dia)); sb->dia = NULL; @@ -170,9 +176,9 @@ _surebox_new(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) e_dialog_button_add(sb->dia, _("Yes"), NULL, _surebox_dialog_cb_yes, sb); e_dialog_button_add(sb->dia, _("No"), NULL, _surebox_dialog_cb_no, sb); e_dialog_button_focus_num(sb->dia, 1); + e_win_centered_set(sb->dia->win, 1); e_win_borderless_set(sb->dia->win, 1); e_win_layer_set(sb->dia->win, 6); - e_win_centered_set(sb->dia->win, 1); e_win_sticky_set(sb->dia->win, 1); e_dialog_show(sb->dia); e_object_ref(E_OBJECT(cfd)); @@ -436,8 +442,9 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf if ((res->size.width == size.width) && (res->size.height == size.height)) { + cfdata->orig_res = i; e_widget_ilist_selected_set(ol, i); - _load_rates(res); + _load_rates(res, cfdata); } } } @@ -489,7 +496,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf } static void -_load_rates(void *data) +_load_rates(void *data, E_Config_Dialog_Data *cfdata) { int k, r; E_Manager *man; @@ -509,7 +516,10 @@ _load_rates(void *data) snprintf(buf, sizeof(buf), "%i Hz", rts[k].rate); e_widget_ilist_append(rate_list, NULL, buf, NULL, NULL, NULL); if (rt.rate == rts[k].rate) - e_widget_ilist_selected_set(rate_list, k); + { + if (cfdata) cfdata->orig_refresh = k; + e_widget_ilist_selected_set(rate_list, k); + } } e_widget_ilist_selected_set(rate_list, 0); } @@ -517,7 +527,7 @@ _load_rates(void *data) static void _ilist_item_change(void *data) { - _load_rates(data); + _load_rates(data, NULL); } static int