Enlightenment CVS committal
Author : devilhorns
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_theme_about.c
Log Message:
Fix Theme About to not allow multiple instances (like E About & E Configure).
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_theme_about.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- e_theme_about.c 27 Nov 2006 12:57:25 -0000 1.8
+++ e_theme_about.c 15 Mar 2007 17:58:18 -0000 1.9
@@ -8,6 +8,8 @@
static void _e_theme_about_cb_delete(E_Win *win);
static void _e_theme_about_cb_close(void *data, Evas_Object *obj, const char
*emission, const char *source);
+static E_Theme_About *_e_theme_about = NULL;
+
/* local subsystem globals */
/* externally accessible functions */
@@ -19,6 +21,28 @@
E_Manager *man;
Evas_Object *o;
+ if (_e_theme_about)
+ {
+ E_Zone *z, *z2;
+
+ about = _e_theme_about;
+ z = e_util_zone_current_get(e_manager_current_get());
+ z2 = about->win->border->zone;
+ e_win_show(about->win);
+ e_win_raise(about->win);
+ if (z->container == z2->container)
+ e_border_desk_set(about->win->border, e_desk_current_get(z));
+ else
+ {
+ if (!about->win->border->sticky)
+ e_desk_show(about->win->border->desk);
+ ecore_x_pointer_warp(z2->container->win,
+ z2->x + (z2->w / 2), z2->y + (z2->h / 2));
+ }
+ e_border_unshade(about->win->border, E_DIRECTION_DOWN);
+ return NULL;
+ }
+
if (!con)
{
man = e_manager_current_get();
@@ -51,6 +75,8 @@
edje_object_signal_callback_add(about->bg_object, "e,action,close", "",
_e_theme_about_cb_close, about);
e_win_centered_set(about->win, 1);
+
+ _e_theme_about = about;
return about;
}
@@ -79,6 +105,7 @@
static void
_e_theme_about_free(E_Theme_About *about)
{
+ _e_theme_about = NULL;
if (about->bg_object) evas_object_del(about->bg_object);
e_object_del(E_OBJECT(about->win));
free(about);
@@ -90,6 +117,7 @@
E_Theme_About *about;
about = win->data;
+ if (!about) return;
e_object_del(E_OBJECT(about));
}
@@ -99,5 +127,6 @@
E_Theme_About *about;
about = data;
+ if (!about) return;
e_object_del(E_OBJECT(about));
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs