* Add a new horizontal view
* Remove the header * More comments cleanup SVN revision: 37974
This commit is contained in:
parent
d701e89a6e
commit
a2fe823170
|
@ -75,35 +75,6 @@ collections
|
|||
ICONS("vfat");
|
||||
ICONS("ms");
|
||||
/****************************************************/
|
||||
/** GADGET HEADER *********************************/
|
||||
/****************************************************/
|
||||
group { name: "modules/places/header";
|
||||
min: 90 30;
|
||||
max: 384 30;
|
||||
parts {
|
||||
part { name: "bg";
|
||||
type: RECT;
|
||||
description { state: "default" 0.0;
|
||||
color: 100 100 100 150;
|
||||
}
|
||||
}
|
||||
part { name: "title";
|
||||
type: TEXT;
|
||||
effect: GLOW;
|
||||
description { state: "default" 0.0;
|
||||
color: 0 0 0 255;
|
||||
color2: 255 255 255 255;
|
||||
color3: 255 255 255 255;
|
||||
text {
|
||||
font: "VeraBd";
|
||||
size: 14;
|
||||
text: "P l a c e s";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/****************************************************/
|
||||
/** GADGET VOLUME *********************************/
|
||||
/****************************************************/
|
||||
group { name: "modules/places/main";
|
||||
|
@ -130,11 +101,22 @@ collections
|
|||
mouse_events: 0;
|
||||
type: RECT;
|
||||
description { state: "default" 0.0;
|
||||
rel1.relative: 0.0 0.0;
|
||||
rel2.relative: 0.0 0.0;
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
description { state: "horiz" 0.0;
|
||||
rel1.relative: 0.0 1.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
rel1.offset: 0 -1;
|
||||
color: 0 0 0 255;
|
||||
}
|
||||
description { state: "vert" 0.0;
|
||||
rel1.relative: 1.0 0.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
rel1.offset: -1 0;
|
||||
color: 0 0 0 255;
|
||||
}
|
||||
}
|
||||
part { name: "event";
|
||||
mouse_events: 1;
|
||||
|
@ -453,6 +435,18 @@ collections
|
|||
action: STATE_SET "visible" 0.0;
|
||||
target: "eject_icon";
|
||||
}
|
||||
program { name: "set_separator_horiz";
|
||||
signal: "separator,set,horiz";
|
||||
source: "places";
|
||||
action: STATE_SET "horiz" 0.0;
|
||||
target: "separator";
|
||||
}
|
||||
program { name: "set_separator_vert";
|
||||
signal: "separator,set,vert";
|
||||
source: "places";
|
||||
action: STATE_SET "vert" 0.0;
|
||||
target: "separator";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
12
po/it.po
12
po/it.po
|
@ -6,7 +6,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Places\n"
|
||||
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2008-12-06 19:06+0100\n"
|
||||
"POT-Creation-Date: 2008-12-06 23:32+0100\n"
|
||||
"PO-Revision-Date: 2008-10-24 15:22+200\n"
|
||||
"Last-Translator: DaveMDS <dave@gurumeditation.it>\n"
|
||||
"Language-Team: none\n"
|
||||
|
@ -22,10 +22,6 @@ msgstr "Configurazione Places"
|
|||
msgid "General"
|
||||
msgstr "Impostazioni generali"
|
||||
|
||||
#: src/e_mod_config.c:92
|
||||
msgid "Show header"
|
||||
msgstr "Mostra intestazione"
|
||||
|
||||
#: src/e_mod_config.c:96
|
||||
msgid "Mount volumes on insert"
|
||||
msgstr "Monta i dispositivi collegati"
|
||||
|
@ -38,7 +34,7 @@ msgstr "Sfoglia i dispositivi collegati"
|
|||
msgid "File manager (if blank uses Enlightenment)"
|
||||
msgstr ""
|
||||
|
||||
#: src/e_mod_main.c:488
|
||||
#: src/e_mod_main.c:485
|
||||
msgid "Configuration"
|
||||
msgstr "Configurazione"
|
||||
|
||||
|
@ -50,10 +46,6 @@ msgstr "Filesystem"
|
|||
msgid "No Name"
|
||||
msgstr ""
|
||||
|
||||
#: src/e_mod_places.c:241
|
||||
msgid "p l a c e s"
|
||||
msgstr "r i s o r s e"
|
||||
|
||||
#: src/e_mod_places.c:298
|
||||
msgid "Home"
|
||||
msgstr "Home"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
int show_header;
|
||||
int auto_mount;
|
||||
int auto_open;
|
||||
char *fm;
|
||||
|
@ -71,7 +70,6 @@ static void
|
|||
_fill_data(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
/* load a temp copy of the config variables */
|
||||
cfdata->show_header = places_conf->show_header;
|
||||
cfdata->auto_mount = places_conf->auto_mount;
|
||||
cfdata->auto_open = places_conf->auto_open;
|
||||
if (places_conf->fm)
|
||||
|
@ -89,14 +87,11 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
|
||||
of = e_widget_framelist_add(evas, D_("General"), 0);
|
||||
e_widget_framelist_content_align_set(of, 0.0, 0.0);
|
||||
ow = e_widget_check_add(evas, D_("Show header"),
|
||||
&(cfdata->show_header));
|
||||
e_widget_framelist_object_append(of, ow);
|
||||
|
||||
|
||||
ow = e_widget_check_add(evas, D_("Mount volumes on insert"),
|
||||
&(cfdata->auto_mount));
|
||||
e_widget_framelist_object_append(of, ow);
|
||||
|
||||
|
||||
ow = e_widget_check_add(evas, D_("Open filemanager on insert"),
|
||||
&(cfdata->auto_open));
|
||||
e_widget_framelist_object_append(of, ow);
|
||||
|
@ -116,7 +111,6 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
static int
|
||||
_basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
places_conf->show_header = cfdata->show_header;
|
||||
places_conf->auto_mount = cfdata->auto_mount;
|
||||
places_conf->auto_open = cfdata->auto_open;
|
||||
|
||||
|
|
|
@ -93,7 +93,6 @@ e_modapi_init(E_Module *m)
|
|||
#define D conf_edd
|
||||
E_CONFIG_VAL(D, T, version, INT);
|
||||
E_CONFIG_VAL(D, T, fm, STR);
|
||||
E_CONFIG_VAL(D, T, show_header, UCHAR);
|
||||
E_CONFIG_VAL(D, T, auto_mount, UCHAR);
|
||||
E_CONFIG_VAL(D, T, auto_open, UCHAR);
|
||||
E_CONFIG_LIST(D, T, conf_items, conf_item_edd);
|
||||
|
@ -241,39 +240,39 @@ _gc_shutdown(E_Gadcon_Client *gcc)
|
|||
static void
|
||||
_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient)
|
||||
{
|
||||
//~ Instance *inst;
|
||||
|
||||
//~ inst = gcc->data;
|
||||
//~ switch (orient)
|
||||
//~ {
|
||||
//~ case E_GADCON_ORIENT_FLOAT:
|
||||
//~ case E_GADCON_ORIENT_HORIZ:
|
||||
//~ case E_GADCON_ORIENT_TOP:
|
||||
//~ case E_GADCON_ORIENT_BOTTOM:
|
||||
//~ case E_GADCON_ORIENT_CORNER_TL:
|
||||
//~ case E_GADCON_ORIENT_CORNER_TR:
|
||||
//~ case E_GADCON_ORIENT_CORNER_BL:
|
||||
//~ case E_GADCON_ORIENT_CORNER_BR:
|
||||
//~ _ibar_orient_set(inst->ibar, 1);
|
||||
//~ e_gadcon_client_aspect_set(gcc, evas_list_count(inst->ibar->icons) * 16, 16);
|
||||
//~ break;
|
||||
//~ case E_GADCON_ORIENT_VERT:
|
||||
//~ case E_GADCON_ORIENT_LEFT:
|
||||
//~ case E_GADCON_ORIENT_RIGHT:
|
||||
//~ case E_GADCON_ORIENT_CORNER_LT:
|
||||
//~ case E_GADCON_ORIENT_CORNER_RT:
|
||||
//~ case E_GADCON_ORIENT_CORNER_LB:
|
||||
//~ case E_GADCON_ORIENT_CORNER_RB:
|
||||
//~ _ibar_orient_set(inst->ibar, 0);
|
||||
//~ e_gadcon_client_aspect_set(gcc, 16, evas_list_count(inst->ibar->icons) * 16);
|
||||
//~ break;
|
||||
//~ default:
|
||||
//~ break;
|
||||
//~ }
|
||||
//~ e_gadcon_client_min_size_set(gcc, 16, 16);
|
||||
|
||||
e_gadcon_client_aspect_set(gcc, 200, 50 * eina_list_count(volumes) + 30);
|
||||
e_gadcon_client_min_size_set(gcc, 200, 50 * eina_list_count(volumes) + 30);
|
||||
Instance *inst;
|
||||
|
||||
inst = gcc->data;
|
||||
switch (orient)
|
||||
{
|
||||
case E_GADCON_ORIENT_HORIZ:
|
||||
case E_GADCON_ORIENT_TOP:
|
||||
case E_GADCON_ORIENT_BOTTOM:
|
||||
case E_GADCON_ORIENT_CORNER_TL:
|
||||
case E_GADCON_ORIENT_CORNER_TR:
|
||||
case E_GADCON_ORIENT_CORNER_BL:
|
||||
case E_GADCON_ORIENT_CORNER_BR:
|
||||
e_gadcon_client_aspect_set(gcc, 100 * eina_list_count(volumes), 50);
|
||||
e_gadcon_client_min_size_set(gcc, 100 * eina_list_count(volumes), 50);
|
||||
e_box_orientation_set(inst->o_box, 1);
|
||||
break;
|
||||
case E_GADCON_ORIENT_FLOAT:
|
||||
case E_GADCON_ORIENT_VERT:
|
||||
case E_GADCON_ORIENT_LEFT:
|
||||
case E_GADCON_ORIENT_RIGHT:
|
||||
case E_GADCON_ORIENT_CORNER_LT:
|
||||
case E_GADCON_ORIENT_CORNER_RT:
|
||||
case E_GADCON_ORIENT_CORNER_LB:
|
||||
case E_GADCON_ORIENT_CORNER_RB:
|
||||
e_gadcon_client_aspect_set(gcc, 200, 50 * eina_list_count(volumes) + 30);
|
||||
e_gadcon_client_min_size_set(gcc, 200, 50 * eina_list_count(volumes) + 30);
|
||||
e_box_orientation_set(inst->o_box, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
places_fill_box(inst->o_box);
|
||||
}
|
||||
|
||||
static char *
|
||||
|
@ -331,7 +330,6 @@ _places_conf_new(void)
|
|||
|
||||
/* setup defaults */
|
||||
IFMODCFG(0x008d);
|
||||
places_conf->show_header = 1;
|
||||
places_conf->auto_mount = 0;
|
||||
places_conf->auto_open = 0;
|
||||
_places_conf_item_get(NULL);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/* Macros used for config file versioning */
|
||||
#define MOD_CONFIG_FILE_EPOCH 0x0001
|
||||
#define MOD_CONFIG_FILE_GENERATION 0x008e
|
||||
#define MOD_CONFIG_FILE_GENERATION 0x008f
|
||||
#define MOD_CONFIG_FILE_VERSION \
|
||||
((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
|
||||
|
||||
|
@ -32,57 +32,39 @@ struct _Config
|
|||
E_Module *module;
|
||||
E_Config_Dialog *cfd;
|
||||
|
||||
/* The list; their location on screen ? */
|
||||
Eina_List *conf_items;
|
||||
|
||||
/* config file version */
|
||||
int version;
|
||||
|
||||
/* actual config properties; Define your own. (per-module) */
|
||||
const char *fm;
|
||||
unsigned char show_header;
|
||||
unsigned char auto_mount;
|
||||
unsigned char auto_open;
|
||||
};
|
||||
|
||||
/* This struct used to hold config for individual items from above list */
|
||||
typedef struct _Config_Item Config_Item;
|
||||
struct _Config_Item
|
||||
{
|
||||
/* unique id */
|
||||
const char *id;
|
||||
|
||||
/* actual config properties; Define your own per-item (pos, clr) */
|
||||
int switch2;
|
||||
};
|
||||
|
||||
typedef struct _Instance Instance;
|
||||
struct _Instance
|
||||
{
|
||||
/* pointer to this gadget's container */
|
||||
E_Gadcon_Client *gcc;
|
||||
|
||||
/* evas_object used to display */
|
||||
Evas_Object *o_box;
|
||||
|
||||
/* popup anyone ? */
|
||||
E_Menu *menu;
|
||||
|
||||
/* Config_Item structure. Every gadget should have one :) */
|
||||
Config_Item *conf_item;
|
||||
};
|
||||
|
||||
/* Setup the E Module Version, Needed to check if module can run. */
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
/* E API Module Interface Declarations
|
||||
*
|
||||
* Need to initialize, shutdown, save the module */
|
||||
EAPI void *e_modapi_init(E_Module *m);
|
||||
EAPI int e_modapi_shutdown(E_Module *m);
|
||||
EAPI int e_modapi_save(E_Module *m);
|
||||
|
||||
/* Function for calling the modules config dialog */
|
||||
EAPI E_Config_Dialog *e_int_config_places_module(E_Container *con, const char *params __UNUSED__);
|
||||
|
||||
extern Config *places_conf;
|
||||
|
|
|
@ -210,6 +210,12 @@ places_fill_box(Evas_Object *box)
|
|||
else
|
||||
edje_object_signal_emit(o, "icon,eject,hide", "places");
|
||||
|
||||
/* orient the separator*/
|
||||
if (!e_box_orientation_get(box))
|
||||
edje_object_signal_emit(o, "separator,set,horiz", "places");
|
||||
else
|
||||
edje_object_signal_emit(o, "separator,set,vert", "places");
|
||||
|
||||
/* connect signals from edje */
|
||||
edje_object_signal_callback_add(o, "icon,activated", "places",
|
||||
_places_icon_activated_cb, vol);
|
||||
|
@ -232,25 +238,6 @@ places_fill_box(Evas_Object *box)
|
|||
max_w, max_h /* max */
|
||||
);
|
||||
}
|
||||
|
||||
/* header */
|
||||
if (places_conf->show_header)
|
||||
{
|
||||
o = edje_object_add(evas_object_evas_get(box));
|
||||
edje_object_file_set(o, theme_file, "modules/places/header");
|
||||
edje_object_part_text_set(o, "title", D_("p l a c e s"));
|
||||
edje_object_size_min_get(o, &min_w, &min_h);
|
||||
edje_object_size_max_get(o, &max_w, &max_h);
|
||||
evas_object_show(o);
|
||||
e_box_pack_start(box, o);
|
||||
e_box_pack_options_set(o,
|
||||
1, 0, /* fill */
|
||||
1, 0, /* expand */
|
||||
0.5, 0.0, /* align */
|
||||
min_w, min_h, /* min */
|
||||
max_w, max_h /* max */
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue