[prev in list] [next in list] [prev in thread] [next in thread]
List: enlightenment-svn
Subject: E CVS: apps/e raster
From: enlightenment-cvs () lists ! sourceforge ! net
Date: 2001-11-25 7:19:20
[Download RAW message or body]
Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src
Modified Files:
Makefile.am actions.c border.c border.h config.c match.c
match.h
Added Files:
bordermenu.c bordermenu.h
Log Message:
you can now remember the location of a window.. will add more here.. oh yeah..
window menus too... just close and rememebr location there for now... needs
more things :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/Makefile.am,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- Makefile.am 2001/11/04 07:38:42 1.37
+++ Makefile.am 2001/11/25 07:18:49 1.38
@@ -27,6 +27,7 @@
actions.h actions.c \
background.h background.c \
border.h border.c \
+ bordermenu.h bordermenu.c \
config.h config.c \
cursors.c cursors.h \
debug.c debug.h \
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/actions.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- actions.c 2001/11/24 05:54:32 1.40
+++ actions.c 2001/11/25 07:18:49 1.41
@@ -9,6 +9,7 @@
#include "view.h"
#include "util.h"
#include "guides.h"
+#include "bordermenu.h"
static Evas_List action_impls = NULL;
static Evas_List current_actions = NULL;
@@ -1530,6 +1531,8 @@
if (!b) b = e_border_current_focused();
if (!b) D_RETURN;
if (b->client.is_desktop) D_RETURN;
+
+ e_bordermenu_do(b);
D_RETURN;
UN(a);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/border.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- border.c 2001/11/20 07:01:53 1.59
+++ border.c 2001/11/25 07:18:49 1.60
@@ -12,6 +12,7 @@
#include "place.h"
#include "match.h"
#include "focus.h"
+#include "menu.h"
/* Window border rendering, querying, setting & modification code */
@@ -1215,6 +1216,17 @@
D_ENTER;
+ e_match_save_props(b);
+
+ while (b->menus)
+ {
+ E_Menu *m;
+
+ m = b->menus->data;
+ e_menu_hide(m);
+ e_object_unref(E_OBJECT(m));
+ b->menus = evas_list_remove(b->menus, m);
+ }
e_desktops_del_border(b->desk, b);
if (b->bits.l) ebits_free(b->bits.l);
if (b->bits.r) ebits_free(b->bits.r);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/border.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- border.h 2001/11/16 05:39:34 1.15
+++ border.h 2001/11/25 07:18:49 1.16
@@ -107,6 +107,41 @@
int x, y;
} area;
int internal;
+ struct {
+ int matched;
+ struct {
+ int matched;
+ int ignore;
+ } prog_location;
+ struct {
+ int matched;
+ char *style;
+ } border;
+ struct {
+ int matched;
+ int x, y;
+ } location;
+ struct {
+ int matched;
+ int x, y;
+ } desk_area;
+ struct {
+ int matched;
+ int w, h;
+ } size;
+ struct {
+ int matched;
+ int desk;
+ } desktop;
+ struct {
+ int matched;
+ int sticky;
+ } sticky;
+ struct {
+ int matched;
+ int layer;
+ } layer;
+ } matched;
} client;
struct {
@@ -132,6 +167,8 @@
int first_expose;
int hold_changes;
+
+ Evas_List menus;
int changed;
};
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/config.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- config.c 2001/11/25 03:12:59 1.26
+++ config.c 2001/11/25 07:18:49 1.27
@@ -10,6 +10,7 @@
static char cfg_actions_db[PATH_MAX] = "";
static char cfg_borders_db[PATH_MAX] = "";
static char cfg_apps_menu_db[PATH_MAX] = "";
+static char cfg_match_db[PATH_MAX] = "";
static char cfg_menus_dir[PATH_MAX] = "";
static char cfg_entries_dir[PATH_MAX] = "";
static char cfg_selections_dir[PATH_MAX] = "";
@@ -60,6 +61,8 @@
"%s/behavior/actions.db", e_config_user_dir());
E_CONF("apps_menu", cfg_apps_menu_db,
"%s/behavior/apps_menu.db", e_config_user_dir());
+ E_CONF("match", cfg_match_db,
+ "%s/behavior/match.db", e_config_user_dir());
E_CONF("borders", cfg_borders_db,
PACKAGE_DATA_DIR"/data/borders/");
E_CONF("menus", cfg_menus_dir,
@@ -132,6 +135,7 @@
cfg_actions_db[0] = 0;
cfg_borders_db[0] = 0;
cfg_apps_menu_db[0]= 0;
+ cfg_match_db[0]= 0;
cfg_menus_dir[0] = 0;
cfg_entries_dir[0] = 0;
cfg_selections_dir[0] = 0;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/match.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- match.c 2001/11/02 17:07:52 1.4
+++ match.c 2001/11/25 07:18:49 1.5
@@ -1,42 +1,132 @@
#include "debug.h"
#include "match.h"
+#include "config.h"
void
e_match_set_props(E_Border *b)
{
+ char buf[PATH_MAX];
+ E_DB_File *db;
+ int ok;
+
D_ENTER;
-#if 0
- /* if we have a match that says to ignore prog coords: */
- b->client.pos.requested = 0;
- /* if we have a match that applies a specifi border: */
- IF_FREE(b->border_style);
- e_strdup(b->border_style, match_style);
- /* if we have a match that specifies a location */
- b->client.pos.requested = 1;
- b->client.pos.gravity = NorthWestGravity;
- b->client.pos.x = match_x;
- b->client.pos.y = match_y;
- b->client.no_place = 1;
- /* if we have a match specifying desk area (only valid with loc match */
- b->client.pos.x += (match_area_x - b->desk->desk.area.x) * b->desk->real.w;
- b->client.pos.y += (match_area_y - b->desk->desk.area.y) * b->desk->real.h;
- b->client.area.x = match_area_x;
- b->client.area.y = match_area_y;
- /* if we have a match specifying a size */
- b->current.requested.w = match_w;
- b->current.requested.h = match_h;
- ecore_window_resize(b->win.client, match_w, match_h);
- /* if we have a match specifying a desktop */
- b->client.desk = match_desk;
- e_border_raise(b);
- if (b->client.desk != b->desk->desk.desk) b->current.requested.visible = 0;
- b->client.no_place = 1;
- /* if we have a match specifying stickyness */
- b->client.sticky = match_sticky;
- /* if we have a match specifying layer */
- b->client.layer = match_layer;
-#endif
+ if ((!b->client.name) || (!b->client.class)) D_RETURN;
+ db = e_db_open(e_config_get("match"));
+ sprintf(buf, "match/%s/%s/match", b->client.name, b->client.class);
+ ok = e_db_int_get(db, buf, &(b->client.matched.matched));
+ if (!ok)
+ {
+ e_db_close(db);
+ D_RETURN;
+ }
+ sprintf(buf, "match/%s/%s/prog_location/ignore", b->client.name, \
b->client.class); + b->client.matched.prog_location.matched = e_db_int_get(db, buf, \
&(b->client.matched.prog_location.ignore)); + sprintf(buf, \
"match/%s/%s/border/border", b->client.name, b->client.class); + \
b->client.matched.border.style = e_db_str_get(db, buf); + \
b->client.matched.border.matched = (int)b->client.matched.border.style; + \
sprintf(buf, "match/%s/%s/location/x", b->client.name, b->client.class); + \
b->client.matched.location.matched = e_db_int_get(db, buf, \
&(b->client.matched.location.x)); + sprintf(buf, "match/%s/%s/location/y", \
b->client.name, b->client.class); + b->client.matched.location.matched = \
e_db_int_get(db, buf, &(b->client.matched.location.y)); + sprintf(buf, \
"match/%s/%s/desk_area/x", b->client.name, b->client.class); + \
b->client.matched.desk_area.matched = e_db_int_get(db, buf, \
&(b->client.matched.desk_area.x)); + sprintf(buf, "match/%s/%s/desk_area/y", \
b->client.name, b->client.class); + b->client.matched.desk_area.matched = \
e_db_int_get(db, buf, &(b->client.matched.desk_area.y)); + sprintf(buf, \
"match/%s/%s/size/w", b->client.name, b->client.class); + \
b->client.matched.size.matched = e_db_int_get(db, buf, &(b->client.matched.size.w)); \
+ sprintf(buf, "match/%s/%s/size/h", b->client.name, b->client.class); + \
b->client.matched.size.matched = e_db_int_get(db, buf, &(b->client.matched.size.h)); \
+ sprintf(buf, "match/%s/%s/desktop/desk", b->client.name, b->client.class); + \
b->client.matched.desktop.matched = e_db_int_get(db, buf, \
&(b->client.matched.desktop.desk)); + sprintf(buf, "match/%s/%s/sticky/sticky", \
b->client.name, b->client.class); + b->client.matched.sticky.matched = \
e_db_int_get(db, buf, &(b->client.matched.sticky.sticky)); + sprintf(buf, \
"match/%s/%s/layer/layer", b->client.name, b->client.class); + \
b->client.matched.layer.matched = e_db_int_get(db, buf, \
&(b->client.matched.layer.layer)); +
+ if (b->client.matched.prog_location.matched)
+ {
+ b->client.pos.requested = 0;
+ }
+ if (b->client.matched.border.matched)
+ {
+ IF_FREE(b->border_style);
+ b->border_style = b->client.matched.border.style;
+ }
+ if (b->client.matched.location.matched)
+ {
+ b->client.pos.requested = 1;
+ b->client.pos.gravity = NorthWestGravity;
+ b->client.pos.x = b->client.matched.location.x;
+ b->client.pos.y = b->client.matched.location.y;
+ b->client.no_place = 1;
+ }
+ if (b->client.matched.desk_area.matched)
+ {
+ b->client.pos.x += (b->client.matched.desk_area.x - b->desk->desk.area.x) * \
b->desk->real.w; + b->client.pos.y += (b->client.matched.desk_area.y - \
b->desk->desk.area.y) * b->desk->real.h; + b->client.area.x = \
b->client.matched.desk_area.x; + b->client.area.y = b->client.matched.desk_area.y;
+ }
+ if (b->client.matched.size.matched)
+ {
+ b->current.requested.w = b->client.matched.size.w;
+ b->current.requested.h = b->client.matched.size.h;
+ ecore_window_resize(b->win.client, b->client.matched.size.w, \
b->client.matched.size.h); + }
+ if (b->client.matched.desktop.matched)
+ {
+ b->client.desk = b->client.matched.desktop.desk;
+ e_border_raise(b);
+ if (b->client.desk != b->desk->desk.desk) b->current.requested.visible = 0;
+ b->client.no_place = 1;
+ }
+ if (b->client.matched.sticky.matched)
+ {
+ b->client.sticky = b->client.matched.sticky.sticky;
+ }
+ if (b->client.matched.layer.matched)
+ {
+ b->client.layer = b->client.matched.layer.layer;
+ }
+ e_db_close(db);
+
+ D_RETURN;
+}
+
+void
+e_match_save_props(E_Border *b)
+{
+ char buf[PATH_MAX];
+ E_DB_File *db;
+
+ D_ENTER;
+
+ db = e_db_open(e_config_get("match"));
+ if (!db) D_RETURN;
+
+ sprintf(buf, "match/%s/%s/match", b->client.name, b->client.class);
+ e_db_int_set(db, buf, b->client.matched.matched);
+
+ if (b->client.matched.location.matched)
+ {
+ printf("write location %i %i\n", b->current.x, b->current.y);
+ b->client.matched.location.x = b->current.x;
+ b->client.matched.location.y = b->current.y;
+ sprintf(buf, "match/%s/%s/location/x", b->client.name, b->client.class);
+ e_db_int_set(db, buf, b->client.matched.location.x);
+ sprintf(buf, "match/%s/%s/location/y", b->client.name, b->client.class);
+ e_db_int_set(db, buf, b->client.matched.location.y);
+ }
+ else
+ {
+ sprintf(buf, "match/%s/%s/location/x", b->client.name, b->client.class);
+ e_db_data_del(db, buf);
+ sprintf(buf, "match/%s/%s/location/y", b->client.name, b->client.class);
+ e_db_data_del(db, buf);
+ }
+ e_db_close(db);
+ e_db_flush();
D_RETURN;
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/match.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- match.h 2001/10/08 07:32:54 1.1
+++ match.h 2001/11/25 07:18:49 1.2
@@ -3,8 +3,10 @@
#include "e.h"
#include "border.h"
+#include "desktops.h"
void e_match_set_props(E_Border *b);
+void e_match_save_props(E_Border *b);
#endif
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic