Wed Nov 10 15:49:40 PST 1999

(KainX)

E-Mountbox is now size-matched with everything else, and the help/config/close
buttons appear and disappear just like the other epplets.  Consistency is a
good thing. :-)  Also, E-Xss won't show/hide the drawing area any more when
it gains/loses focus.


SVN revision: 1243
This commit is contained in:
Michael Jennings 1999-11-10 23:51:50 +00:00
parent 811247cb78
commit c43022a9b3
4 changed files with 46 additions and 16 deletions

View File

@ -337,3 +337,13 @@ Wed Nov 10 14:54:28 PST 1999
removed EppletTest and EppletConfigTest from install procedure. no need for removed EppletTest and EppletConfigTest from install procedure. no need for
those to be automagically installed. those to be automagically installed.
-------------------------------------------------------------------------------
Wed Nov 10 15:49:40 PST 1999
(KainX)
E-Mountbox is now size-matched with everything else, and the help/config/close
buttons appear and disappear just like the other epplets. Consistency is a
good thing. :-) Also, E-Xss won't show/hide the drawing area any more when
it gains/loses focus.

View File

@ -655,6 +655,28 @@ CallbackExpose(void *data, Window win, int x, int y, int w, int h)
win = x = y = w = h = 0; win = x = y = w = h = 0;
} }
static void
in_cb(void *data, Window w) {
Epplet_gadget_show(button_help);
Epplet_gadget_show(button_config);
Epplet_gadget_show(button_close);
return;
data = NULL;
w = (Window) 0;
}
static void
out_cb(void *data, Window w) {
Epplet_gadget_hide(button_help);
Epplet_gadget_hide(button_config);
Epplet_gadget_hide(button_close);
return;
data = NULL;
w = (Window) 0;
}
void void
SetupDefaults(void) SetupDefaults(void)
@ -677,7 +699,7 @@ SetupGraphx(void)
ImlibBorder border; ImlibBorder border;
Tile *tile; Tile *tile;
id = Imlib_init(Epplet_get_display()); id = Epplet_get_imlib_data();
/* load all images, scaled appropriately */ /* load all images, scaled appropriately */
memset(images, 0, MAXTYPE * sizeof(ImlibImage*)); memset(images, 0, MAXTYPE * sizeof(ImlibImage*));
@ -799,17 +821,13 @@ SetupGraphx(void)
Epplet_gadget_show((button_right = Epplet_create_button(NULL, NULL, Epplet_gadget_show((button_right = Epplet_create_button(NULL, NULL,
33, 34, 0, 0, "ARROW_RIGHT", 0, NULL, 33, 34, 0, 0, "ARROW_RIGHT", 0, NULL,
CallbackSlideRight, NULL))); CallbackSlideRight, NULL)));
Epplet_gadget_show((button_right = Epplet_create_button(NULL, NULL,
2, 48, 0, 0, "HELP", 0, NULL,
CallbackHelp, NULL)));
Epplet_gadget_show((button_right = Epplet_create_button(NULL, NULL,
33, 48, 0, 0, "CLOSE", 0, NULL,
CallbackExit, NULL)));
Epplet_gadget_show((button_right = Epplet_create_button(NULL, NULL,
17, 48, 0, 0, "CONFIGURE", 0, NULL,
CallbackConfigure, NULL)));
Epplet_gadget_show((action_area = Epplet_create_drawingarea(2, 2, 44, 32))); Epplet_gadget_show((action_area = Epplet_create_drawingarea(2, 2, 44, 32)));
button_help = Epplet_create_button(NULL, NULL, 3, 3, 0, 0, "HELP", 0, NULL, CallbackHelp, NULL);
button_close = Epplet_create_button(NULL, NULL, 33, 3, 0, 0, "CLOSE", 0, NULL, CallbackExit, NULL);
button_config = Epplet_create_button(NULL, NULL, 18, 3, 0, 0, "CONFIGURE", 0, NULL, CallbackConfigure, NULL);
Epplet_register_focus_in_handler(in_cb, NULL);
Epplet_register_focus_out_handler(out_cb, NULL);
Epplet_register_expose_handler(CallbackExpose, NULL); Epplet_register_expose_handler(CallbackExpose, NULL);
Epplet_register_button_release_handler(CallbackButtonUp, NULL); Epplet_register_button_release_handler(CallbackButtonUp, NULL);
@ -823,7 +841,7 @@ int
main(int argc, char** argv) main(int argc, char** argv)
{ {
Epplet_Init("E-Mountbox", "0.1", "Enlightenment Mount Epplet", Epplet_Init("E-Mountbox", "0.1", "Enlightenment Mount Epplet",
3, 4, argc, argv, 0); 3, 3, argc, argv, 0);
Epplet_load_config(); Epplet_load_config();
SetupDefaults(); SetupDefaults();

View File

@ -51,7 +51,7 @@ int current_tile_index = 0;
int num_tiles = 0; int num_tiles = 0;
ImlibData *id = NULL; ImlibData *id = NULL;
ImlibImage *images[5]; ImlibImage *images[5];
Epplet_gadget action_area, button_left, button_right; Epplet_gadget action_area, button_left, button_right, button_close, button_config, button_help;
RGB_buf window_buf; RGB_buf window_buf;
RGB_buf widescreen_buf; RGB_buf widescreen_buf;
RGB_buf widescreen_canvas_buf; RGB_buf widescreen_canvas_buf;
@ -77,6 +77,8 @@ void VisitMountPoints(void);
MountPoint *FindMountPointByClick(int x, int y); MountPoint *FindMountPointByClick(int x, int y);
/* callbacks/ handlers */ /* callbacks/ handlers */
static void in_cb(void *data, Window w);
static void out_cb(void *data, Window w);
static void CallbackExpose(void *data, Window win, int x, int y, int w, int h); static void CallbackExpose(void *data, Window win, int x, int y, int w, int h);
static void CallbackButtonUp(void *data, Window win, int x, int y, int b); static void CallbackButtonUp(void *data, Window win, int x, int y, int b);
static void CallbackExit(void *data); static void CallbackExit(void *data);

View File

@ -123,7 +123,7 @@ play_cb(void *data) {
static void static void
in_cb(void *data, Window w) { in_cb(void *data, Window w) {
Epplet_gadget_hide(draw_area); /*Epplet_gadget_hide(draw_area);*/
Epplet_gadget_show(close_button); Epplet_gadget_show(close_button);
Epplet_gadget_show(zoom_button); Epplet_gadget_show(zoom_button);
Epplet_gadget_show(prev_button); Epplet_gadget_show(prev_button);
@ -136,7 +136,7 @@ in_cb(void *data, Window w) {
static void static void
out_cb(void *data, Window w) { out_cb(void *data, Window w) {
Epplet_gadget_show(draw_area); /*Epplet_gadget_show(draw_area);*/
Epplet_gadget_hide(close_button); Epplet_gadget_hide(close_button);
Epplet_gadget_hide(zoom_button); Epplet_gadget_hide(zoom_button);
Epplet_gadget_hide(prev_button); Epplet_gadget_hide(prev_button);
@ -202,14 +202,14 @@ main(int argc, char **argv) {
Epplet_load_config(); Epplet_load_config();
parse_config(); parse_config();
draw_area = Epplet_create_drawingarea(3, 3, 43, 43);
Epplet_gadget_show(draw_area);
close_button = Epplet_create_button(NULL, NULL, 3, 3, 0, 0, "CLOSE", 0, NULL, close_cb, NULL); close_button = Epplet_create_button(NULL, NULL, 3, 3, 0, 0, "CLOSE", 0, NULL, close_cb, NULL);
zoom_button = Epplet_create_button(NULL, NULL, 33, 3, 0, 0, "EJECT", 0, NULL, zoom_cb, NULL); zoom_button = Epplet_create_button(NULL, NULL, 33, 3, 0, 0, "EJECT", 0, NULL, zoom_cb, NULL);
prev_button = Epplet_create_button(NULL, NULL, 3, 33, 0, 0, "PREVIOUS", 0, NULL, play_cb, (void *) (-1)); prev_button = Epplet_create_button(NULL, NULL, 3, 33, 0, 0, "PREVIOUS", 0, NULL, play_cb, (void *) (-1));
next_button = Epplet_create_button(NULL, NULL, 33, 33, 0, 0, "NEXT", 0, NULL, play_cb, (void *) (1)); next_button = Epplet_create_button(NULL, NULL, 33, 33, 0, 0, "NEXT", 0, NULL, play_cb, (void *) (1));
Epplet_gadget_show(prev_button); Epplet_gadget_show(prev_button);
Epplet_gadget_show(next_button); Epplet_gadget_show(next_button);
draw_area = Epplet_create_drawingarea(3, 3, 43, 43);
Epplet_gadget_show(draw_area);
Epplet_show(); Epplet_show();
Epplet_register_focus_in_handler(in_cb, NULL); Epplet_register_focus_in_handler(in_cb, NULL);