forked from enlightenment/enlightenment
Invert view_flags logic, make it easier to use.
Now flags do not negate, rather specify if things should be used. This will help us be compatible with original behavior and actually just e_fwin is using that. SVN revision: 39340
This commit is contained in:
parent
3200fe1b84
commit
9bc2ce0678
|
@ -888,7 +888,7 @@ _e_fm2_dir_load_props(E_Fm2_Smart_Data *sd)
|
|||
{
|
||||
E_Fm2_Custom_File *cf;
|
||||
|
||||
if (sd->view_flags & E_FM2_VIEW_NO_LOAD_DIR_CUSTOM) return;
|
||||
if (!(sd->view_flags & E_FM2_VIEW_LOAD_DIR_CUSTOM)) return;
|
||||
|
||||
cf = e_fm2_custom_file_get(sd->realpath);
|
||||
if ((cf) && (cf->dir))
|
||||
|
@ -923,7 +923,7 @@ _e_fm2_dir_load_props(E_Fm2_Smart_Data *sd)
|
|||
sd->pos.y = 0;
|
||||
}
|
||||
|
||||
if (sd->view_flags & E_FM2_VIEW_NO_INHERIT_DIR_CUSTOM)
|
||||
if (!(sd->view_flags & E_FM2_VIEW_INHERIT_DIR_CUSTOM))
|
||||
{
|
||||
sd->view_mode = -1;
|
||||
sd->icon_size = -1;
|
||||
|
@ -958,7 +958,7 @@ _e_fm2_dir_save_props(E_Fm2_Smart_Data *sd)
|
|||
E_Fm2_Custom_File *cf, cf0;
|
||||
E_Fm2_Custom_Dir dir0;
|
||||
|
||||
if (sd->view_flags & E_FM2_VIEW_NO_SAVE_DIR_CUSTOM) return;
|
||||
if (!(sd->view_flags & E_FM2_VIEW_SAVE_DIR_CUSTOM)) return;
|
||||
|
||||
cf = e_fm2_custom_file_get(sd->realpath);
|
||||
if (!cf)
|
||||
|
@ -6951,7 +6951,7 @@ _e_fm2_menu(Evas_Object *obj, unsigned int timestamp)
|
|||
e_menu_item_separator_set(mi, 1);
|
||||
}
|
||||
if ((!(sd->icon_menu.flags & E_FM2_MENU_NO_INHERIT_PARENT)) &&
|
||||
(!(sd->view_flags & E_FM2_VIEW_NO_INHERIT_DIR_CUSTOM)))
|
||||
(sd->view_flags & E_FM2_VIEW_INHERIT_DIR_CUSTOM))
|
||||
{
|
||||
mi = e_menu_item_new(mn);
|
||||
e_menu_item_label_set(mi, _("Inherit parent settings"));
|
||||
|
@ -7134,7 +7134,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
|
|||
}
|
||||
|
||||
if ((!(sd->icon_menu.flags & E_FM2_MENU_NO_INHERIT_PARENT)) &&
|
||||
(!(sd->view_flags & E_FM2_VIEW_NO_INHERIT_DIR_CUSTOM)))
|
||||
(sd->view_flags & E_FM2_VIEW_INHERIT_DIR_CUSTOM))
|
||||
{
|
||||
mi = e_menu_item_new(mn);
|
||||
e_menu_item_label_set(mi, _("Inherit parent settings"));
|
||||
|
|
|
@ -37,12 +37,13 @@ typedef enum _E_Fm2_Menu_Flags
|
|||
|
||||
typedef enum _E_Fm2_View_Flags
|
||||
{
|
||||
E_FM2_VIEW_NO_LOAD_DIR_CUSTOM = (1 << 0),
|
||||
E_FM2_VIEW_NO_SAVE_DIR_CUSTOM = (1 << 1),
|
||||
E_FM2_VIEW_NO_INHERIT_DIR_CUSTOM = (1 << 2),
|
||||
E_FM2_VIEW_NO_DIR_CUSTOM = (E_FM2_VIEW_NO_LOAD_DIR_CUSTOM |
|
||||
E_FM2_VIEW_NO_SAVE_DIR_CUSTOM |
|
||||
E_FM2_VIEW_NO_INHERIT_DIR_CUSTOM)
|
||||
E_FM2_VIEW_NO_FLAGS = 0,
|
||||
E_FM2_VIEW_LOAD_DIR_CUSTOM = (1 << 0),
|
||||
E_FM2_VIEW_SAVE_DIR_CUSTOM = (1 << 1),
|
||||
E_FM2_VIEW_INHERIT_DIR_CUSTOM = (1 << 2),
|
||||
E_FM2_VIEW_DIR_CUSTOM = (E_FM2_VIEW_LOAD_DIR_CUSTOM |
|
||||
E_FM2_VIEW_SAVE_DIR_CUSTOM |
|
||||
E_FM2_VIEW_INHERIT_DIR_CUSTOM)
|
||||
} E_Fm2_View_Flags;
|
||||
|
||||
typedef struct _E_Fm2_Config E_Fm2_Config;
|
||||
|
|
|
@ -59,7 +59,6 @@ e_widget_flist_add(Evas *evas)
|
|||
wd->fmc.selection.windows_modifiers = 0;
|
||||
e_fm2_config_set(wd->o_fm, &wd->fmc);
|
||||
e_fm2_icon_menu_flags_set(wd->o_fm, E_FM2_MENU_NO_SHOW_HIDDEN);
|
||||
e_fm2_view_flags_set(wd->o_fm, E_FM2_VIEW_NO_DIR_CUSTOM);
|
||||
|
||||
evas_object_smart_callback_add(wd->o_fm, "dir_changed",
|
||||
_e_wid_cb_dir_changed, obj);
|
||||
|
|
|
@ -408,7 +408,6 @@ e_widget_fsel_add(Evas *evas, const char *dev, const char *path, char *selected,
|
|||
fmc.selection.single = 1;
|
||||
fmc.selection.windows_modifiers = 0;
|
||||
e_fm2_config_set(o, &fmc);
|
||||
e_fm2_view_flags_set(o, E_FM2_VIEW_NO_DIR_CUSTOM);
|
||||
evas_object_smart_callback_add(o, "changed",
|
||||
_e_wid_fsel_favorites_files_changed, wd);
|
||||
evas_object_smart_callback_add(o, "selected",
|
||||
|
@ -449,7 +448,6 @@ e_widget_fsel_add(Evas *evas, const char *dev, const char *path, char *selected,
|
|||
fmc.selection.single = 1;
|
||||
fmc.selection.windows_modifiers = 0;
|
||||
e_fm2_config_set(o, &fmc);
|
||||
e_fm2_view_flags_set(o, E_FM2_VIEW_NO_DIR_CUSTOM);
|
||||
evas_object_smart_callback_add(o, "dir_changed",
|
||||
_e_wid_fsel_files_changed, wd);
|
||||
evas_object_smart_callback_add(o, "selection_change",
|
||||
|
|
|
@ -234,7 +234,6 @@ _adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
fmc.selection.windows_modifiers = 0;
|
||||
e_fm2_config_set(ow, &fmc);
|
||||
e_fm2_icon_menu_flags_set(ow, E_FM2_MENU_NO_SHOW_HIDDEN);
|
||||
e_fm2_view_flags_set(ow, E_FM2_VIEW_NO_DIR_CUSTOM);
|
||||
|
||||
e_fm2_path_set(ow, path, "/");
|
||||
evas_object_smart_callback_add(ow, "dir_changed",
|
||||
|
|
|
@ -861,7 +861,6 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
|
|||
fmc.selection.windows_modifiers = 0;
|
||||
e_fm2_config_set(o, &fmc);
|
||||
e_fm2_icon_menu_flags_set(o, E_FM2_MENU_NO_SHOW_HIDDEN);
|
||||
e_fm2_view_flags_set(o, E_FM2_VIEW_NO_DIR_CUSTOM);
|
||||
|
||||
evas_object_smart_callback_add(o, "dir_changed",
|
||||
_cb_files_changed, cfdata);
|
||||
|
|
|
@ -309,7 +309,6 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
fmc.selection.windows_modifiers = 0;
|
||||
e_fm2_config_set(o, &fmc);
|
||||
e_fm2_icon_menu_flags_set(o, E_FM2_MENU_NO_SHOW_HIDDEN);
|
||||
e_fm2_view_flags_set(o, E_FM2_VIEW_NO_DIR_CUSTOM);
|
||||
evas_object_smart_callback_add(o, "dir_changed",
|
||||
_cb_files_changed, cfdata);
|
||||
evas_object_smart_callback_add(o, "selection_change",
|
||||
|
|
|
@ -176,7 +176,6 @@ e_fwin_zone_new(E_Zone *zone, const char *dev, const char *path)
|
|||
_e_fwin_config_set(fwin);
|
||||
|
||||
e_fm2_custom_theme_content_set(o, "desktop");
|
||||
e_fm2_view_flags_set(o, E_FM2_VIEW_NO_DIR_CUSTOM);
|
||||
|
||||
evas_object_smart_callback_add(o, "dir_changed",
|
||||
_e_fwin_changed, fwin);
|
||||
|
@ -343,6 +342,7 @@ _e_fwin_new(E_Container *con, const char *dev, const char *path)
|
|||
o = e_fm2_add(e_win_evas_get(fwin->win));
|
||||
fwin->fm_obj = o;
|
||||
_e_fwin_config_set(fwin);
|
||||
e_fm2_view_flags_set(o, E_FM2_VIEW_DIR_CUSTOM);
|
||||
|
||||
evas_object_smart_callback_add(o, "dir_changed",
|
||||
_e_fwin_changed, fwin);
|
||||
|
|
|
@ -222,7 +222,6 @@ _adv_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfda
|
|||
fmc.selection.windows_modifiers = 0;
|
||||
e_fm2_config_set(ow, &fmc);
|
||||
e_fm2_icon_menu_flags_set(ow, E_FM2_MENU_NO_SHOW_HIDDEN);
|
||||
e_fm2_view_flags_set(ow, E_FM2_VIEW_NO_DIR_CUSTOM);
|
||||
e_fm2_path_set(ow, path, "/");
|
||||
|
||||
evas_object_smart_callback_add(ow, "selection_change",
|
||||
|
|
Loading…
Reference in New Issue