*** Programming/further/plugins/launcher/launcher.c Fri Jan 25 12:26:46 2002 --- cvs/further/plugins/launcher/launcher.c Fri Nov 2 01:33:06 2001 *************** *** 8,14 **** #include #include ! int pixmap_size; static char *plugin_name = "Launcher"; static Plugin *plugin; --- 8,14 ---- #include #include ! #define PIXMAP_SIZE 48 static char *plugin_name = "Launcher"; static Plugin *plugin; *************** *** 37,58 **** static void mouse_down(void *data, Evas e, Evas_Object o, int b, int x, int y) { evas_set_color(evas, o, 255, 255, 255, 255); ! zoom(o, pixmap_size*0.8, pixmap_size*0.8); } static void mouse_up(void *data, Evas e, Evas_Object o, int b, int x, int y) { if (b == 1) furtherp_fork_exec(data); ! zoom(o, pixmap_size, pixmap_size); } Evas_Object add_icon(char *command, char *imagepath, int x, int y) { Evas_Object o; o = evas_add_image_from_file(evas, imagepath); evas_set_color(evas, o, 255, 255, 255, 128); ! zoom(o, pixmap_size, pixmap_size); /* some pixmaps aren't the size we expect initially */ ! evas_move(evas, o, x, y); /* zoom before you do this */ evas_show(evas, o); evas_callback_add(evas, o, CALLBACK_MOUSE_IN, mouse_in, NULL); evas_callback_add(evas, o, CALLBACK_MOUSE_OUT, mouse_out, NULL); --- 37,57 ---- static void mouse_down(void *data, Evas e, Evas_Object o, int b, int x, int y) { evas_set_color(evas, o, 255, 255, 255, 255); ! zoom(o, 44, 44); } static void mouse_up(void *data, Evas e, Evas_Object o, int b, int x, int y) { if (b == 1) furtherp_fork_exec(data); ! zoom(o, 48, 48); } Evas_Object add_icon(char *command, char *imagepath, int x, int y) { Evas_Object o; o = evas_add_image_from_file(evas, imagepath); evas_set_color(evas, o, 255, 255, 255, 128); ! evas_move(evas, o, x, y); evas_show(evas, o); evas_callback_add(evas, o, CALLBACK_MOUSE_IN, mouse_in, NULL); evas_callback_add(evas, o, CALLBACK_MOUSE_OUT, mouse_out, NULL); *************** *** 77,86 **** char exec[1024], path[1024]; int x = 0; - int pixmap_spacing; - - pixmap_spacing = plugin_read_float("icon_spacing"); - if (pixmap_spacing == 0) pixmap_spacing=5; if ((f = fopen(plugin_read_string("rc"), "r")) == NULL) { perror("fopen"); --- 76,81 ---- *************** *** 92,98 **** remove_trailing_newline(path); if (exec[0] != 0 && path[0] != 0) { add_icon(exec, path, plugin->x+x, plugin->y); ! x += pixmap_size + pixmap_spacing; } } } --- 87,93 ---- remove_trailing_newline(path); if (exec[0] != 0 && path[0] != 0) { add_icon(exec, path, plugin->x+x, plugin->y); ! x += PIXMAP_SIZE + 5; } } } *************** *** 100,111 **** void further_init(Plugin *_plugin) { plugin = _plugin; plugin->name = plugin_name; ! ! pixmap_size = plugin_read_float("icon_size"); ! if (pixmap_size == 0) pixmap_size=48; ! printf("pixmap_size %i\n", pixmap_size); ! if (plugin->y < 0) plugin->y += dpy_height - pixmap_size + 1; load_launcherrc(); - } --- 95,101 ---- void further_init(Plugin *_plugin) { plugin = _plugin; plugin->name = plugin_name; ! if (plugin->y == -1) plugin->y = dpy_height - PIXMAP_SIZE; load_launcherrc(); }