parent
be1b8a833a
commit
0abfe91b78
|
@ -135,7 +135,7 @@ e_int_config_desklock.h \
|
|||
e_int_config_exebuf.h \
|
||||
e_int_config_apps_menu.h \
|
||||
e_int_config_apps_order.h \
|
||||
e_int_config_cfgdialogs.h \
|
||||
e_int_config_dialogs.h \
|
||||
e_int_config_color_classes.h \
|
||||
e_int_config_mime.h \
|
||||
e_int_config_mime_edit.h \
|
||||
|
@ -298,7 +298,7 @@ e_int_config_desklock.c \
|
|||
e_int_config_exebuf.c \
|
||||
e_int_config_apps_menu.c \
|
||||
e_int_config_apps_order.c \
|
||||
e_int_config_cfgdialogs.c \
|
||||
e_int_config_dialogs.c \
|
||||
e_int_config_intl.c \
|
||||
e_int_config_imc.c \
|
||||
e_int_config_imc_import.c \
|
||||
|
|
|
@ -256,8 +256,11 @@ _e_actions_cb_kill_dialog_ok(void *data, E_Dialog *dia)
|
|||
E_Object *obj;
|
||||
|
||||
obj = data;
|
||||
e_object_del(E_OBJECT(kill_dialog));
|
||||
kill_dialog = NULL;
|
||||
if (dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(kill_dialog));
|
||||
kill_dialog = NULL;
|
||||
}
|
||||
if ((!((E_Border *)obj)->lock_close) && (!((E_Border *)obj)->internal))
|
||||
e_border_act_kill_begin((E_Border *)obj);
|
||||
}
|
||||
|
@ -290,6 +293,14 @@ ACT_FN_GO(window_kill)
|
|||
obj = E_OBJECT(e_border_focused_get());
|
||||
if (!obj) return;
|
||||
}
|
||||
if (kill_dialog) e_object_del(E_OBJECT(kill_dialog));
|
||||
|
||||
if (e_config->cnfmdlg_disabled)
|
||||
{
|
||||
_e_actions_cb_kill_dialog_ok (obj, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
bd = (E_Border *)obj;
|
||||
snprintf(dialog_text, sizeof(dialog_text),
|
||||
_("You are about to kill %s.<br><br>"
|
||||
|
@ -298,7 +309,6 @@ ACT_FN_GO(window_kill)
|
|||
"Are you sure you want to kill this window?"),
|
||||
bd->client.icccm.name);
|
||||
|
||||
if (kill_dialog) e_object_del(E_OBJECT(kill_dialog));
|
||||
kill_dialog = e_dialog_new(e_container_current_get(e_manager_current_get()),
|
||||
"E", "_kill_dialog");
|
||||
if (!kill_dialog) return;
|
||||
|
@ -1552,8 +1562,11 @@ static E_Dialog *exit_dialog = NULL;
|
|||
static void
|
||||
_e_actions_cb_exit_dialog_ok(void *data, E_Dialog *dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(exit_dialog));
|
||||
exit_dialog = NULL;
|
||||
if (dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(exit_dialog));
|
||||
exit_dialog = NULL;
|
||||
}
|
||||
e_sys_action_do(E_SYS_EXIT, NULL);
|
||||
}
|
||||
|
||||
|
@ -1576,6 +1589,13 @@ _e_actions_cb_exit_dialog_delete(E_Win *win)
|
|||
ACT_FN_GO(exit)
|
||||
{
|
||||
if (exit_dialog) e_object_del(E_OBJECT(exit_dialog));
|
||||
|
||||
if (e_config->cnfmdlg_disabled)
|
||||
{
|
||||
_e_actions_cb_exit_dialog_ok (NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
exit_dialog = e_dialog_new(e_container_current_get(e_manager_current_get()), "E", "_exit_dialog");
|
||||
if (!exit_dialog) return;
|
||||
e_win_delete_callback_set(exit_dialog->win, _e_actions_cb_exit_dialog_delete);
|
||||
|
@ -1613,8 +1633,11 @@ static E_Dialog *logout_dialog = NULL;
|
|||
static void
|
||||
_e_actions_cb_logout_dialog_ok(void *data, E_Dialog *dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(logout_dialog));
|
||||
logout_dialog = NULL;
|
||||
if (dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(logout_dialog));
|
||||
logout_dialog = NULL;
|
||||
}
|
||||
e_sys_action_do(E_SYS_LOGOUT, NULL);
|
||||
}
|
||||
|
||||
|
@ -1637,6 +1660,13 @@ _e_actions_cb_logout_dialog_delete(E_Win *win)
|
|||
ACT_FN_GO(logout)
|
||||
{
|
||||
if (logout_dialog) e_object_del(E_OBJECT(logout_dialog));
|
||||
|
||||
if (e_config->cnfmdlg_disabled)
|
||||
{
|
||||
_e_actions_cb_logout_dialog_ok (NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
logout_dialog = e_dialog_new(e_container_current_get(e_manager_current_get()), "E", "_logout_dialog");
|
||||
if (!logout_dialog) return;
|
||||
e_win_delete_callback_set(logout_dialog->win, _e_actions_cb_logout_dialog_delete);
|
||||
|
@ -1662,8 +1692,11 @@ static E_Dialog *halt_dialog = NULL;
|
|||
static void
|
||||
_e_actions_cb_halt_dialog_ok(void *data, E_Dialog *dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(halt_dialog));
|
||||
halt_dialog = NULL;
|
||||
if (dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(halt_dialog));
|
||||
halt_dialog = NULL;
|
||||
}
|
||||
e_sys_action_do(E_SYS_HALT, NULL);
|
||||
}
|
||||
|
||||
|
@ -1686,6 +1719,13 @@ _e_actions_cb_halt_dialog_delete(E_Win *win)
|
|||
ACT_FN_GO(halt)
|
||||
{
|
||||
if (halt_dialog) e_object_del(E_OBJECT(halt_dialog));
|
||||
|
||||
if (e_config->cnfmdlg_disabled)
|
||||
{
|
||||
_e_actions_cb_halt_dialog_ok (NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
halt_dialog = e_dialog_new(e_container_current_get(e_manager_current_get()), "E", "_halt_dialog");
|
||||
if (!halt_dialog) return;
|
||||
e_win_delete_callback_set(halt_dialog->win, _e_actions_cb_halt_dialog_delete);
|
||||
|
@ -1711,8 +1751,11 @@ static E_Dialog *reboot_dialog = NULL;
|
|||
static void
|
||||
_e_actions_cb_reboot_dialog_ok(void *data, E_Dialog *dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(reboot_dialog));
|
||||
reboot_dialog = NULL;
|
||||
if (dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(reboot_dialog));
|
||||
reboot_dialog = NULL;
|
||||
}
|
||||
e_sys_action_do(E_SYS_REBOOT, NULL);
|
||||
}
|
||||
|
||||
|
@ -1735,6 +1778,13 @@ _e_actions_cb_reboot_dialog_delete(E_Win *win)
|
|||
ACT_FN_GO(reboot)
|
||||
{
|
||||
if (reboot_dialog) e_object_del(E_OBJECT(reboot_dialog));
|
||||
|
||||
if (e_config->cnfmdlg_disabled)
|
||||
{
|
||||
_e_actions_cb_reboot_dialog_ok (NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
reboot_dialog = e_dialog_new(e_container_current_get(e_manager_current_get()), "E", "_reboot_dialog");
|
||||
if (!reboot_dialog) return;
|
||||
e_win_delete_callback_set(reboot_dialog->win, _e_actions_cb_reboot_dialog_delete);
|
||||
|
@ -1760,8 +1810,11 @@ static E_Dialog *suspend_dialog = NULL;
|
|||
static void
|
||||
_e_actions_cb_suspend_dialog_ok(void *data, E_Dialog *dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(suspend_dialog));
|
||||
suspend_dialog = NULL;
|
||||
if (dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(suspend_dialog));
|
||||
suspend_dialog = NULL;
|
||||
}
|
||||
e_sys_action_do(E_SYS_SUSPEND, NULL);
|
||||
}
|
||||
|
||||
|
@ -1784,6 +1837,13 @@ _e_actions_cb_suspend_dialog_delete(E_Win *win)
|
|||
ACT_FN_GO(suspend)
|
||||
{
|
||||
if (suspend_dialog) e_object_del(E_OBJECT(suspend_dialog));
|
||||
|
||||
if (e_config->cnfmdlg_disabled)
|
||||
{
|
||||
_e_actions_cb_suspend_dialog_ok (NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
suspend_dialog = e_dialog_new(e_container_current_get(e_manager_current_get()), "E", "_suspend_dialog");
|
||||
if (!suspend_dialog) return;
|
||||
e_win_delete_callback_set(suspend_dialog->win, _e_actions_cb_suspend_dialog_delete);
|
||||
|
@ -1809,8 +1869,11 @@ static E_Dialog *hibernate_dialog = NULL;
|
|||
static void
|
||||
_e_actions_cb_hibernate_dialog_ok(void *data, E_Dialog *dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(hibernate_dialog));
|
||||
hibernate_dialog = NULL;
|
||||
if (dia)
|
||||
{
|
||||
e_object_del(E_OBJECT(hibernate_dialog));
|
||||
hibernate_dialog = NULL;
|
||||
}
|
||||
e_sys_action_do(E_SYS_HIBERNATE, NULL);
|
||||
}
|
||||
|
||||
|
@ -1833,6 +1896,13 @@ _e_actions_cb_hibernate_dialog_delete(E_Win *win)
|
|||
ACT_FN_GO(hibernate)
|
||||
{
|
||||
if (hibernate_dialog) e_object_del(E_OBJECT(hibernate_dialog));
|
||||
|
||||
if (e_config->cnfmdlg_disabled)
|
||||
{
|
||||
_e_actions_cb_hibernate_dialog_ok (NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
hibernate_dialog = e_dialog_new(e_container_current_get(e_manager_current_get()), "E", "_hibernate_dialog");
|
||||
if (!hibernate_dialog) return;
|
||||
e_win_delete_callback_set(hibernate_dialog->win, _e_actions_cb_hibernate_dialog_delete);
|
||||
|
|
|
@ -478,6 +478,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, exebuf_term_cmd, STR);
|
||||
E_CONFIG_LIST(D, T, color_classes, _e_config_color_class_edd);
|
||||
E_CONFIG_VAL(D, T, use_app_icon, INT);
|
||||
E_CONFIG_VAL(D, T, cnfmdlg_disabled, INT); /**/
|
||||
E_CONFIG_VAL(D, T, cfgdlg_auto_apply, INT); /**/
|
||||
E_CONFIG_VAL(D, T, cfgdlg_default_mode, INT); /**/
|
||||
E_CONFIG_LIST(D, T, gadcons, _e_config_gadcon_edd);
|
||||
|
@ -710,6 +711,7 @@ e_config_init(void)
|
|||
e_config->exebuf_term_cmd = evas_stringshare_add("xterm -hold -e");
|
||||
e_config->color_classes = NULL;
|
||||
e_config->use_app_icon = 0;
|
||||
e_config->cnfmdlg_disabled = 0;
|
||||
e_config->cfgdlg_auto_apply = 0;
|
||||
e_config->cfgdlg_default_mode = 0;
|
||||
e_config->gadcons = NULL;
|
||||
|
@ -1386,6 +1388,10 @@ e_config_init(void)
|
|||
e_config->border_fix_on_shelf_toggle = 0;
|
||||
IFCFGEND;
|
||||
|
||||
IFCFG(0x0117);
|
||||
e_config->cnfmdlg_disabled = 0;
|
||||
IFCFGEND;
|
||||
|
||||
e_config->config_version = E_CONFIG_FILE_VERSION;
|
||||
|
||||
#if 0 /* example of new config */
|
||||
|
@ -1467,6 +1473,7 @@ e_config_init(void)
|
|||
E_CONFIG_LIMIT(e_config->menu_eap_generic_show, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->menu_eap_comment_show, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->use_app_icon, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->cnfmdlg_disabled, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->cfgdlg_auto_apply, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->cfgdlg_default_mode, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->font_hinting, 0, 2);
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
|
|||
/* increment this whenever a new set of config values are added but the users
|
||||
* config doesn't need to be wiped - simply new values need to be put in
|
||||
*/
|
||||
#define E_CONFIG_FILE_GENERATION 0x0116
|
||||
#define E_CONFIG_FILE_GENERATION 0x0117
|
||||
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
|
||||
|
||||
#define E_EVAS_ENGINE_DEFAULT 0
|
||||
|
@ -220,6 +220,7 @@ struct _E_Config
|
|||
const char *exebuf_term_cmd; // GUI
|
||||
Evas_List *color_classes; // GUI
|
||||
int use_app_icon; // GUI
|
||||
int cnfmdlg_disabled; // GUI
|
||||
int cfgdlg_auto_apply; // GUI
|
||||
int cfgdlg_default_mode; // GUI
|
||||
Evas_List *gadcons; // GUI
|
||||
|
|
|
@ -438,7 +438,7 @@ _e_configure_fill_cat_list(void *data)
|
|||
_e_configure_item_add(cat, _("Input Method Settings"), "enlightenment/imc", e_int_config_imc);
|
||||
|
||||
cat = _e_configure_category_add(eco, _("Advanced"), "enlightenment/advanced");
|
||||
_e_configure_item_add(cat, _("Configuration Dialogs"), "enlightenment/configuration", e_int_config_cfgdialogs);
|
||||
_e_configure_item_add(cat, _("Dialogs"), "enlightenment/configuration", e_int_config_dialogs);
|
||||
_e_configure_item_add(cat, _("Performance"), "enlightenment/performance", e_int_config_performance);
|
||||
_e_configure_item_add(cat, _("Window List"), "enlightenment/winlist", e_int_config_winlist);
|
||||
_e_configure_item_add(cat, _("Run Command"), "enlightenment/run", e_int_config_exebuf);
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
#include "e_int_config_exebuf.h"
|
||||
#include "e_int_config_apps_menu.h"
|
||||
#include "e_int_config_apps_order.h"
|
||||
#include "e_int_config_cfgdialogs.h"
|
||||
#include "e_int_config_dialogs.h"
|
||||
#include "e_int_config_intl.h"
|
||||
#include "e_int_config_imc.h"
|
||||
#include "e_int_config_imc_import.h"
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#ifdef E_TYPEDEFS
|
||||
#else
|
||||
#ifndef E_INT_CONFIG_CFGDIALOGS_H
|
||||
#define E_INT_CONFIG_CFGDIALOGS_H
|
||||
|
||||
EAPI E_Config_Dialog *e_int_config_cfgdialogs(E_Container *con);
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -11,14 +11,13 @@ static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E
|
|||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
int auto_apply;
|
||||
|
||||
/* Advanced */
|
||||
int default_mode;
|
||||
int cnfmdlg_disabled;
|
||||
int cfgdlg_auto_apply;
|
||||
int cfgdlg_default_mode;
|
||||
};
|
||||
|
||||
EAPI E_Config_Dialog *
|
||||
e_int_config_cfgdialogs(E_Container *con)
|
||||
e_int_config_dialogs(E_Container *con)
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
@ -33,7 +32,7 @@ e_int_config_cfgdialogs(E_Container *con)
|
|||
v->override_auto_apply = 1;
|
||||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Config Dialog Settings"),
|
||||
_("Dialog Settings"),
|
||||
"E", "_config_config_dialog_dialog",
|
||||
"enlightenment/configuration", 0, v, NULL);
|
||||
return cfd;
|
||||
|
@ -42,8 +41,9 @@ e_int_config_cfgdialogs(E_Container *con)
|
|||
static void
|
||||
_fill_data(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
cfdata->auto_apply = e_config->cfgdlg_auto_apply;
|
||||
cfdata->default_mode = e_config->cfgdlg_default_mode;
|
||||
cfdata->cnfmdlg_disabled = e_config->cnfmdlg_disabled;
|
||||
cfdata->cfgdlg_auto_apply = e_config->cfgdlg_auto_apply;
|
||||
cfdata->cfgdlg_default_mode = e_config->cfgdlg_default_mode;
|
||||
}
|
||||
|
||||
static void *
|
||||
|
@ -65,10 +65,10 @@ _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)
|
||||
{
|
||||
e_config->cnfmdlg_disabled = cfdata->cnfmdlg_disabled;
|
||||
/* Auto Apply is disabled in E for now */
|
||||
/* (e_config->cfgdlg_auto_apply = cfdata->auto_apply; */
|
||||
|
||||
e_config->cfgdlg_default_mode = cfdata->default_mode;
|
||||
/* (e_config->cfgdlg_auto_apply = cfdata->cfgdlg_auto_apply; */
|
||||
e_config->cfgdlg_default_mode = cfdata->cfgdlg_default_mode;
|
||||
e_config_save_queue();
|
||||
return 1;
|
||||
}
|
||||
|
@ -80,9 +80,18 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
E_Radio_Group *rg;
|
||||
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("Default Dialog Mode"), 0);
|
||||
rg = e_widget_radio_group_new(&(cfdata->default_mode));
|
||||
|
||||
of = e_widget_framelist_add(evas, _("General Settings"), 0);
|
||||
|
||||
ob = e_widget_check_add(evas, _("Disable Confirmation Dialogs"), &(cfdata->cnfmdlg_disabled));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
// ob = e_widget_check_add(evas, _("Auto-Apply Configuration Changes"), &(cfdata->cfgdlg_auto_apply));
|
||||
// e_widget_framelist_object_append(of, ob);
|
||||
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("Default Configuration Dialogs Mode"), 0);
|
||||
rg = e_widget_radio_group_new(&(cfdata->cfgdlg_default_mode));
|
||||
|
||||
ob = e_widget_radio_add(evas, _("Basic Mode"), E_CONFIG_DIALOG_CFDATA_TYPE_BASIC, rg);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
@ -90,6 +99,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_widget_framelist_object_append(of, ob);
|
||||
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
@ -113,6 +123,11 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
|
|||
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
|
||||
// of = e_widget_framelist_add(evas, _("General Settings"), 0);
|
||||
// ob = e_widget_check_add(evas, _("Auto-Apply Configuration Changes"), &(cfdata->auto_apply));
|
||||
// e_widget_framelist_object_append(of, ob);
|
||||
// e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("Default Dialog Mode"), 0);
|
||||
rg = e_widget_radio_group_new(&(cfdata->default_mode));
|
||||
|
||||
|
@ -125,3 +140,4 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
|
|||
return o;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#ifdef E_TYPEDEFS
|
||||
#else
|
||||
#ifndef E_INT_CONFIG_DIALOGS_H
|
||||
#define E_INT_CONFIG_DIALOGS_H
|
||||
|
||||
EAPI E_Config_Dialog *e_int_config_dialogs(E_Container *con);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -93,8 +93,7 @@ _surebox_dialog_cb_yes(void *data, E_Dialog *dia)
|
|||
e_config_save_queue();
|
||||
sb->cfdata->orig_size = c_size;
|
||||
sb->cfdata->orig_rate = c_rate;
|
||||
_surebox_dialog_cb_delete(dia->win);
|
||||
|
||||
if (dia) _surebox_dialog_cb_delete(dia->win);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -338,7 +337,17 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
else
|
||||
ecore_x_randr_screen_size_set(man->root, size);
|
||||
|
||||
_surebox_new(cfd, cfdata);
|
||||
if (e_config->cnfmdlg_disabled)
|
||||
{
|
||||
SureBox *sb;
|
||||
|
||||
sb = E_NEW(SureBox, 1);
|
||||
sb->cfd = cfd;
|
||||
sb->cfdata = cfdata;
|
||||
_surebox_dialog_cb_yes (sb, NULL);
|
||||
}
|
||||
else
|
||||
_surebox_new(cfd, cfdata);
|
||||
}
|
||||
|
||||
if ((cfdata->can_rotate) || (cfdata->can_flip))
|
||||
|
|
Loading…
Reference in New Issue