forked from enlightenment/enlightenment
Provide gadcon_config wrapper functions for toolbar & shelf. For now, just
used so we can have Toolbar Contents vs Shelf Contents in title. SVN revision: 32528
This commit is contained in:
parent
a1629df8a2
commit
4f53107d14
|
@ -10,6 +10,7 @@ static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Co
|
|||
static void _load_available_gadgets(void *data);
|
||||
static void _load_selected_gadgets(void *data);
|
||||
static int _cb_mod_update(void *data, int type, void *event);
|
||||
static void _e_int_gadcon_config(E_Gadcon *gc, const char *title);
|
||||
|
||||
/* Actual config data we will be playing with while the dialog is active */
|
||||
struct _E_Config_Dialog_Data
|
||||
|
@ -25,9 +26,21 @@ struct _E_Config_Dialog_Data
|
|||
Ecore_Event_Handler *hdl;
|
||||
};
|
||||
|
||||
/* a nice easy setup function that does the dirty work */
|
||||
EAPI void
|
||||
e_int_gadcon_config(E_Gadcon *gc)
|
||||
e_int_gadcon_config_shelf(E_Gadcon *gc)
|
||||
{
|
||||
_e_int_gadcon_config(gc, _("Shelf Contents"));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_int_gadcon_config_toolbar(E_Gadcon *gc)
|
||||
{
|
||||
_e_int_gadcon_config(gc, _("Toolbar Contents"));
|
||||
}
|
||||
|
||||
/* a nice easy setup function that does the dirty work */
|
||||
static void
|
||||
_e_int_gadcon_config(E_Gadcon *gc, const char *title)
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
@ -41,8 +54,7 @@ e_int_gadcon_config(E_Gadcon *gc)
|
|||
v->override_auto_apply = 1;
|
||||
|
||||
cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()),
|
||||
_("Shelf Contents"),
|
||||
"E", "_gadcon_config_dialog",
|
||||
title, "E", "_gadcon_config_dialog",
|
||||
"enlightenment/shelf", 0, v, gc);
|
||||
gc->config_dialog = cfd;
|
||||
e_dialog_resizable_set(cfd->dia, 1);
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
#ifndef E_INT_GADCON_CONFIG_H
|
||||
#define E_INT_GADCON_CONFIG_H
|
||||
|
||||
EAPI void e_int_gadcon_config(E_Gadcon *gc);
|
||||
EAPI void e_int_gadcon_config_shelf (E_Gadcon *gc);
|
||||
EAPI void e_int_gadcon_config_toolbar (E_Gadcon *gc);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -481,7 +481,7 @@ _cb_configure(void *data, void *data2)
|
|||
|
||||
cfdata = data;
|
||||
if (!cfdata->es->gadcon->config_dialog)
|
||||
e_int_gadcon_config(cfdata->es->gadcon);
|
||||
e_int_gadcon_config_shelf(cfdata->es->gadcon);
|
||||
}
|
||||
|
||||
/**--GUI--**/
|
||||
|
|
|
@ -1100,7 +1100,7 @@ _e_shelf_cb_menu_contents(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
|
||||
es = data;
|
||||
if (!es->gadcon->config_dialog)
|
||||
e_int_gadcon_config(es->gadcon);
|
||||
e_int_gadcon_config_shelf(es->gadcon);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -362,7 +362,8 @@ _e_toolbar_menu_cb_contents(void *data, E_Menu *mn, E_Menu_Item *mi)
|
|||
E_Toolbar *tbar;
|
||||
|
||||
tbar = data;
|
||||
if (!tbar->gadcon->config_dialog) e_int_gadcon_config(tbar->gadcon);
|
||||
if (!tbar->gadcon->config_dialog)
|
||||
e_int_gadcon_config_toolbar(tbar->gadcon);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue