e17: add notification that systray does not work on a shelf that is 'below everything'

- native speakers are welcome to correct the message


SVN revision: 64531
This commit is contained in:
Hannes Janetzek 2011-10-30 19:46:30 +00:00
parent f3aa1d3293
commit 707aed7926
1 changed files with 12 additions and 13 deletions

View File

@ -113,15 +113,10 @@ static char tmpbuf[PATH_MAX]; /* general purpose buffer, just use immediately */
static Eina_Bool
_systray_site_is_safe(E_Gadcon_Site site)
{
/* NB: filter out sites we know are not safe for a systray to sit.
* This was done so that systray could be put into illume indicator
* (or anywhere else really) that is 'safe' for systray to be.
* Pretty much, this is anywhere but Desktop and toolbars at the moment */
if (e_gadcon_site_is_desktop(site))
return EINA_FALSE;
else if (e_gadcon_site_is_any_toolbar(site))
return EINA_FALSE;
return EINA_TRUE;
if (e_gadcon_site_is_shelf(site))
return EINA_TRUE;
return EINA_FALSE;
}
static const char *
@ -411,12 +406,10 @@ _systray_atom_st_get(int screen_num)
return _atom_st_num;
}
/* XXX TODO: should be in ecore_x */
static Eina_Bool
_systray_selection_owner_set(int screen_num, Ecore_X_Window win)
{
Ecore_X_Atom atom;
// Ecore_X_Display *disp = ecore_x_display_get();
Ecore_X_Window cur_selection;
Eina_Bool ret;
@ -503,12 +496,10 @@ _systray_activate(Instance *inst)
Ecore_X_Atom atom;
Ecore_X_Window old_win;
Ecore_X_Window_Attributes attr;
Ecore_X_Display *dpy;
if (inst->win.selection != 0) return 1;
atom = _systray_atom_st_get(inst->con->manager->num);
dpy = ecore_x_display_get();
old_win = ecore_x_selection_owner_get(atom);
if (old_win != 0) return 0;
@ -903,6 +894,14 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
return NULL;
}
if ((gc->shelf) && (!gc->shelf->popup))
{
e_util_dialog_internal
(_("Systray Error"),
_("Systray cannot work in a shelf that is set to below everything."));
return NULL;
}
inst = E_NEW(Instance, 1);
if (!inst)
return NULL;