udisks2 support

devs/sachiel/e19
Mike Blumenkrantz 9 years ago
parent dd27589470
commit a41c50632c
  1. 4
      ChangeLog
  2. 1
      NEWS
  3. 4
      src/bin/e_fm/Makefile.am
  4. 32
      src/bin/e_fm/e_fm_main.c
  5. 9
      src/bin/e_fm/e_fm_main_udisks.c
  6. 1297
      src/bin/e_fm/e_fm_main_udisks2.c
  7. 21
      src/bin/e_fm/e_fm_main_udisks2.h
  8. 1
      src/bin/e_fm_shared_types.h.in
  9. 3
      src/modules/fileman/e_mod_config.c

@ -1,3 +1,7 @@
2013-06-20 Mike Blumenkrantz
* udisks2 support
2013-06-19 Mike Blumenkrantz
* added check changed to shelf config dialog

@ -147,6 +147,7 @@ Improvements:
* added dnd support for text/x-moz-url
* filemanager dnd operations now show all files when dragging
* added check changed to shelf config dialog
* udisks2 support
Fixes:
* IBar menu didn't allow to configure different icon sources, show contents menu even on empty IBar.

@ -22,7 +22,9 @@ enlightenment_fm
if HAVE_UDISKS_MOUNT
udisks_s = \
e_fm_main_udisks.h \
e_fm_main_udisks.c
e_fm_main_udisks.c \
e_fm_main_udisks2.h \
e_fm_main_udisks2.c
else
udisks_s =
endif

@ -56,6 +56,7 @@ void *alloca (size_t);
#include "e_fm_shared_device.h"
#ifdef HAVE_UDISKS_MOUNT
# include "e_fm_main_udisks.h"
# include "e_fm_main_udisks2.h"
#endif
#ifdef HAVE_EEZE_MOUNT
# include "e_fm_main_eeze.h"
@ -91,7 +92,7 @@ static void
_e_fm_init(void)
{
# ifdef HAVE_UDISKS_MOUNT
_e_fm_main_udisks_init();
_e_fm_main_udisks2_init();
# else
# ifdef HAVE_EEZE_MOUNT
_e_fm_main_eeze_init();
@ -104,6 +105,7 @@ static void
_e_fm_shutdown(void)
{
# ifdef HAVE_UDISKS_MOUNT
_e_fm_main_udisks2_shutdown();
_e_fm_main_udisks_shutdown();
# else
# ifdef HAVE_EEZE_MOUNT
@ -172,6 +174,18 @@ _e_fm_main_udisks_catch(Eina_Bool usable)
mode = EFM_MODE_USING_EEZE_MOUNT;
# endif
}
void
_e_fm_main_udisks2_catch(Eina_Bool usable)
{
if (usable)
{
mode = EFM_MODE_USING_UDISKS2_MOUNT;
return;
}
_e_fm_main_udisks_init();
mode = EFM_MODE_USING_UDISKS_MOUNT;
}
#endif
void
@ -197,6 +211,9 @@ e_volume_mount(E_Volume *v)
case EFM_MODE_USING_UDISKS_MOUNT:
_e_fm_main_udisks_volume_mount(v);
break;
case EFM_MODE_USING_UDISKS2_MOUNT:
_e_fm_main_udisks2_volume_mount(v);
break;
#endif
#ifdef HAVE_EEZE_MOUNT
case EFM_MODE_USING_EEZE_MOUNT:
@ -219,6 +236,9 @@ e_volume_unmount(E_Volume *v)
case EFM_MODE_USING_UDISKS_MOUNT:
_e_fm_main_udisks_volume_unmount(v);
break;
case EFM_MODE_USING_UDISKS2_MOUNT:
_e_fm_main_udisks2_volume_unmount(v);
break;
#endif
#ifdef HAVE_EEZE_MOUNT
case EFM_MODE_USING_EEZE_MOUNT:
@ -240,6 +260,9 @@ e_volume_eject(E_Volume *v)
case EFM_MODE_USING_UDISKS_MOUNT:
_e_fm_main_udisks_volume_eject(v);
break;
case EFM_MODE_USING_UDISKS2_MOUNT:
_e_fm_main_udisks2_volume_eject(v);
break;
#endif
#ifdef HAVE_EEZE_MOUNT
case EFM_MODE_USING_EEZE_MOUNT:
@ -260,6 +283,8 @@ e_volume_find(const char *udi)
#ifdef HAVE_UDISKS_MOUNT
case EFM_MODE_USING_UDISKS_MOUNT:
return _e_fm_main_udisks_volume_find(udi);
case EFM_MODE_USING_UDISKS2_MOUNT:
return _e_fm_main_udisks2_volume_find(udi);
#endif
#ifdef HAVE_EEZE_MOUNT
case EFM_MODE_USING_EEZE_MOUNT:
@ -281,6 +306,9 @@ e_storage_del(const char *udi)
case EFM_MODE_USING_UDISKS_MOUNT:
_e_fm_main_udisks_storage_del(udi);
break;
case EFM_MODE_USING_UDISKS2_MOUNT:
_e_fm_main_udisks2_storage_del(udi);
break;
#endif
#ifdef HAVE_EEZE_MOUNT
case EFM_MODE_USING_EEZE_MOUNT:
@ -301,6 +329,8 @@ e_storage_find(const char *udi)
#ifdef HAVE_UDISKS_MOUNT
case EFM_MODE_USING_UDISKS_MOUNT:
return _e_fm_main_udisks_storage_find(udi);
case EFM_MODE_USING_UDISKS2_MOUNT:
return _e_fm_main_udisks2_storage_find(udi);
#endif
#ifdef HAVE_EEZE_MOUNT
case EFM_MODE_USING_EEZE_MOUNT:

@ -663,15 +663,18 @@ _e_fm_main_udisks_format_error_msg(char **buf,
char *tmp;
vu = strlen(v->udi) + 1;
vm = strlen(v->mount_point) + 1;
if (v->mount_point) vm = strlen(v->mount_point) + 1;
en = strlen(name) + 1;
size = vu + vm + en + strlen(message) + 1;
tmp = *buf = malloc(size);
strcpy(tmp, v->udi);
tmp += vu;
strcpy(tmp, v->mount_point);
tmp += vm;
if (v->mount_point)
{
strcpy(tmp, v->mount_point);
tmp += vm;
}
strcpy(tmp, name);
tmp += en;
strcpy(tmp, message);

File diff suppressed because it is too large Load Diff

@ -0,0 +1,21 @@
#ifndef E_FM_MAIN_UDISKS2_H
#define E_FM_MAIN_UDISKS2_H
E_Volume *_e_fm_main_udisks2_volume_add(const char *udi, Eina_Bool first_time);
void _e_fm_main_udisks2_volume_del(const char *udi);
E_Volume *_e_fm_main_udisks2_volume_find(const char *udi);
void _e_fm_main_udisks2_volume_eject(E_Volume *v);
void _e_fm_main_udisks2_volume_unmount(E_Volume *v);
void _e_fm_main_udisks2_volume_mount(E_Volume *v);
E_Storage *_e_fm_main_udisks2_storage_add(const char *udi);
void _e_fm_main_udisks2_storage_del(const char *udi);
E_Storage *_e_fm_main_udisks2_storage_find(const char *udi);
void _e_fm_main_udisks2_init(void);
void _e_fm_main_udisks2_shutdown(void);
void _e_fm_main_udisks2_catch(Eina_Bool usable);
#endif

@ -23,6 +23,7 @@ typedef enum
EFM_MODE_USING_RASTER_MOUNT,
EFM_MODE_USING_HAL_MOUNT,
EFM_MODE_USING_UDISKS_MOUNT,
EFM_MODE_USING_UDISKS2_MOUNT,
EFM_MODE_USING_EEZE_MOUNT
} Efm_Mode;

@ -429,6 +429,9 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__,
case EFM_MODE_USING_UDISKS_MOUNT:
snprintf(buf, sizeof(buf), "%s: UDISKS", _("Mode"));
break;
case EFM_MODE_USING_UDISKS2_MOUNT:
snprintf(buf, sizeof(buf), "%s: UDISKS2", _("Mode"));
break;
case EFM_MODE_USING_EEZE_MOUNT:
snprintf(buf, sizeof(buf), "%s: EEZE", _("Mode"));
break;

Loading…
Cancel
Save