make use of flags.
authorCarsten Haitzler <raster@rasterman.com>
Tue, 31 Oct 2006 14:56:28 +0000 (14:56 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Tue, 31 Oct 2006 14:56:28 +0000 (14:56 +0000)
SVN revision: 26882

src/bin/e_fm.c
src/bin/e_fm.h
src/bin/e_fwin.c
src/bin/e_int_config_apps.c
src/bin/e_int_config_desklock.c
src/bin/e_int_config_icon_themes.c
src/bin/e_int_config_startup.c
src/bin/e_int_config_theme.c
src/bin/e_int_config_wallpaper.c

index 4b83e54..b3acfed 100644 (file)
@@ -617,6 +617,30 @@ e_fm2_icon_menu_end_extend_callback_set(Evas_Object *obj, void (*func) (void *da
 }
 
 EAPI void
+e_fm2_icon_menu_flags_set(Evas_Object *obj, E_Fm2_Menu_Flags flags)
+{
+   E_Fm2_Smart_Data *sd;
+   
+   sd = evas_object_smart_data_get(obj);
+   if (!sd) return; // safety
+   if (!evas_object_type_get(obj)) return; // safety
+   if (strcmp(evas_object_type_get(obj), "e_fm")) return; // safety
+   sd->icon_menu.flags = flags;
+}
+
+EAPI E_Fm2_Menu_Flags
+e_fm2_icon_menu_flags_get(Evas_Object *obj)
+{
+   E_Fm2_Smart_Data *sd;
+   
+   sd = evas_object_smart_data_get(obj);
+   if (!sd) return 0; // safety
+   if (!evas_object_type_get(obj)) return 0; // safety
+   if (strcmp(evas_object_type_get(obj), "e_fm")) return 0; // safety
+   return sd->icon_menu.flags;
+}
+
+EAPI void
 e_fm2_window_object_set(Evas_Object *obj, E_Object *eobj)
 {
    E_Fm2_Smart_Data *sd;
@@ -4265,7 +4289,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
    E_Container *con;
    E_Zone *zone;
    Evas_List *sel;
-   int x, y, can_w, can_w2, protected;
+   int x, y, can_w, can_w2, protect;
    char buf[4096];
    
    sd = ic->sd;
@@ -4382,12 +4406,12 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
        if ((!sel) || evas_list_count(sel) == 1)
          {
             snprintf(buf, sizeof(buf), "%s/%s", sd->realpath, ic->info.file);
-            protected = e_filereg_file_protected(buf);
+            protect = e_filereg_file_protected(buf);
          }
        else
-       protected = 0;
+         protect = 0;
        
-       if ((can_w) && (can_w2) && !(protected))
+       if ((can_w) && (can_w2) && !(protect))
          {
             mi = e_menu_item_new(mn);
             e_menu_item_separator_set(mi, 1);
index 07096f9..aca5b0d 100644 (file)
@@ -129,6 +129,8 @@ EAPI void                  e_fm2_file_show(Evas_Object *obj, const char *file);
 EAPI void                  e_fm2_icon_menu_replace_callback_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, E_Menu *m, E_Fm2_Icon_Info *info), void *data);
 EAPI void                  e_fm2_icon_menu_start_extend_callback_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, E_Menu *m, E_Fm2_Icon_Info *info), void *data);
 EAPI void                  e_fm2_icon_menu_end_extend_callback_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, E_Menu *m, E_Fm2_Icon_Info *info), void *data);
+EAPI void                  e_fm2_icon_menu_flags_set(Evas_Object *obj, E_Fm2_Menu_Flags flags);
+EAPI E_Fm2_Menu_Flags      e_fm2_icon_menu_flags_get(Evas_Object *obj);
 EAPI void                  e_fm2_window_object_set(Evas_Object *obj, E_Object *eobj);
     
 EAPI void                  e_fm2_pan_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
index 6b1c8aa..85619a1 100644 (file)
@@ -831,6 +831,7 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Evas_List *files, int always)
    fmc.selection.single = 1;
    fmc.selection.windows_modifiers = 0;
    e_fm2_config_set(mt, &fmc);
+   e_fm2_icon_menu_flags_set(mt, E_FM2_MENU_NO_SHOW_HIDDEN);
    evas_object_smart_callback_add(mt, "selection_change",
                                  _e_fwin_cb_fm_selection_change, fad);
    evas_object_smart_callback_add(mt, "selected",
index 4968a0f..a24fdb9 100644 (file)
@@ -533,6 +533,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
    fmc_all.selection.single = 1;
    fmc_all.selection.windows_modifiers = 0;
    e_fm2_config_set(mt, &fmc_all);
+   e_fm2_icon_menu_flags_set(mt, E_FM2_MENU_NO_SHOW_HIDDEN);
    evas_object_smart_callback_add(mt, "dir_changed",
                                        _cb_files_dir_changed_all, cfdata);
    evas_object_smart_callback_add(mt, "selected",
@@ -620,6 +621,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
          fmc.selection.single = 1;
          fmc.selection.windows_modifiers = 0;
          e_fm2_config_set(mt, &fmc);
+        e_fm2_icon_menu_flags_set(mt, E_FM2_MENU_NO_SHOW_HIDDEN);
          evas_object_smart_callback_add(mt, "dir_changed",
                                        _cb_files_dir_changed, cfdata);
          evas_object_smart_callback_add(mt, "selection_change",
index a55c1bc..78df7b8 100644 (file)
@@ -602,6 +602,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
    fmc.selection.single = 1;
    fmc.selection.windows_modifiers = 0;
    e_fm2_config_set(o, &fmc);
+   e_fm2_icon_menu_flags_set(o, E_FM2_MENU_NO_SHOW_HIDDEN);
    evas_object_smart_callback_add(o, "dir_changed",
                                  _cb_files_changed, cfdata);
    evas_object_smart_callback_add(o, "selection_change",
index 6d42e1f..4c2a6cf 100644 (file)
@@ -244,6 +244,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
    fmc.selection.single = 1;
    fmc.selection.windows_modifiers = 0;
    e_fm2_config_set(mt, &fmc);
+   e_fm2_icon_menu_flags_set(o, E_FM2_MENU_NO_SHOW_HIDDEN);
    evas_object_smart_callback_add(mt, "dir_changed",
                                  _cb_files_changed, cfdata);
 //   e_fm2_path_set(cfdata->gui.o_fm, "/opt/kde3/share/icons/crystalsvg", "/");
index 7ec5bf5..1236e62 100644 (file)
@@ -310,6 +310,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
    fmc.selection.single = 1;
    fmc.selection.windows_modifiers = 0;
    e_fm2_config_set(o, &fmc);
+   e_fm2_icon_menu_flags_set(o, E_FM2_MENU_NO_SHOW_HIDDEN);
    evas_object_smart_callback_add(o, "dir_changed",
                                  _cb_files_changed, cfdata);
    evas_object_smart_callback_add(o, "selection_change",
index aa0c0b4..546d0ef 100644 (file)
@@ -398,6 +398,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
    fmc.selection.single = 1;
    fmc.selection.windows_modifiers = 0;
    e_fm2_config_set(o, &fmc);
+   e_fm2_icon_menu_flags_set(o, E_FM2_MENU_NO_SHOW_HIDDEN);
    evas_object_smart_callback_add(o, "dir_changed",
                                  _cb_files_changed, cfdata);
    evas_object_smart_callback_add(o, "selection_change",
index 4cb1867..0d77ab5 100644 (file)
@@ -494,6 +494,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
    fmc.selection.single = 1;
    fmc.selection.windows_modifiers = 0;
    e_fm2_config_set(o, &fmc);
+   e_fm2_icon_menu_flags_set(o, E_FM2_MENU_NO_SHOW_HIDDEN);
    evas_object_smart_callback_add(o, "dir_changed",
                                  _cb_files_changed, cfdata);
    evas_object_smart_callback_add(o, "selection_change",
@@ -649,6 +650,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
    fmc.selection.single = 1;
    fmc.selection.windows_modifiers = 0;
    e_fm2_config_set(o, &fmc);
+   e_fm2_icon_menu_flags_set(o, E_FM2_MENU_NO_SHOW_HIDDEN);
    evas_object_smart_callback_add(o, "dir_changed",
                                  _cb_files_changed, cfdata);
    evas_object_smart_callback_add(o, "selection_change",