Add option to allow disabling of popup window on mouse_over.
SVN revision: 28412
This commit is contained in:
parent
006cb7a4cd
commit
aed9c89774
|
@ -21,6 +21,7 @@ _config_item_get(const char *id)
|
|||
ci->app = evas_stringshare_add("");
|
||||
ci->limit = 0;
|
||||
ci->show_text = 1;
|
||||
ci->show_popup = 0;
|
||||
cfg->items = evas_list_append(cfg->items, ci);
|
||||
return ci;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ struct _Config_Item
|
|||
const char *device;
|
||||
const char *app;
|
||||
int limit, show_text;
|
||||
int show_popup;
|
||||
};
|
||||
|
||||
EAPI Config_Item *_config_item_get(const char *id);
|
||||
|
|
|
@ -8,6 +8,7 @@ struct _E_Config_Dialog_Data
|
|||
char *device;
|
||||
char *app;
|
||||
int limit, show_text;
|
||||
int show_popup;
|
||||
|
||||
Ecore_List *devs;
|
||||
int num;
|
||||
|
@ -82,6 +83,7 @@ _fill_data(Config_Item *ci, E_Config_Dialog_Data *cfdata)
|
|||
cfdata->app = strdup(ci->app);
|
||||
|
||||
cfdata->show_text = ci->show_text;
|
||||
cfdata->show_popup = ci->show_popup;
|
||||
cfdata->limit = ci->limit;
|
||||
|
||||
cfdata->devs = _config_devices_get();
|
||||
|
@ -111,6 +113,8 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
of = e_widget_framelist_add(evas, _("General Settings"), 0);
|
||||
ob = e_widget_check_add(evas, _("Show Text"), &(cfdata->show_text));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_check_add(evas, _("Show Popup On Mouse-Over"), &(cfdata->show_popup));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_label_add(evas, _("Launch Application On Double-Click"));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_entry_add(evas, &(cfdata->app));
|
||||
|
@ -158,7 +162,8 @@ _apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
ci->limit = cfdata->limit;
|
||||
ci->show_text = cfdata->show_text;
|
||||
|
||||
ci->show_popup = cfdata->show_popup;
|
||||
|
||||
if (ci->app) evas_stringshare_del(ci->app);
|
||||
if (cfdata->app != NULL)
|
||||
ci->app = evas_stringshare_add(cfdata->app);
|
||||
|
|
|
@ -20,6 +20,7 @@ e_modapi_init(E_Module *m)
|
|||
E_CONFIG_VAL(item_edd, Config_Item, device, STR);
|
||||
E_CONFIG_VAL(item_edd, Config_Item, app, STR);
|
||||
E_CONFIG_VAL(item_edd, Config_Item, limit, INT);
|
||||
E_CONFIG_VAL(item_edd, Config_Item, show_popup, INT);
|
||||
E_CONFIG_VAL(item_edd, Config_Item, show_text, INT);
|
||||
|
||||
conf_edd = E_CONFIG_DD_NEW("Config", Config);
|
||||
|
|
|
@ -106,9 +106,9 @@ _cb_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event)
|
|||
else if ((ev->button == 1) && (!cfg->menu))
|
||||
{
|
||||
if (inst->popup_locked)
|
||||
inst->popup_locked=0;
|
||||
inst->popup_locked = 0;
|
||||
else
|
||||
inst->popup_locked=1;
|
||||
inst->popup_locked = 1;
|
||||
}
|
||||
else if ((ev->button == 3) && (!cfg->menu))
|
||||
{
|
||||
|
@ -155,10 +155,10 @@ _cb_mouse_in(void *data, Evas_Object *obj, const char *emission, const char *sou
|
|||
|
||||
inst = data;
|
||||
if (inst->popup != NULL) return;
|
||||
|
||||
inst->popup = E_NEW(Popup, 1);
|
||||
ci = _config_item_get(inst->gcc->id);
|
||||
if (!ci->show_popup) return;
|
||||
|
||||
inst->popup = E_NEW(Popup, 1);
|
||||
snprintf(buf, sizeof(buf), "%s/net.edj", e_module_dir_get(cfg->mod));
|
||||
|
||||
con = e_container_current_get(e_manager_current_get());
|
||||
|
|
Loading…
Reference in New Issue