projects
/
livewp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93f568b
)
done right work fifteen
author
tanya
<tanyshk@gmail.com>
Fri, 3 Sep 2010 06:56:02 +0000
(09:56 +0300)
committer
tanya
<tanyshk@gmail.com>
Fri, 3 Sep 2010 06:56:02 +0000
(09:56 +0300)
applet/data/external_themes/fifteen.xml
patch
|
blob
|
history
applet/src/fifteen.c
patch
|
blob
|
history
applet/src/livewp-main.c
patch
|
blob
|
history
applet/src/livewp-scene.c
patch
|
blob
|
history
diff --git
a/applet/data/external_themes/fifteen.xml
b/applet/data/external_themes/fifteen.xml
index
869a63a
..
c6e1803
100644
(file)
--- a/
applet/data/external_themes/fifteen.xml
+++ b/
applet/data/external_themes/fifteen.xml
@@
-1,7
+1,7
@@
<theme>
<name>Fifteen</name>
<exec_path>/usr/bin/fifteen</exec_path>
<theme>
<name>Fifteen</name>
<exec_path>/usr/bin/fifteen</exec_path>
- <window_name>fifteen</window_name>
+ <window_name>Fifteen_exec</window_name>
<category>Game</category>
<icon_on>/usr/share/livewp/external_icons/xscreensaver.png</icon_on>
<icon_off>/usr/share/livewp/external_icons/xscreensaverd.png</icon_off>
<category>Game</category>
<icon_on>/usr/share/livewp/external_icons/xscreensaver.png</icon_on>
<icon_off>/usr/share/livewp/external_icons/xscreensaverd.png</icon_off>
diff --git
a/applet/src/fifteen.c
b/applet/src/fifteen.c
index
984797d
..
3f37f4e
100644
(file)
--- a/
applet/src/fifteen.c
+++ b/
applet/src/fifteen.c
@@
-58,7
+58,6
@@
void reinit(AWallpaperPlugin *desktop_plugin)
set_actor_position(actor, actor->x, actor->y, actor->z, desktop_plugin);
//set_actor_position(actor, (i%4)*width, (i/4)*height, 2, desktop_plugin);
}
set_actor_position(actor, actor->x, actor->y, actor->z, desktop_plugin);
//set_actor_position(actor, (i%4)*width, (i/4)*height, 2, desktop_plugin);
}
- fprintf(stderr,"end reinit\n");
}
void moving_actor(gint num, gint max, AWallpaperPlugin *desktop_plugin)
}
void moving_actor(gint num, gint max, AWallpaperPlugin *desktop_plugin)
@@
-105,8
+104,8
@@
gboolean main_timer(AWallpaperPlugin *desktop_plugin)
moving_all(scene->timer_num, 20, desktop_plugin);
return;
}
moving_all(scene->timer_num, 20, desktop_plugin);
return;
}
- char * accel_filename = "/sys/class/i2c-adapter/i2c-3/3-001d/coord";
- //char * accel_filename = "/home/tanya/coord";
+ //char * accel_filename = "/sys/class/i2c-adapter/i2c-3/3-001d/coord";
+ char * accel_filename = "/home/tanya/coord";
gint direction = -1, bone;
FILE *fd = NULL;
gint direction = -1, bone;
FILE *fd = NULL;
@@
-155,7
+154,7
@@
gboolean main_timer(AWallpaperPlugin *desktop_plugin)
if (bone < 0) return TRUE;
}
} else return TRUE;
if (bone < 0) return TRUE;
}
} else return TRUE;
- fprintf(stderr, "move %d\n", bone);
+ //fprintf(stderr, "move %d\n", bone);
scene->bone = bone;
scene->timer_num = 10;
scene->bone = bone;
scene->timer_num = 10;
@@
-166,7
+165,7
@@
void init_actors(AWallpaperPlugin *desktop_plugin)
gint i;
Actor *actor;
actor = init_object(desktop_plugin, "background", g_strdup("background.jpg"),
gint i;
Actor *actor;
actor = init_object(desktop_plugin, "background", g_strdup("background.jpg"),
- -180, -10, 2, 800, 480,
+ -180, -15, 2, 800, 480,
TRUE, TRUE, 100, 255,
NULL, NULL, NULL);
for (i=0; i<15; i++){
TRUE, TRUE, 100, 255,
NULL, NULL, NULL);
for (i=0; i<15; i++){
@@
-186,10
+185,13
@@
quit_from_program (Animation_WallpaperPrivate *priv)
void
view_state_changed (Animation_WallpaperPrivate *priv)
{
void
view_state_changed (Animation_WallpaperPrivate *priv)
{
- if (priv->visible){
+ if (priv->visible && priv->long_timer == 0){
priv->long_timer = g_timeout_add(50, main_timer, priv->desktop_plugin);
priv->long_timer = g_timeout_add(50, main_timer, priv->desktop_plugin);
+ //fprintf(stderr, "visible = 1 timeout_add %d\n", priv->long_timer);
}else {
}else {
+ //fprintf(stderr, "visible = 0 timer remove %d\n", priv->long_timer);
g_source_remove(priv->long_timer);
g_source_remove(priv->long_timer);
+ priv->long_timer = 0;
}
}
}
}
@@
-218,21
+220,24
@@
int main( int argc, char *argv[] )
}
}
}
}
- fprintf(stderr, "view=%d window_id=%d\n", view, window_id);
+ //fprintf(stderr, "view=%d window_id=%d\n", view, window_id);
hildon_gtk_init (&argc, &argv);
hildon_gtk_init (&argc, &argv);
- g_set_application_name ("fifteen");
+ g_set_application_name ("Fifteen");
window = hildon_window_new ();
window = hildon_window_new ();
- gtk_window_set_title(window,"fifteen");
+ //gtk_window_fullscreen (GTK_WINDOW(window));
+ gtk_window_set_title(window,"Fifteen");
+ gtk_window_set_wmclass(window,"Fifteen_exec","Fifteen_exec");
//window->window = window_id;
g_signal_connect (G_OBJECT (window), "delete_event",
G_CALLBACK (gtk_main_quit), NULL);
priv->window = window;
priv->theme = g_strdup("Fifteen");
priv->xapplet = -180;
//window->window = window_id;
g_signal_connect (G_OBJECT (window), "delete_event",
G_CALLBACK (gtk_main_quit), NULL);
priv->window = window;
priv->theme = g_strdup("Fifteen");
priv->xapplet = -180;
- priv->yapplet = -10;
+ priv->yapplet = -15;
priv->desktop_plugin = desktop_plugin;
priv->view = view;
priv->desktop_plugin = desktop_plugin;
priv->view = view;
+ priv->long_timer = 0;
desktop_plugin->priv = priv;
priv->osso = osso_initialize("org.maemo.livewp", VERSION, TRUE, NULL);
desktop_plugin->priv = priv;
priv->osso = osso_initialize("org.maemo.livewp", VERSION, TRUE, NULL);
@@
-247,6
+252,7
@@
int main( int argc, char *argv[] )
reinit(desktop_plugin);
gtk_widget_show (window);
priv->long_timer = g_timeout_add(50, main_timer, desktop_plugin);
reinit(desktop_plugin);
gtk_widget_show (window);
priv->long_timer = g_timeout_add(50, main_timer, desktop_plugin);
+ //fprintf(stderr, "create timer %d\n", priv->long_timer);
gtk_main ();
return 0;
}
gtk_main ();
return 0;
}
diff --git
a/applet/src/livewp-main.c
b/applet/src/livewp-main.c
index
d11e207
..
4df4827
100644
(file)
--- a/
applet/src/livewp-main.c
+++ b/
applet/src/livewp-main.c
@@
-40,7
+40,6
@@
void
set_live_bg (Display *display, Window xwindow, int mode)
{
Atom atom;
set_live_bg (Display *display, Window xwindow, int mode)
{
Atom atom;
-
atom = XInternAtom (display, "_HILDON_LIVE_DESKTOP_BACKGROUND", False);
fprintf (stderr, "XID: 0x%x\n", (unsigned)xwindow);
atom = XInternAtom (display, "_HILDON_LIVE_DESKTOP_BACKGROUND", False);
fprintf (stderr, "XID: 0x%x\n", (unsigned)xwindow);
diff --git
a/applet/src/livewp-scene.c
b/applet/src/livewp-scene.c
index
7129006
..
1a67406
100644
(file)
--- a/
applet/src/livewp-scene.c
+++ b/
applet/src/livewp-scene.c
@@
-38,7
+38,7
@@
Window Window_With_Name( Display *dpy, Window top, char *name)
if (class_hint->res_name && name && !strcmp(class_hint->res_name, name)){
XFree(class_hint->res_class);
XFree(class_hint->res_name);
if (class_hint->res_name && name && !strcmp(class_hint->res_name, name)){
XFree(class_hint->res_class);
XFree(class_hint->res_name);
- return(top);
+ return(top);
}
XFree(class_hint->res_class);
XFree(class_hint->res_name);
}
XFree(class_hint->res_class);
XFree(class_hint->res_name);
@@
-263,6
+263,8
@@
init_scene_External(AWallpaperPlugin *desktop_plugin){
fprintf(stderr,"Problem with new podprocess");
}
g_free(run_string);
fprintf(stderr,"Problem with new podprocess");
}
g_free(run_string);
+
+ fprintf(stderr, "window name = %s\n", window_name);
if (window_name){
/* Do 10 trying to search of window */
for (i=0; i<10; i++){
if (window_name){
/* Do 10 trying to search of window */
for (i=0; i<10; i++){