Some forgotten files.

This commit is contained in:
Jaime Thomas 2009-02-19 04:52:13 +00:00
parent 4486630d8e
commit 9249a89e93
2 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,79 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#include "ecdb.h"
static void
_ecdb_about_destroy(void *data, Evas_Object *obj __UNUSED__,
const char *emission __UNUSED__,
const char *source __UNUSED__)
{
ecore_evas_free(data);
}
void
ecdb_about_show(void)
{
Evas_Coord mw, mh;
Ecore_Evas *win = NULL;
Evas_Object *gui;
const char *engine;
engine = getenv("ECDB_ENGINE");
if (engine)
{
if (!strcmp(engine, "gl"))
win = ecore_evas_gl_x11_new(0, 0, 0, 0, 255, 255);
else if (!strcmp(engine, "xr"))
win = ecore_evas_xrender_x11_new(0, 0, 0, 0, 255, 255);
else if (!strcmp(engine, "x11"))
win = ecore_evas_software_x11_new(0, 0, 0, 0, 255, 255);
}
else
{
win = ecore_evas_software_x11_new(0, 0, 0, 0, 255, 255);
}
if (!win)
{
printf("Cannot create the about window!\n");
return;
}
ecore_evas_title_set(win, "ECDB About");
ecore_evas_name_class_set(win, "ECDB", "ECDB");
ecore_evas_avoid_damage_set(win, 1);
gui = edje_object_add(ecore_evas_get(win));
edje_object_file_set(gui, em->theme_path, "ecdb/about");
edje_object_signal_callback_add(gui, "ecdb/close", "ecdb",
_ecdb_about_destroy, win);
ecore_evas_object_associate(win, gui, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
edje_object_size_min_get(gui, &mw, &mh);
if (mw <= 0) mw = 350;
if (mh <= 0) mh = 350;
mw = (int)((float)mw * em->scalef);
mh = (int)((float)mh * em->scalef);
ecore_evas_resize(win, mw, mh);
ecore_evas_size_min_set(win, mw, mh);
edje_object_size_max_get(gui, &mw, &mh);
ecore_evas_size_max_set(win, mw, mh);
evas_object_move(gui, 0, 0);
evas_object_show(gui);
ecore_evas_show(win);
/* Set the proper text */
edje_object_part_text_set(gui, "ecdb.about.label", "Close");
edje_object_part_text_set(gui, "ecdb.about.text",
"Copywrite ©2006-2008, by the ECDB Development Team.<br>"
"<br>"
"This software is provided as-is with no explicit or implied "
"warranty. This software is governed by licensing conditions, "
"so please see the COPYING and COPYRIGHT license files installed "
"on your system.<br>"
"ECDB is under <hilight>HEAVY DEVELOPMENT</hilight> and is "
"not stable. Many features are incomplete or non-existant, and "
"will likely have many bugs. You have been <hilight>WARNED!</hilight>"
"<br><br>"
"Authors: Jaime Thomas <avi.thomas@gmail.com><br>"
"Contributors: Mario Danic <mario@libburnia-project.org><br>");
}

View File

@ -0,0 +1,7 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#ifndef ECDB_ABOUT_H
#define ECDB_ABOUT_H
void ecdb_about_show(void);
#endif