borders moved around. much cleaner way of selecting borders now


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 22 years ago
parent fe31736fb5
commit ce2c13f424
  1. 21
      autogen.sh
  2. 0
      data/config/appearance/default/borders/borderless/selected-0.sticky-0.shaded-0.bits.db
  3. 0
      data/config/appearance/default/borders/default/selected-0.sticky-0.shaded-0.bits.db
  4. 0
      data/config/appearance/default/borders/default/selected-1.sticky-0.shaded-0.bits.db
  5. 3
      src/actions.c
  6. 23
      src/border.c
  7. 25
      src/config.c
  8. 5
      src/e.h
  9. 2
      src/util.c

@ -146,3 +146,24 @@ if test x$NOCONFIGURE = x; then
else
echo Skipping configure process.
fi
cd data/config/appearance/default/borders/
cd borderless
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-1.sticky-0.shaded-0.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-0.sticky-1.shaded-0.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-0.sticky-0.shaded-1.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-1.sticky-1.shaded-0.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-1.sticky-0.shaded-1.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-1.sticky-1.shaded-1.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-0.sticky-1.shaded-1.bits.db
cd ..
cd default
#ln -sf selected-0.sticky-0.shaded-0.bits.db selected-1.sticky-0.shaded-0.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-0.sticky-1.shaded-0.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-0.sticky-0.shaded-1.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-1.sticky-1.shaded-0.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-1.sticky-0.shaded-1.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-1.sticky-1.shaded-1.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-0.sticky-1.shaded-1.bits.db
cd ..

@ -747,6 +747,7 @@ e_act_cb_shade(int val, void *data)
e_border_adjust_limits(b);
if (si < b->client.h)
e_add_event_timer("shader", 0.01, e_act_cb_shade, 1, data);
e_border_apply_border(b);
}
static void e_act_cb_unshade(int val, void *data);
@ -766,11 +767,13 @@ e_act_cb_unshade(int val, void *data)
si = b->client.h - (int)(dif * (double)pix_per_sec);
if (si < 0) si = 0;
b->current.shaded = si;
b->changed = 1;
e_border_adjust_limits(b);
if (si > 0)
e_add_event_timer("shader", 0.01, e_act_cb_unshade, 1, data);
e_border_apply_border(b);
}
static void

@ -987,15 +987,26 @@ void
e_border_apply_border(E_Border *b)
{
int pl, pr, pt, pb;
char *borders, buf[4096], *border;
char *borders, buf[4096], border[4096], *style = NULL;
int prop_selected = 0, prop_sticky = 0, prop_shaded = 0;
if ((!b->client.titlebar) &&
(!b->client.border)) border = "borderless.bits.db";
else if (b->current.selected) border = "border.bits.db";
else border = "border2.bits.db";
style = "default";
if ((!b->client.titlebar) && (!b->client.border)) style = "borderless";
if (b->current.selected) prop_selected = 1;
if (b->current.shaded == b->client.h) prop_shaded = 1;
if (b->client.sticky) prop_sticky = 1;
sprintf(border, "selected-%i.sticky-%i.shaded-%i.bits.db",
prop_selected, prop_sticky, prop_shaded);
borders = e_config_get("borders");
sprintf(buf, "%s%s", borders, border);
sprintf(buf, "%s%s/%s", borders, style, border);
/* if it's not changed - abort and dont do anything */
if ((b->border_file) && (!strcmp(buf, b->border_file))) return;
IF_FREE(b->border_file);
b->border_file = strdup(buf);
e_border_set_bits(b, buf);
pl = pr = pt = pb = 0;

@ -1,5 +1,7 @@
#include "e.h"
static char cfg_root[] = "";
#define E_CONF(_key, _var, _args...) \
{ \
if (!strcmp(type, _key)) \
@ -30,6 +32,12 @@ e_config_get(char *type)
/* as well as all data - so the only place to look is there. If you */
/* have no data it is all copied over for you the first time E is */
/* run. It's a design decision. */
/* Later when things are a bit mroe stabilised these will look */
/* something like: */
/* E_CONF("grabs", cfg_grabs_db, */
/* "%sbehavior/default/grabs.db", e_config_user_dir()); */
/* notice it would use the user config location instead */
/* but for now i'm keeping it as is for development "ease" */
E_CONF("grabs", cfg_grabs_db,
PACKAGE_DATA_DIR"/data/config/behavior/default/grabs.db");
E_CONF("settings", cfg_settings_db,
@ -76,10 +84,27 @@ e_config_init(void)
}
}
void
e_config_set_user_dir(char *dir)
{
strcpy(cfg_root, dir);
/* reset the cached dir paths */
cfg_grabs_db[0] = 0;
cfg_settings_db[0] = 0;
cfg_actions_db[0] = 0;
cfg_borders_db[0] = 0;
cfg_user_dir[0] = 0;
cfg_images_dir[0] = 0;
cfg_fonts_dir[0] = 0;
/* init again - if the user hasnt got all the data */
e_config_init();
}
char *
e_config_user_dir(void)
{
if (cfg_user_dir[0]) return cfg_user_dir;
if (cfg_root[0]) return cfg_root;
sprintf(cfg_user_dir, "%s/.e/", e_file_home());
return cfg_user_dir;
}

@ -208,6 +208,8 @@ struct _E_Border
Evas_List grabs;
E_Desktop *desk;
char *border_file;
int changed;
};
@ -360,6 +362,7 @@ pid_t e_exec_run(char *exe);
pid_t e_exec_run_in_dir(char *exe, char *dir);
pid_t e_run_in_dir_with_env(char *exe, char *dir, int *launch_id_ret, char **env, char *launch_path);
char *e_config_get(char *type);
void e_config_init(void);
void e_config_set_user_dir(char *dir);
char *e_config_user_dir(void);
char *e_config_get(char *type);

@ -70,7 +70,7 @@ e_file_cp(char *src, char *dst)
f2 = fopen(dst, "wb");
if (!f2)
{
fclose(f2);
fclose(f1);
return 0;
}
while ((num = fread(buf, 1, 4096, f1)) > 0) fwrite(buf, 1, num, f2);

Loading…
Cancel
Save