forked from enlightenment/enlightenment
iconbar.. err.. scale down icons AND set image fill (thanks for pointing out
corey), and errr.. segvs in menu changes fixed.. :) SVN revision: 5687
This commit is contained in:
parent
4a7a4f9997
commit
b97bed253d
96
src/border.c
96
src/border.c
|
@ -1246,6 +1246,12 @@ e_border_cleanup(E_Border *b)
|
|||
if (b->bits.r) ebits_free(b->bits.r);
|
||||
if (b->bits.t) ebits_free(b->bits.t);
|
||||
if (b->bits.b) ebits_free(b->bits.b);
|
||||
|
||||
if (b->obj.title.l) e_text_free(b->obj.title.l);
|
||||
if (b->obj.title.r) e_text_free(b->obj.title.r);
|
||||
if (b->obj.title.t) e_text_free(b->obj.title.t);
|
||||
if (b->obj.title.b) e_text_free(b->obj.title.b);
|
||||
|
||||
evases = evas_list_remove(evases, b->evas.l);
|
||||
evases = evas_list_remove(evases, b->evas.r);
|
||||
evases = evas_list_remove(evases, b->evas.t);
|
||||
|
@ -1679,10 +1685,10 @@ e_border_new(void)
|
|||
e_cursors_display_in_window(b->win.t, "Default");
|
||||
e_cursors_display_in_window(b->win.b, "Default");
|
||||
|
||||
b->obj.title.l = evas_add_text(b->evas.l, "borzoib", 8, "");
|
||||
b->obj.title.r = evas_add_text(b->evas.r, "borzoib", 8, "");
|
||||
b->obj.title.t = evas_add_text(b->evas.t, "borzoib", 8, "");
|
||||
b->obj.title.b = evas_add_text(b->evas.b, "borzoib", 8, "");
|
||||
b->obj.title.l = e_text_new(b->evas.l, "", "title");
|
||||
b->obj.title.r = e_text_new(b->evas.r, "", "title");
|
||||
b->obj.title.t = e_text_new(b->evas.t, "", "title");
|
||||
b->obj.title.b = e_text_new(b->evas.b, "", "title");
|
||||
|
||||
b->obj.title_clip.l = evas_add_rectangle(b->evas.l);
|
||||
b->obj.title_clip.r = evas_add_rectangle(b->evas.r);
|
||||
|
@ -1694,30 +1700,20 @@ e_border_new(void)
|
|||
evas_set_color(b->evas.t, b->obj.title_clip.t, 255, 255, 255, 255);
|
||||
evas_set_color(b->evas.b, b->obj.title_clip.b, 255, 255, 255, 255);
|
||||
|
||||
evas_set_pass_events(b->evas.l, b->obj.title.l, 1);
|
||||
evas_set_pass_events(b->evas.r, b->obj.title.r, 1);
|
||||
evas_set_pass_events(b->evas.t, b->obj.title.t, 1);
|
||||
evas_set_pass_events(b->evas.b, b->obj.title.b, 1);
|
||||
|
||||
evas_set_color(b->evas.l, b->obj.title.l, 0, 0, 0, 255);
|
||||
evas_set_color(b->evas.r, b->obj.title.r, 0, 0, 0, 255);
|
||||
evas_set_color(b->evas.t, b->obj.title.t, 0, 0, 0, 255);
|
||||
evas_set_color(b->evas.b, b->obj.title.b, 0, 0, 0, 255);
|
||||
|
||||
evas_show(b->evas.l, b->obj.title.l);
|
||||
evas_show(b->evas.r, b->obj.title.r);
|
||||
evas_show(b->evas.t, b->obj.title.t);
|
||||
evas_show(b->evas.b, b->obj.title.b);
|
||||
e_text_show(b->obj.title.l);
|
||||
e_text_show(b->obj.title.r);
|
||||
e_text_show(b->obj.title.t);
|
||||
e_text_show(b->obj.title.b);
|
||||
|
||||
evas_show(b->evas.l, b->obj.title_clip.l);
|
||||
evas_show(b->evas.r, b->obj.title_clip.r);
|
||||
evas_show(b->evas.t, b->obj.title_clip.t);
|
||||
evas_show(b->evas.b, b->obj.title_clip.b);
|
||||
|
||||
evas_set_clip(b->evas.l, b->obj.title.l, b->obj.title_clip.l);
|
||||
evas_set_clip(b->evas.l, b->obj.title.r, b->obj.title_clip.r);
|
||||
evas_set_clip(b->evas.l, b->obj.title.t, b->obj.title_clip.t);
|
||||
evas_set_clip(b->evas.l, b->obj.title.b, b->obj.title_clip.b);
|
||||
e_text_set_clip(b->obj.title.l, b->obj.title_clip.l);
|
||||
e_text_set_clip(b->obj.title.r, b->obj.title_clip.r);
|
||||
e_text_set_clip(b->obj.title.t, b->obj.title_clip.t);
|
||||
e_text_set_clip(b->obj.title.b, b->obj.title_clip.b);
|
||||
|
||||
ecore_window_raise(b->win.input);
|
||||
ecore_window_raise(b->win.container);
|
||||
|
@ -2385,33 +2381,65 @@ e_border_update(E_Border *b)
|
|||
double tx, ty, tw, th;
|
||||
|
||||
ebits_get_named_bit_geometry(b->bits.l, "Title_Area", &tx, &ty, &tw, &th);
|
||||
evas_set_text(b->evas.l, b->obj.title.l, b->client.title);
|
||||
evas_move(b->evas.l, b->obj.title.l, tx, ty);
|
||||
if (b->obj.title.l)
|
||||
{
|
||||
e_text_set_text(b->obj.title.l, b->client.title);
|
||||
e_text_move(b->obj.title.l, tx, ty);
|
||||
if (b->current.selected)
|
||||
e_text_set_state(b->obj.title.l, "selected");
|
||||
else
|
||||
e_text_set_state(b->obj.title.l, "normal");
|
||||
}
|
||||
evas_move(b->evas.l, b->obj.title_clip.l, tx, ty);
|
||||
evas_resize(b->evas.l, b->obj.title_clip.l, tw, th);
|
||||
|
||||
ebits_get_named_bit_geometry(b->bits.r, "Title_Area", &tx, &ty, &tw, &th);
|
||||
evas_set_text(b->evas.r, b->obj.title.r, b->client.title);
|
||||
evas_move(b->evas.r, b->obj.title.r, tx, ty);
|
||||
if (b->obj.title.r)
|
||||
{
|
||||
e_text_set_text(b->obj.title.r, b->client.title);
|
||||
e_text_move(b->obj.title.r, tx, ty);
|
||||
if (b->current.selected)
|
||||
e_text_set_state(b->obj.title.r, "selected");
|
||||
else
|
||||
e_text_set_state(b->obj.title.r, "normal");
|
||||
}
|
||||
evas_move(b->evas.r, b->obj.title_clip.r, tx, ty);
|
||||
evas_resize(b->evas.r, b->obj.title_clip.r, tw, th);
|
||||
|
||||
ebits_get_named_bit_geometry(b->bits.t, "Title_Area", &tx, &ty, &tw, &th);
|
||||
evas_set_text(b->evas.t, b->obj.title.t, b->client.title);
|
||||
evas_move(b->evas.t, b->obj.title.t, tx, ty);
|
||||
if (b->obj.title.t)
|
||||
{
|
||||
e_text_set_text(b->obj.title.t, b->client.title);
|
||||
e_text_move(b->obj.title.t, tx, ty);
|
||||
if (b->current.selected)
|
||||
e_text_set_state(b->obj.title.t, "selected");
|
||||
else
|
||||
e_text_set_state(b->obj.title.t, "normal");
|
||||
}
|
||||
evas_move(b->evas.t, b->obj.title_clip.t, tx, ty);
|
||||
evas_resize(b->evas.t, b->obj.title_clip.t, tw, th);
|
||||
|
||||
ebits_get_named_bit_geometry(b->bits.b, "Title_Area", &tx, &ty, &tw, &th);
|
||||
evas_set_text(b->evas.b, b->obj.title.b, b->client.title);
|
||||
evas_move(b->evas.b, b->obj.title.b, tx, ty);
|
||||
if (b->obj.title.b)
|
||||
{
|
||||
e_text_set_text(b->obj.title.b, b->client.title);
|
||||
e_text_move(b->obj.title.b, tx, ty);
|
||||
if (b->current.selected)
|
||||
e_text_set_state(b->obj.title.b, "selected");
|
||||
else
|
||||
e_text_set_state(b->obj.title.b, "normal");
|
||||
}
|
||||
evas_move(b->evas.b, b->obj.title_clip.b, tx, ty);
|
||||
evas_resize(b->evas.b, b->obj.title_clip.b, tw, th);
|
||||
|
||||
evas_set_layer(b->evas.l, b->obj.title.l, 1);
|
||||
evas_set_layer(b->evas.r, b->obj.title.r, 1);
|
||||
evas_set_layer(b->evas.t, b->obj.title.t, 1);
|
||||
evas_set_layer(b->evas.b, b->obj.title.b, 1);
|
||||
if (b->obj.title.l)
|
||||
e_text_set_layer(b->obj.title.l, 1);
|
||||
if (b->obj.title.r)
|
||||
e_text_set_layer(b->obj.title.r, 1);
|
||||
if (b->obj.title.t)
|
||||
e_text_set_layer(b->obj.title.t, 1);
|
||||
if (b->obj.title.b)
|
||||
e_text_set_layer(b->obj.title.b, 1);
|
||||
}
|
||||
e_border_reshape(b);
|
||||
if (visibility_changed)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "e.h"
|
||||
#include "observer.h"
|
||||
#include "debug.h"
|
||||
#include "text.h"
|
||||
|
||||
#ifndef E_DESKTOPS_TYPEDEF
|
||||
#define E_DESKTOPS_TYPEDEF
|
||||
|
@ -37,7 +39,7 @@ struct _E_Border
|
|||
} evas;
|
||||
struct {
|
||||
struct {
|
||||
Evas_Object l, r, t, b;
|
||||
E_Text *l, *r, *t, *b;
|
||||
} title;
|
||||
struct {
|
||||
Evas_Object l, r, t, b;
|
||||
|
|
45
src/config.c
45
src/config.c
|
@ -164,6 +164,51 @@ e_config_user_dir(void)
|
|||
D_RETURN_(cfg_user_dir);
|
||||
}
|
||||
|
||||
typedef struct _e_config_file_entry E_Config_File_Entry;
|
||||
|
||||
struct _e_config_file_entry
|
||||
{
|
||||
char *name;
|
||||
struct {
|
||||
char *path;
|
||||
time_t last_mod;
|
||||
} user, system;
|
||||
Evas_List hash[256];
|
||||
};
|
||||
|
||||
void
|
||||
e_config_add_change_cb(char *file, void (*func) (void *_data), void *data)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
e_config_del_change_cb(char *file, void (*func) (void *_data))
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
e_config_val_int_get(char *file, char *key, int def)
|
||||
{
|
||||
}
|
||||
|
||||
float
|
||||
e_config_val_float_get(char *file, char *key, float def)
|
||||
{
|
||||
}
|
||||
|
||||
char *
|
||||
e_config_val_str_get(char *file, char *key, char *def)
|
||||
{
|
||||
}
|
||||
|
||||
char *
|
||||
e_config_val_key_get(char *file, char *key, char *def)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
e_config_type_add_node(E_Config_Base_Type *base, char *prefix,
|
||||
E_Config_Datatype type, E_Config_Base_Type *list_type,
|
||||
|
|
|
@ -161,10 +161,9 @@ e_desktops_scroll(E_Desktop *desk, int dx, int dy)
|
|||
void
|
||||
e_desktops_cleanup(E_Desktop *desk)
|
||||
{
|
||||
Evas_List l;
|
||||
D_ENTER;
|
||||
|
||||
for (l = desk->windows; l; l = l->next)
|
||||
while (desk->windows)
|
||||
{
|
||||
E_Border *b;
|
||||
|
||||
|
@ -176,6 +175,7 @@ e_desktops_cleanup(E_Desktop *desk)
|
|||
ecore_window_reparent(b->win.client, 0, 0, 0);
|
||||
e_icccm_release(b->win.client);
|
||||
}
|
||||
e_object_unref(E_OBJECT(b));
|
||||
}
|
||||
|
||||
ecore_window_destroy(desk->win.main);
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
/*#include "debug.h"*/
|
||||
#include "e_ferite.h"
|
||||
#include "e_ferite_gen_header.h"
|
||||
#include "debug.h"
|
||||
|
||||
#if 0
|
||||
#ifdef D /* until ferite doesn't pullte the D(ebug) macro */
|
||||
# undef D
|
||||
# define D(x,...)
|
||||
|
@ -9,6 +11,7 @@
|
|||
# define D_RETURN
|
||||
# define D_RETURN_(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void e_ferite_init(void)
|
||||
{
|
||||
|
|
|
@ -355,6 +355,7 @@ e_iconbar_fix(E_Iconbar *ib)
|
|||
/* now move and resize it */
|
||||
evas_move(ic->iconbar->view->evas, ic->image, ix + ox, iy + oy);
|
||||
evas_resize(ic->iconbar->view->evas, ic->image, w, h);
|
||||
evas_set_image_fill(ic->iconbar->view->evas, ic->image, 0, 0, w, h);
|
||||
/* advance our position counter to the next spot */
|
||||
ix += w;
|
||||
}
|
||||
|
@ -374,6 +375,7 @@ e_iconbar_fix(E_Iconbar *ib)
|
|||
/* now move the icona nd resize it */
|
||||
evas_move(ic->iconbar->view->evas, ic->image, ix + ox, iy + oy);
|
||||
evas_resize(ic->iconbar->view->evas, ic->image, w, h);
|
||||
evas_set_image_fill(ic->iconbar->view->evas, ic->image, 0, 0, w, h);
|
||||
/* advance out counter to the next spot */
|
||||
iy += h;
|
||||
}
|
||||
|
|
10
src/menu.c
10
src/menu.c
|
@ -554,7 +554,7 @@ e_menu_item_unselect (E_Menu_Item *mi)
|
|||
|
||||
if ((mi) && (mi->menu->selected == mi))
|
||||
{
|
||||
mi->menu->selected = NULL;
|
||||
mi->menu->selected = curr_selected_item = NULL;
|
||||
mi->selected = 0;
|
||||
mi->menu->redo_sel = 1;
|
||||
mi->menu->changed = 1;
|
||||
|
@ -1131,7 +1131,8 @@ e_menu_cleanup(E_Menu *m)
|
|||
IF_FREE(mi->icon);
|
||||
free(mi);
|
||||
}
|
||||
evas_list_free(m->entries);
|
||||
m->entries = evas_list_free(m->entries);
|
||||
m->selected = NULL;
|
||||
IF_FREE(m->bg_file);
|
||||
evas_free(m->evas);
|
||||
ecore_window_destroy(m->win.main);
|
||||
|
@ -1140,6 +1141,7 @@ e_menu_cleanup(E_Menu *m)
|
|||
|
||||
/* Call the destructor of the base class */
|
||||
e_object_cleanup(E_OBJECT(m));
|
||||
m = NULL;
|
||||
|
||||
D_RETURN;
|
||||
}
|
||||
|
@ -1376,8 +1378,10 @@ e_menu_item_unrealize(E_Menu *m, E_Menu_Item *mi)
|
|||
mi->bg = NULL;
|
||||
IF_FREE(mi->bg_file);
|
||||
mi->bg_file = NULL;
|
||||
if (mi->obj_entry) evas_del_object(m->evas, mi->obj_text);
|
||||
if (mi->obj_entry) evas_del_object(m->evas, mi->obj_entry);
|
||||
mi->obj_entry = NULL;
|
||||
if (mi->obj_text) evas_del_object(m->evas, mi->obj_text);
|
||||
mi->obj_text = NULL;
|
||||
if (mi->obj_icon) evas_del_object(m->evas, mi->obj_icon);
|
||||
mi->obj_icon = NULL;
|
||||
if (mi->state) ebits_free(mi->state);
|
||||
|
|
|
@ -22,6 +22,11 @@ e_text_new(Evas evas, char *text, char *class)
|
|||
t->obj.o3 = evas_add_text(t->evas, "borzoib", 8, t->text);
|
||||
t->obj.o4 = evas_add_text(t->evas, "borzoib", 8, t->text);
|
||||
t->obj.text = evas_add_text(t->evas, "borzoib", 8, t->text);
|
||||
evas_set_pass_events(t->evas, t->obj.o1, 1);
|
||||
evas_set_pass_events(t->evas, t->obj.o2, 1);
|
||||
evas_set_pass_events(t->evas, t->obj.o3, 1);
|
||||
evas_set_pass_events(t->evas, t->obj.o4, 1);
|
||||
evas_set_pass_events(t->evas, t->obj.text, 1);
|
||||
evas_set_color(t->evas, t->obj.o1, 0, 0, 0, 255);
|
||||
evas_set_color(t->evas, t->obj.o2, 0, 0, 0, 255);
|
||||
evas_set_color(t->evas, t->obj.o3, 0, 0, 0, 255);
|
||||
|
@ -75,7 +80,7 @@ e_text_set_text(E_Text *t, char *text)
|
|||
|
||||
if (!text) text = "";
|
||||
if (!strcmp(t->text, text)) D_RETURN;
|
||||
IF_FREE(t->text);
|
||||
FREE(t->text);
|
||||
t->text = strdup(text);
|
||||
evas_set_text(t->evas, t->obj.o1, t->text);
|
||||
evas_set_text(t->evas, t->obj.o2, t->text);
|
||||
|
|
Loading…
Reference in New Issue