forked from enlightenment/enlightenment
theme about box! all themes can add their own now! :)
SVN revision: 16839
This commit is contained in:
parent
7c485d5c1f
commit
0dc60ba522
|
@ -36,7 +36,8 @@ default_icons.edc \
|
||||||
default_pointer.edc \
|
default_pointer.edc \
|
||||||
default_randr.edc \
|
default_randr.edc \
|
||||||
default_configure.edc \
|
default_configure.edc \
|
||||||
default_about.edc
|
default_about.edc \
|
||||||
|
default_theme_about.edc
|
||||||
|
|
||||||
default.edj: Makefile $(EXTRA_DIST)
|
default.edj: Makefile $(EXTRA_DIST)
|
||||||
$(EDJE_CC) $(EDJE_FLAGS) \
|
$(EDJE_CC) $(EDJE_FLAGS) \
|
||||||
|
|
|
@ -45,5 +45,6 @@ collections {
|
||||||
#include "default_randr.edc"
|
#include "default_randr.edc"
|
||||||
#include "default_pointer.edc"
|
#include "default_pointer.edc"
|
||||||
#include "default_about.edc"
|
#include "default_about.edc"
|
||||||
|
#include "default_theme_about.edc"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,511 @@
|
||||||
|
images {
|
||||||
|
image: "e17_menu_bg_border.png" COMP;
|
||||||
|
image: "e17_button2.png" COMP;
|
||||||
|
image: "e17_button.png" COMP;
|
||||||
|
image: "e17_dialog_watermark.png" COMP;
|
||||||
|
image: "e17_about_bg_v.png" COMP;
|
||||||
|
image: "e17_about_over_v.png" COMP;
|
||||||
|
image: "e17_logo.png" COMP;
|
||||||
|
image: "e17_about_sky0.png" LOSSY 70;
|
||||||
|
image: "e17_about_sky1.png" LOSSY 70;
|
||||||
|
image: "e17_about_sky2.png" LOSSY 70;
|
||||||
|
image: "e17_about_sky3.png" LOSSY 70;
|
||||||
|
image: "e17_about_sky4.png" LOSSY 70;
|
||||||
|
image: "e17_about_sky5.png" LOSSY 70;
|
||||||
|
image: "e17_about_sky_overlay.png" COMP;
|
||||||
|
}
|
||||||
|
|
||||||
|
styles
|
||||||
|
{
|
||||||
|
style {
|
||||||
|
name: "theme_about_style";
|
||||||
|
base: "font=Edje-Vera style=glow color=#fff glow2_color=#fe87 glow_color=#fa14 font_size=12 align=center wrap=word";
|
||||||
|
|
||||||
|
tag: "br" "\n";
|
||||||
|
tag: "hilight" "+ font=Edje-Vera-Bold";
|
||||||
|
tag: "invisible" "+ font=Edje-Vera font_size=7 style=none color=#0002";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
group {
|
||||||
|
name: "theme/about";
|
||||||
|
min: 400 160;
|
||||||
|
max: 400 160;
|
||||||
|
parts {
|
||||||
|
/*
|
||||||
|
part {
|
||||||
|
name: "base";
|
||||||
|
mouse_events: 0;
|
||||||
|
type: RECT;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
relative: 0.0 0.0;
|
||||||
|
offset: 1 1;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -2 -2;
|
||||||
|
}
|
||||||
|
color: 221 221 221 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
part {
|
||||||
|
name: "sky";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
min: 400 160;
|
||||||
|
max: 400 160;
|
||||||
|
align: 0.5 1.0;
|
||||||
|
fixed: 1 1;
|
||||||
|
rel1 {
|
||||||
|
relative: 0.0 1.0;
|
||||||
|
offset: 7 -1;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -8 -1;
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_about_sky0.png";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "sky1";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_about_sky1.png";
|
||||||
|
}
|
||||||
|
fill {
|
||||||
|
smooth: 0;
|
||||||
|
size {
|
||||||
|
relative: 1.1075 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
description {
|
||||||
|
state: "drift" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
fill {
|
||||||
|
origin {
|
||||||
|
relative: -1.1075 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "sky4";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_about_sky4.png";
|
||||||
|
}
|
||||||
|
fill {
|
||||||
|
smooth: 0;
|
||||||
|
size {
|
||||||
|
relative: 1.12 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
description {
|
||||||
|
state: "drift" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
fill {
|
||||||
|
origin {
|
||||||
|
relative: -1.12 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "about";
|
||||||
|
type: TEXTBLOCK;
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
// max: 200 1000;
|
||||||
|
// min: 200 0;
|
||||||
|
rel1 {
|
||||||
|
to_x: "logo";
|
||||||
|
relative: 1.0 0.0;
|
||||||
|
offset: 6 6;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to_x: "button";
|
||||||
|
relative: 0.0 1.0;
|
||||||
|
offset: -7 -7;
|
||||||
|
}
|
||||||
|
text {
|
||||||
|
style: "theme_about_style";
|
||||||
|
min: 0 1;
|
||||||
|
text:
|
||||||
|
"This is the DEFAULT theme for Enlightenment, "
|
||||||
|
"also known as the <hilight>BLING BLING</hilight> theme. "
|
||||||
|
"It is intended to be conservative and still show "
|
||||||
|
"off some aspects of Enlightenment such as "
|
||||||
|
"the ability to animate transitions and do "
|
||||||
|
"different layouts for objects. Please Enjoy!<br>"
|
||||||
|
"<br>"
|
||||||
|
"<invisible>Aardvarks!!!</invisible>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "sky2";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_about_sky2.png";
|
||||||
|
}
|
||||||
|
fill {
|
||||||
|
smooth: 0;
|
||||||
|
size {
|
||||||
|
relative: 1.1765 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
description {
|
||||||
|
state: "drift" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
fill {
|
||||||
|
origin {
|
||||||
|
relative: -1.1765 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "logo";
|
||||||
|
type: IMAGE;
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
min: 63 63;
|
||||||
|
max: 63 63;
|
||||||
|
align: 0.0 1.0;
|
||||||
|
fixed: 1 1;
|
||||||
|
rel1 {
|
||||||
|
relative: 0.0 1.0;
|
||||||
|
offset: 6 -6;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 0.0 1.0;
|
||||||
|
offset: 6 -6;
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_logo.png";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "sky3";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_about_sky3.png";
|
||||||
|
}
|
||||||
|
fill {
|
||||||
|
smooth: 0;
|
||||||
|
size {
|
||||||
|
relative: 2.1325 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
description {
|
||||||
|
state: "drift" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
fill {
|
||||||
|
origin {
|
||||||
|
relative: -2.1325 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "sky5";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_about_sky5.png";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
part {
|
||||||
|
name: "sky_over";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "sky";
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_about_sky_overlay.png";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "about_bg";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
to: "about";
|
||||||
|
offset: -7 -7;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "about";
|
||||||
|
offset: 6 6;
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_about_bg_v.png";
|
||||||
|
border: 7 7 7 7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "base2";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
min: 200 138;
|
||||||
|
max: 200 138;
|
||||||
|
align: 1.0 1.0;
|
||||||
|
fixed: 1 1;
|
||||||
|
rel1 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -1 -1;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -1 -1;
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_dialog_watermark.png";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "base3";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
image {
|
||||||
|
normal: "e17_menu_bg_border.png";
|
||||||
|
border: 1 1 1 1;
|
||||||
|
middle: 0;
|
||||||
|
}
|
||||||
|
fill {
|
||||||
|
smooth: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
part {
|
||||||
|
name: "about_over";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
to: "about_bg";
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "about_bg";
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_about_over_v.png";
|
||||||
|
border: 13 13 13 13;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
part {
|
||||||
|
name: "button";
|
||||||
|
type: IMAGE;
|
||||||
|
mouse_events: 1;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
min: 64 32;
|
||||||
|
align: 1.0 1.0;
|
||||||
|
fixed: 1 1;
|
||||||
|
rel1 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -7 -7;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -7 -7;
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e17_button.png";
|
||||||
|
border: 8 8 8 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
description {
|
||||||
|
state: "clicked" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
image {
|
||||||
|
normal: "e17_button2.png";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "button_text";
|
||||||
|
type: TEXT;
|
||||||
|
effect: SHADOW;
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
relative: 0.0 0.0;
|
||||||
|
offset: 6 6;
|
||||||
|
to: "button";
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -7 -7;
|
||||||
|
to: "button";
|
||||||
|
}
|
||||||
|
color: 0 0 0 255;
|
||||||
|
color3: 255 255 255 128;
|
||||||
|
text {
|
||||||
|
text: "OK";
|
||||||
|
font: "Edje-Vera";
|
||||||
|
size: 10;
|
||||||
|
min: 1 1;
|
||||||
|
align: 0.5 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
programs {
|
||||||
|
program {
|
||||||
|
name: "button_click";
|
||||||
|
signal: "mouse,down,1";
|
||||||
|
source: "button";
|
||||||
|
action: STATE_SET "clicked" 0.0;
|
||||||
|
target: "button";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "button_unclick";
|
||||||
|
signal: "mouse,up,1";
|
||||||
|
source: "button";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "button";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "button_unclick2";
|
||||||
|
signal: "mouse,clicked,1";
|
||||||
|
source: "button";
|
||||||
|
action: SIGNAL_EMIT "close" "";
|
||||||
|
}
|
||||||
|
|
||||||
|
program {
|
||||||
|
name: "anim_sky1a";
|
||||||
|
signal: "show";
|
||||||
|
source: "";
|
||||||
|
action: STATE_SET "drift" 0.0;
|
||||||
|
transition: LINEAR 20.0;
|
||||||
|
target: "sky1";
|
||||||
|
after: "anim_sky1b";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "anim_sky1b";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "sky1";
|
||||||
|
after: "anim_sky1a";
|
||||||
|
}
|
||||||
|
|
||||||
|
program {
|
||||||
|
name: "anim_sky4a";
|
||||||
|
signal: "show";
|
||||||
|
source: "";
|
||||||
|
action: STATE_SET "drift" 0.0;
|
||||||
|
transition: LINEAR 15.0;
|
||||||
|
target: "sky4";
|
||||||
|
after: "anim_sky4b";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "anim_sky4b";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "sky4";
|
||||||
|
after: "anim_sky4a";
|
||||||
|
}
|
||||||
|
|
||||||
|
program {
|
||||||
|
name: "anim_sky2a";
|
||||||
|
signal: "show";
|
||||||
|
source: "";
|
||||||
|
action: STATE_SET "drift" 0.0;
|
||||||
|
transition: LINEAR 15.0;
|
||||||
|
target: "sky2";
|
||||||
|
after: "anim_sky2b";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "anim_sky2b";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "sky2";
|
||||||
|
after: "anim_sky2a";
|
||||||
|
}
|
||||||
|
|
||||||
|
program {
|
||||||
|
name: "anim_sky3a";
|
||||||
|
signal: "show";
|
||||||
|
source: "";
|
||||||
|
action: STATE_SET "drift" 0.0;
|
||||||
|
transition: LINEAR 15.0;
|
||||||
|
target: "sky3";
|
||||||
|
after: "anim_sky3b";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "anim_sky3b";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "sky3";
|
||||||
|
after: "anim_sky3a";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -71,7 +71,8 @@ e_win.h \
|
||||||
e_pan.h \
|
e_pan.h \
|
||||||
e_dialog.h \
|
e_dialog.h \
|
||||||
e_configure.h \
|
e_configure.h \
|
||||||
e_about.h
|
e_about.h \
|
||||||
|
e_theme_about.h
|
||||||
|
|
||||||
enlightenment_SOURCES = \
|
enlightenment_SOURCES = \
|
||||||
e_main.c \
|
e_main.c \
|
||||||
|
@ -131,6 +132,7 @@ e_pan.c \
|
||||||
e_dialog.c \
|
e_dialog.c \
|
||||||
e_configure.c \
|
e_configure.c \
|
||||||
e_about.c \
|
e_about.c \
|
||||||
|
e_theme_about.c \
|
||||||
$(ENLIGHTENMENTHEADERS)
|
$(ENLIGHTENMENTHEADERS)
|
||||||
|
|
||||||
enlightenment_LDFLAGS = -export-dynamic @e_libs@ @x_libs@ @dlopen_libs@ @cf_libs@
|
enlightenment_LDFLAGS = -export-dynamic @e_libs@ @x_libs@ @dlopen_libs@ @cf_libs@
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static void _e_about_free(E_About *about);
|
static void _e_about_free(E_About *about);
|
||||||
static void _e_about_cb_delete(E_Win *win);
|
static void _e_about_cb_delete(E_Win *win);
|
||||||
static void _e_dialog_cb_close(void *data, Evas_Object *obj, const char *emission, const char *source);
|
static void _e_about_cb_close(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||||
|
|
||||||
/* local subsystem globals */
|
/* local subsystem globals */
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ e_about_new(E_Container *con)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
edje_object_signal_callback_add(about->bg_object, "close", "",
|
edje_object_signal_callback_add(about->bg_object, "close", "",
|
||||||
_e_dialog_cb_close, about);
|
_e_about_cb_close, about);
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char buf[4096], buf2[4096], *tbuf;
|
char buf[4096], buf2[4096], *tbuf;
|
||||||
|
@ -166,7 +166,7 @@ _e_about_cb_delete(E_Win *win)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_dialog_cb_close(void *data, Evas_Object *obj, const char *emission, const char *source)
|
_e_about_cb_close(void *data, Evas_Object *obj, const char *emission, const char *source)
|
||||||
{
|
{
|
||||||
E_About *about;
|
E_About *about;
|
||||||
|
|
||||||
|
|
|
@ -58,3 +58,4 @@
|
||||||
#include "e_dialog.h"
|
#include "e_dialog.h"
|
||||||
#include "e_configure.h"
|
#include "e_configure.h"
|
||||||
#include "e_about.h"
|
#include "e_about.h"
|
||||||
|
#include "e_theme_about.h"
|
||||||
|
|
|
@ -24,6 +24,7 @@ static void _e_int_menus_quit (void);
|
||||||
static void _e_int_menus_quit_cb (void *data);
|
static void _e_int_menus_quit_cb (void *data);
|
||||||
static void _e_int_menus_main_del_hook (void *obj);
|
static void _e_int_menus_main_del_hook (void *obj);
|
||||||
static void _e_int_menus_main_about (void *data, E_Menu *m, E_Menu_Item *mi);
|
static void _e_int_menus_main_about (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||||
|
static void _e_int_menus_main_theme_about (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||||
static void _e_int_menus_main_run (void *data, E_Menu *m, E_Menu_Item*mi);
|
static void _e_int_menus_main_run (void *data, E_Menu *m, E_Menu_Item*mi);
|
||||||
static void _e_int_menus_main_restart (void *data, E_Menu *m, E_Menu_Item *mi);
|
static void _e_int_menus_main_restart (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||||
static void _e_int_menus_main_exit (void *data, E_Menu *m, E_Menu_Item *mi);
|
static void _e_int_menus_main_exit (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||||
|
@ -134,6 +135,11 @@ e_int_menus_main_new(void)
|
||||||
e_util_menu_item_edje_icon_set(mi, "enlightenment/e");
|
e_util_menu_item_edje_icon_set(mi, "enlightenment/e");
|
||||||
e_menu_item_callback_set(mi, _e_int_menus_main_about, NULL);
|
e_menu_item_callback_set(mi, _e_int_menus_main_about, NULL);
|
||||||
|
|
||||||
|
mi = e_menu_item_new(m);
|
||||||
|
e_menu_item_label_set(mi, _("About This Theme"));
|
||||||
|
e_util_menu_item_edje_icon_set(mi, "enlightenment/theme");
|
||||||
|
e_menu_item_callback_set(mi, _e_int_menus_main_theme_about, NULL);
|
||||||
|
|
||||||
if (ecore_file_app_installed("exige"))
|
if (ecore_file_app_installed("exige"))
|
||||||
{
|
{
|
||||||
mi = e_menu_item_new(m);
|
mi = e_menu_item_new(m);
|
||||||
|
@ -358,6 +364,15 @@ _e_int_menus_main_about(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||||
if (about) e_about_show(about);
|
if (about) e_about_show(about);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_e_int_menus_main_theme_about(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||||
|
{
|
||||||
|
E_Theme_About *about;
|
||||||
|
|
||||||
|
about = e_theme_about_new(e_container_current_get(e_manager_current_get()));
|
||||||
|
if (about) e_theme_about_show(about);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_int_menus_main_run(void *data, E_Menu *m, E_Menu_Item *mi)
|
_e_int_menus_main_run(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,101 @@
|
||||||
|
/*
|
||||||
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
|
*/
|
||||||
|
#include "e.h"
|
||||||
|
|
||||||
|
/* local subsystem functions */
|
||||||
|
static void _e_theme_about_free(E_Theme_About *about);
|
||||||
|
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);
|
||||||
|
|
||||||
|
/* local subsystem globals */
|
||||||
|
|
||||||
|
/* externally accessible functions */
|
||||||
|
|
||||||
|
E_Theme_About *
|
||||||
|
e_theme_about_new(E_Container *con)
|
||||||
|
{
|
||||||
|
E_Theme_About *about;
|
||||||
|
E_Manager *man;
|
||||||
|
Evas_Object *o;
|
||||||
|
|
||||||
|
if (!con)
|
||||||
|
{
|
||||||
|
man = e_manager_current_get();
|
||||||
|
if (!man) return NULL;
|
||||||
|
con = e_container_current_get(man);
|
||||||
|
if (!con) con = e_container_number_get(man, 0);
|
||||||
|
if (!con) return NULL;
|
||||||
|
}
|
||||||
|
about = E_OBJECT_ALLOC(E_Theme_About, E_THEME_ABOUT_TYPE, _e_theme_about_free);
|
||||||
|
if (!about) return NULL;
|
||||||
|
about->win = e_win_new(con);
|
||||||
|
if (!about->win)
|
||||||
|
{
|
||||||
|
free(about);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
e_win_delete_callback_set(about->win, _e_theme_about_cb_delete);
|
||||||
|
about->win->data = about;
|
||||||
|
e_win_name_class_set(about->win, "E", "_theme_about");
|
||||||
|
e_win_title_set(about->win, _("About This Theme"));
|
||||||
|
|
||||||
|
o = edje_object_add(e_win_evas_get(about->win));
|
||||||
|
about->bg_object = o;
|
||||||
|
e_theme_edje_object_set(o, "base",
|
||||||
|
"theme/about");
|
||||||
|
evas_object_move(o, 0, 0);
|
||||||
|
evas_object_show(o);
|
||||||
|
|
||||||
|
edje_object_signal_callback_add(about->bg_object, "close", "",
|
||||||
|
_e_theme_about_cb_close, about);
|
||||||
|
e_win_centered_set(about->win, 1);
|
||||||
|
return about;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_theme_about_show(E_Theme_About *about)
|
||||||
|
{
|
||||||
|
Evas_Coord w, h, mw, mh;
|
||||||
|
|
||||||
|
edje_object_size_min_get(about->bg_object, &mw, &mh);
|
||||||
|
evas_object_resize(about->bg_object, mw, mh);
|
||||||
|
e_win_resize(about->win, mw, mh);
|
||||||
|
e_win_size_min_set(about->win, mw, mh);
|
||||||
|
|
||||||
|
edje_object_size_max_get(about->bg_object, &w, &h);
|
||||||
|
if ((w > 0) && (h > 0))
|
||||||
|
{
|
||||||
|
if (w < mw) w = mw;
|
||||||
|
if (h < mh) h = mh;
|
||||||
|
e_win_size_max_set(about->win, mw, mh);
|
||||||
|
}
|
||||||
|
e_win_show(about->win);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* local subsystem functions */
|
||||||
|
static void
|
||||||
|
_e_theme_about_free(E_Theme_About *about)
|
||||||
|
{
|
||||||
|
if (about->bg_object) evas_object_del(about->bg_object);
|
||||||
|
e_object_del(E_OBJECT(about->win));
|
||||||
|
free(about);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_e_theme_about_cb_delete(E_Win *win)
|
||||||
|
{
|
||||||
|
E_Theme_About *about;
|
||||||
|
|
||||||
|
about = win->data;
|
||||||
|
e_object_del(E_OBJECT(about));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_e_theme_about_cb_close(void *data, Evas_Object *obj, const char *emission, const char *source)
|
||||||
|
{
|
||||||
|
E_Theme_About *about;
|
||||||
|
|
||||||
|
about = data;
|
||||||
|
e_object_del(E_OBJECT(about));
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
|
*/
|
||||||
|
#ifdef E_TYPEDEFS
|
||||||
|
|
||||||
|
typedef struct _E_Theme_About E_Theme_About;
|
||||||
|
|
||||||
|
#else
|
||||||
|
#ifndef E_THEME_ABOUT_H
|
||||||
|
#define E_THEME_ABOUT_H
|
||||||
|
|
||||||
|
#define E_THEME_ABOUT_TYPE 0xE0b01015
|
||||||
|
|
||||||
|
struct _E_Theme_About
|
||||||
|
{
|
||||||
|
E_Object e_obj_inherit;
|
||||||
|
|
||||||
|
E_Win *win;
|
||||||
|
Evas_Object *bg_object;
|
||||||
|
void *data;
|
||||||
|
};
|
||||||
|
|
||||||
|
EAPI E_Theme_About *e_theme_about_new (E_Container *con);
|
||||||
|
EAPI void e_theme_about_show (E_Theme_About *about);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
Loading…
Reference in New Issue