Enlightenment CVS committal
Author : xcomputerman
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_container.c e_container.h e_int_menus.c e_manager.c
e_manager.h
Log Message:
Some support for multiple containers -- map new windows to the currently
visible container rather than the first.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- e_container.c 4 Jan 2005 01:32:23 -0000 1.14
+++ e_container.c 5 Jan 2005 08:30:25 -0000 1.15
@@ -1,3 +1,6 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
#include "e.h"
/* TODO List:
@@ -38,6 +41,7 @@
E_Container *con;
E_Zone *zone;
Evas_Object *o;
+ char name[40];
con = E_OBJECT_ALLOC(E_Container, _e_container_free);
if (!con) return NULL;
@@ -72,6 +76,10 @@
e_pointer_container_set(con);
+ con->num = evas_list_count(con->manager->containers);
+ snprintf(name, sizeof(name), "Container %d", con->num);
+ con->name = strdup(name);
+
/* FIXME: Add ecore code to fetch xinerama screens for zones */
zone = e_zone_new(con, 0, 0, con->w, con->h);
@@ -97,6 +105,21 @@
con->visible = 0;
}
+E_Container *
+e_container_current_get(E_Manager *man)
+{
+ Evas_List *l;
+ E_OBJECT_CHECK_RETURN(man, NULL);
+
+ for (l = man->containers; l; l = l->next)
+ {
+ E_Container *con = l->data;
+ if (con->visible)
+ return con;
+ }
+ return NULL;
+}
+
void
e_container_move(E_Container *con, int x, int y)
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- e_container.h 4 Jan 2005 01:51:27 -0000 1.6
+++ e_container.h 5 Jan 2005 08:30:25 -0000 1.7
@@ -26,6 +26,9 @@
char visible : 1;
E_Manager *manager;
+ int num;
+ char *name;
+
Ecore_Evas *bg_ecore_evas;
Evas *bg_evas;
Evas_Object *bg_blank_object;
@@ -64,6 +67,7 @@
EAPI E_Container *e_container_new(E_Manager *man);
EAPI void e_container_show(E_Container *con);
EAPI void e_container_hide(E_Container *con);
+EAPI E_Container *e_container_current_get(E_Manager *man);
EAPI void e_container_move(E_Container *con, int x, int y);
EAPI void e_container_resize(E_Container *con, int w, int h);
EAPI void e_container_move_resize(E_Container *con, int x, int y, int
w, int h);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_int_menus.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- e_int_menus.c 4 Jan 2005 07:16:24 -0000 1.18
+++ e_int_menus.c 5 Jan 2005 08:30:25 -0000 1.19
@@ -304,7 +304,7 @@
m->items = NULL;
mi = e_menu_item_new(m);
- e_menu_item_label_set(mi, "Add New Desktop");
+ e_menu_item_label_set(mi, "New Desktop");
e_menu_item_callback_set(mi, _e_int_menus_desktops_add_cb, NULL);
mi = e_menu_item_new(m);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_manager.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_manager.c 3 Jan 2005 14:14:30 -0000 1.5
+++ e_manager.c 5 Jan 2005 08:30:25 -0000 1.6
@@ -1,3 +1,6 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
#include "e.h"
/* local subsystem functions */
@@ -185,7 +188,7 @@
E_Container *con;
E_Border *bd;
- con = man->containers->data;
+ con = e_container_current_get(man);
if (!e_border_find_by_client_window(e->win))
{
bd = e_border_new(con, e->win, 0);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_manager.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_manager.h 25 Nov 2004 05:31:20 -0000 1.2
+++ e_manager.h 5 Jan 2005 08:30:25 -0000 1.3
@@ -19,13 +19,13 @@
EAPI int e_manager_shutdown(void);
EAPI Evas_List *e_manager_list(void);
-EAPI E_Manager *e_manager_new(Ecore_X_Window root);
-EAPI void e_manager_show(E_Manager *man);
-EAPI void e_manager_hide(E_Manager *man);
-EAPI void e_manager_move(E_Manager *man, int x, int y);
-EAPI void e_manager_resize(E_Manager *man, int w, int h);
-EAPI void e_manager_move_resize(E_Manager *man, int x, int y, int w, int
h);
-EAPI void e_manager_raise(E_Manager *man);
-EAPI void e_manager_lower(E_Manager *man);
+EAPI E_Manager *e_manager_new(Ecore_X_Window root);
+EAPI void e_manager_show(E_Manager *man);
+EAPI void e_manager_hide(E_Manager *man);
+EAPI void e_manager_move(E_Manager *man, int x, int y);
+EAPI void e_manager_resize(E_Manager *man, int w, int h);
+EAPI void e_manager_move_resize(E_Manager *man, int x, int y, int
w, int h);
+EAPI void e_manager_raise(E_Manager *man);
+EAPI void e_manager_lower(E_Manager *man);
#endif
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs