only bring up config dialogs once - find the previous one and splash it up if


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 17 years ago
parent 7005802eb6
commit 8678ebe026
  1. 41
      src/bin/e_config_dialog.c
  2. 3
      src/bin/e_config_dialog.h
  3. 28
      src/bin/e_configure.c
  4. 1
      src/bin/e_int_config_apps.c
  5. 1
      src/bin/e_int_config_cfgdialogs.c
  6. 1
      src/bin/e_int_config_color_classes.c
  7. 1
      src/bin/e_int_config_cursor.c
  8. 39
      src/bin/e_int_config_desklock.c
  9. 1
      src/bin/e_int_config_desks.c
  10. 1
      src/bin/e_int_config_display.c
  11. 1
      src/bin/e_int_config_exebuf.c
  12. 1
      src/bin/e_int_config_focus.c
  13. 1
      src/bin/e_int_config_fonts.c
  14. 1
      src/bin/e_int_config_icon_themes.c
  15. 1
      src/bin/e_int_config_intl.c
  16. 33
      src/bin/e_int_config_keybindings.c
  17. 1
      src/bin/e_int_config_menus.c
  18. 1
      src/bin/e_int_config_modules.c
  19. 33
      src/bin/e_int_config_mousebindings.c
  20. 1
      src/bin/e_int_config_paths.c
  21. 1
      src/bin/e_int_config_performance.c
  22. 1
      src/bin/e_int_config_shelf.c
  23. 1
      src/bin/e_int_config_startup.c
  24. 1
      src/bin/e_int_config_theme.c
  25. 7
      src/bin/e_int_config_transitions.c
  26. 1
      src/bin/e_int_config_wallpaper.c
  27. 1
      src/bin/e_int_config_window_display.c
  28. 1
      src/bin/e_int_config_window_manipulation.c
  29. 3
      src/bin/e_int_config_winlist.c

@ -16,6 +16,7 @@ static void _e_config_dialog_cb_changed(void *data, Evas_Object *obj);
static void _e_config_dialog_cb_close(void *data, E_Dialog *dia);
/* local subsystem globals */
static Evas_List *_e_config_dialog_list = NULL;
/* externally accessible functions */
@ -70,15 +71,53 @@ e_config_dialog_new(E_Container *con, const char *title, const char *name, const
_e_config_dialog_go(cfd, E_CONFIG_DIALOG_CFDATA_TYPE_BASIC);
break;
}
_e_config_dialog_list = evas_list_append(_e_config_dialog_list, cfd);
return cfd;
}
EAPI int
e_config_dialog_find(const char *name, const char *class)
{
Evas_List *l;
E_Config_Dialog *cfd;
for (l = _e_config_dialog_list; l; l = l->next)
{
cfd = l->data;
if ((!e_util_strcmp(name, cfd->name)) &&
(!e_util_strcmp(class, cfd->class)))
{
E_Zone *z;
e_border_uniconify(cfd->dia->win->border);
e_dialog_show(cfd->dia);
e_win_raise(cfd->dia->win);
z = e_util_zone_current_get(e_manager_current_get());
if (z->container == cfd->dia->win->border->zone->container)
e_border_desk_set(cfd->dia->win->border, e_desk_current_get(z));
else
{
if (!cfd->dia->win->border->sticky)
e_desk_show(cfd->dia->win->border->desk);
ecore_x_pointer_warp(cfd->dia->win->border->zone->container->win,
cfd->dia->win->border->zone->x + (cfd->dia->win->border->zone->w / 2),
cfd->dia->win->border->zone->y + (cfd->dia->win->border->zone->h / 2));
}
e_border_unshade(cfd->dia->win->border, E_DIRECTION_DOWN);
return 1;
}
}
return 0;
}
/* local subsystem functions */
static void
_e_config_dialog_free(E_Config_Dialog *cfd)
{
_e_config_dialog_list = evas_list_remove(_e_config_dialog_list, cfd);
if (cfd->auto_apply_timer) _e_config_dialog_cb_auto_apply_timer(cfd);
if (cfd->title) evas_stringshare_del(cfd->title);
if (cfd->name) evas_stringshare_del(cfd->name);

@ -53,6 +53,7 @@ struct _E_Config_Dialog
};
EAPI E_Config_Dialog *e_config_dialog_new(E_Container *con, const char *title, const char *name, const char *class, const char *icon, int icon_size, E_Config_Dialog_View *view, void *data);
EAPI int e_config_dialog_find(const char *name, const char *class);
#endif
#endif

@ -14,12 +14,37 @@ static void _e_configure_cb_resize(E_Win *win);
static void _e_configure_cb_standard(void *data);
static void _e_configure_cb_close(void *data, void *data2);
static E_Configure *_e_configure = NULL;
EAPI E_Configure *
e_configure_show(E_Container *con)
{
E_Configure *eco;
E_Manager *man;
Evas_Coord ew, eh, mw, mh;
if (_e_configure)
{
E_Zone *z;
eco = _e_configure;
z = e_util_zone_current_get(e_manager_current_get());
e_border_uniconify(eco->win->border);
e_win_show(eco->win);
e_win_raise(eco->win);
if (z->container == eco->win->border->zone->container)
e_border_desk_set(eco->win->border, e_desk_current_get(z));
else
{
if (!eco->win->border->sticky)
e_desk_show(eco->win->border->desk);
ecore_x_pointer_warp(eco->win->border->zone->container->win,
eco->win->border->zone->x + (eco->win->border->zone->w / 2),
eco->win->border->zone->y + (eco->win->border->zone->h / 2));
}
e_border_unshade(eco->win->border, E_DIRECTION_DOWN);
return NULL;
}
if (!con)
{
@ -126,6 +151,8 @@ e_configure_show(E_Container *con)
e_widget_focus_set(eco->ilist, 1);
e_widget_ilist_go(eco->ilist);
_e_configure = eco;
return eco;
}
@ -159,6 +186,7 @@ e_configure_header_item_add(E_Configure *eco, char *icon, char *label)
static void
_e_configure_free(E_Configure *eco)
{
_e_configure = NULL;
while (eco->cblist)
{
free(eco->cblist->data);

@ -90,6 +90,7 @@ e_int_config_apps_once(E_Container *con, const char *label, int (*func) (void *d
EAPI E_Config_Dialog *
e_int_config_apps(E_Container *con)
{
if (e_config_dialog_find("E", "_config_applications_dialog")) return NULL;
return e_int_config_apps_once(con, NULL, NULL, NULL);
}

@ -21,6 +21,7 @@ e_int_config_cfgdialogs(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_config_dialog_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -94,6 +94,7 @@ e_int_config_color_classes(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_color_classes")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
if (!v) return NULL;

@ -21,6 +21,7 @@ e_int_config_cursor(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_cursor_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -96,25 +96,26 @@ struct _E_Config_Dialog_Data
EAPI E_Config_Dialog *
e_int_config_desklock(E_Container *con)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
v->advanced.apply_cfdata = _advanced_apply_data;
v->advanced.create_widgets = _advanced_create_widgets;
v->override_auto_apply = 1;
cfd = e_config_dialog_new(con,
_("Desktop Lock Settings"),
"E", "_config_desklock_dialog",
"enlightenment/desklock", 0, v, NULL);
return cfd;
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_desklock_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
v->advanced.apply_cfdata = _advanced_apply_data;
v->advanced.create_widgets = _advanced_create_widgets;
v->override_auto_apply = 1;
cfd = e_config_dialog_new(con,
_("Desktop Lock Settings"),
"E", "_config_desklock_dialog",
"enlightenment/desklock", 0, v, NULL);
return cfd;
}

@ -37,6 +37,7 @@ e_int_config_desks(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_desks_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
/* methods */

@ -186,6 +186,7 @@ e_int_config_display(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_display_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;

@ -32,6 +32,7 @@ e_int_config_exebuf(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_exebuf_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -34,6 +34,7 @@ e_int_config_focus(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_focus_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
/* methods */

@ -123,6 +123,7 @@ e_int_config_fonts(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_fonts_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -45,6 +45,7 @@ e_int_config_icon_themes(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_icon_theme_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -515,6 +515,7 @@ e_int_config_intl(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_intl_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -301,22 +301,23 @@ void e_int_config_keybindings_unregister_all_action_predef_names()
EAPI E_Config_Dialog *
e_int_config_keybindings(E_Container *con)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
v->override_auto_apply = 1;
cfd = e_config_dialog_new(con,
_("Key Binding Settings"),
"E", "_config_keybindings_dialog",
"enlightenment/keys", 0, v, NULL);
return cfd;
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_keybindings_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
v->override_auto_apply = 1;
cfd = e_config_dialog_new(con,
_("Key Binding Settings"),
"E", "_config_keybindings_dialog",
"enlightenment/keys", 0, v, NULL);
return cfd;
}
static void

@ -27,6 +27,7 @@ e_int_config_menus(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_menus_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -53,6 +53,7 @@ e_int_config_modules(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_modules_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -119,22 +119,23 @@ struct _E_Config_Dialog_Data
EAPI E_Config_Dialog *
e_int_config_mousebindings(E_Container *con)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
v->override_auto_apply = 0;
cfd = e_config_dialog_new(con,
_("Mouse Binding Settings"),
"E", "_config_mousebindings_dialog",
"enlightenment/mouse_clean", 0, v, NULL);
return cfd;
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_mousebindings_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
v->override_auto_apply = 0;
cfd = e_config_dialog_new(con,
_("Mouse Binding Settings"),
"E", "_config_mousebindings_dialog",
"enlightenment/mouse_clean", 0, v, NULL);
return cfd;
}
static void

@ -53,6 +53,7 @@ e_int_config_paths(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_paths_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -25,6 +25,7 @@ e_int_config_performance(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_performance_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -25,6 +25,7 @@ e_int_config_shelf(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_shelf_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
if (!v) return NULL;
v->create_cfdata = _create_data;

@ -27,6 +27,7 @@ e_int_config_startup(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_startup_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -33,6 +33,7 @@ e_int_config_theme(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_theme_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -24,6 +24,7 @@ e_int_config_transitions(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_transitions_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
if (!v) return NULL;
@ -32,9 +33,9 @@ e_int_config_transitions(E_Container *con)
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
cfd = e_config_dialog_new(con, _("Transition Settings"),"E",
"_config_transitions_dialog", "enlightenment/transitions",
0, v, NULL);
cfd = e_config_dialog_new(con, _("Transition Settings"),
"E", "_config_transitions_dialog",
"enlightenment/transitions", 0, v, NULL);
if (!cfd) return NULL;
return cfd;
}

@ -39,6 +39,7 @@ e_int_config_wallpaper(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_wallpaper_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;

@ -37,6 +37,7 @@ e_int_config_window_display(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_window_display_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
/* methods */

@ -36,6 +36,7 @@ e_int_config_window_manipulation(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_window_manipulation_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
/* methods */

@ -39,6 +39,7 @@ e_int_config_winlist(E_Container *con)
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_winlist_dialog")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
@ -47,7 +48,7 @@ e_int_config_winlist(E_Container *con)
v->basic.create_widgets = _basic_create_widgets;
v->advanced.apply_cfdata = _advanced_apply_data;
v->advanced.create_widgets = _advanced_create_widgets;
cfd = e_config_dialog_new(con,
_("Window List Settings"),
"E", "_config_winlist_dialog",

Loading…
Cancel
Save