summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/images/about.pngbin61171 -> 0 bytes
-rw-r--r--src/events.c84
-rw-r--r--src/menu.c34
-rw-r--r--src/menu.h2
-rw-r--r--src/winwidget.c10
-rw-r--r--src/winwidget.h1
6 files changed, 36 insertions, 95 deletions
diff --git a/share/images/about.png b/share/images/about.png
deleted file mode 100644
index 5aaaf17..0000000
--- a/share/images/about.png
+++ /dev/null
Binary files differ
diff --git a/src/events.c b/src/events.c
index a850137..7c56b96 100644
--- a/src/events.c
+++ b/src/events.c
@@ -510,57 +510,41 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
} else {
while (XCheckTypedWindowEvent(disp, ev->xmotion.window, MotionNotify, ev));
winwid = winwidget_get_from_window(ev->xmotion.window);
- if (winwid != NULL) {
- if (winwid->type == WIN_TYPE_ABOUT) {
- Imlib_Image orig_im;
- int x, y;
-
- x = ev->xmotion.x - winwid->im_x;
- y = ev->xmotion.y - winwid->im_y;
- orig_im = winwid->im;
- winwid->im = gib_imlib_clone_image(orig_im);
- imlib_context_set_image(winwid->im);
- imlib_apply_filter("bump_map_point(x=[],y=[],map="
- PREFIX "/share/feh/images/about.png);", &x, &y);
- winwidget_render_image(winwid, 0, 0);
- gib_imlib_free_image_and_decache(winwid->im);
- winwid->im = orig_im;
- } else if (winwid->type == WIN_TYPE_THUMBNAIL) {
- static feh_thumbnail *last_thumb = NULL;
- feh_thumbnail *thumbnail;
- int x, y;
-
- x = (ev->xbutton.x - winwid->im_x) / winwid->zoom;
- y = (ev->xbutton.y - winwid->im_y) / winwid->zoom;
- thumbnail = feh_thumbnail_get_thumbnail_from_coords(x, y);
- if (thumbnail != last_thumb) {
- if (thumbnail) {
- Imlib_Image origwin;
-
- origwin = winwid->im;
- winwid->im = gib_imlib_clone_image(origwin);
- gib_imlib_image_fill_rectangle(winwid->im,
- thumbnail->x, thumbnail->y, thumbnail->w,
- thumbnail->h, 50, 50, 255, 100);
- gib_imlib_image_draw_rectangle(winwid->im,
- thumbnail->x, thumbnail->y, thumbnail->w,
- thumbnail->h, 255, 255, 255, 255);
- gib_imlib_image_draw_rectangle(winwid->im,
- thumbnail->x + 1, thumbnail->y + 1,
- thumbnail->w - 2, thumbnail->h - 2,
- 0, 0, 0, 255);
- gib_imlib_image_draw_rectangle(winwid->im,
- thumbnail->x + 2, thumbnail->y + 2,
- thumbnail->w - 4, thumbnail->h - 4,
- 255, 255, 255, 255);
- winwidget_render_image(winwid, 0, 0);
- gib_imlib_free_image_and_decache(winwid->im);
- winwid->im = origwin;
- } else
- winwidget_render_image(winwid, 0, 0);
- }
- last_thumb = thumbnail;
+ if ((winwid != NULL) && (winwid->type == WIN_TYPE_THUMBNAIL)) {
+ static feh_thumbnail *last_thumb = NULL;
+ feh_thumbnail *thumbnail;
+ int x, y;
+
+ x = (ev->xbutton.x - winwid->im_x) / winwid->zoom;
+ y = (ev->xbutton.y - winwid->im_y) / winwid->zoom;
+ thumbnail = feh_thumbnail_get_thumbnail_from_coords(x, y);
+ if (thumbnail != last_thumb) {
+ if (thumbnail) {
+ Imlib_Image origwin;
+
+ origwin = winwid->im;
+ winwid->im = gib_imlib_clone_image(origwin);
+ gib_imlib_image_fill_rectangle(winwid->im,
+ thumbnail->x, thumbnail->y, thumbnail->w,
+ thumbnail->h, 50, 50, 255, 100);
+ gib_imlib_image_draw_rectangle(winwid->im,
+ thumbnail->x, thumbnail->y, thumbnail->w,
+ thumbnail->h, 255, 255, 255, 255);
+ gib_imlib_image_draw_rectangle(winwid->im,
+ thumbnail->x + 1, thumbnail->y + 1,
+ thumbnail->w - 2, thumbnail->h - 2,
+ 0, 0, 0, 255);
+ gib_imlib_image_draw_rectangle(winwid->im,
+ thumbnail->x + 2, thumbnail->y + 2,
+ thumbnail->w - 4, thumbnail->h - 4,
+ 255, 255, 255, 255);
+ winwidget_render_image(winwid, 0, 0);
+ gib_imlib_free_image_and_decache(winwid->im);
+ winwid->im = origwin;
+ } else
+ winwidget_render_image(winwid, 0, 0);
}
+ last_thumb = thumbnail;
}
}
return;
diff --git a/src/menu.c b/src/menu.c
index f12f4ed..943b65a 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -35,7 +35,6 @@ Window menu_cover = 0;
feh_menu *menu_root = NULL;
feh_menu *menu_main = NULL;
feh_menu *menu_single_win = NULL;
-feh_menu *menu_about_win = NULL;
feh_menu *menu_thumbnail_viewer = NULL;
feh_menu *menu_thumbnail_win = NULL;
feh_menu *menu_bg = NULL;
@@ -50,7 +49,7 @@ void feh_menu_cb(feh_menu * m, feh_menu_item * i, int action, void *data);
void feh_menu_cb_opt_fullscreen(feh_menu * m, feh_menu_item * i);
enum {
- CB_ABOUT = 1, CB_CLOSE, CB_EXIT, CB_RELOAD, CB_REMOVE, CB_DELETE, CB_RESET,
+ CB_CLOSE = 1, CB_EXIT, CB_RELOAD, CB_REMOVE, CB_DELETE, CB_RESET,
CB_REMOVE_THUMB, CB_DELETE_THUMB, CB_BG_TILED, CB_BG_SCALED,
CB_BG_CENTERED, CB_BG_FILLED, CB_BG_TILED_NOFILE,
CB_BG_SCALED_NOFILE, CB_BG_CENTERED_NOFILE, CB_BG_FILLED_NOFILE,
@@ -955,8 +954,6 @@ void feh_menu_init_main(void)
mi = feh_menu_add_entry(menu_main, "Options", NULL, "OPTIONS", 0, NULL, NULL);
mi->func_gen_sub = feh_menu_func_gen_options;
- if (!opt.full_screen)
- feh_menu_add_entry(menu_main, "About " PACKAGE, NULL, NULL, CB_ABOUT, NULL, NULL);
if (opt.multiwindow)
feh_menu_add_entry(menu_main, "Close", NULL, NULL, CB_CLOSE, NULL, NULL);
feh_menu_add_entry(menu_main, "Exit", NULL, NULL, CB_EXIT, NULL, NULL);
@@ -1104,17 +1101,6 @@ void feh_menu_init_common()
return;
}
-void feh_menu_init_about_win(void)
-{
- menu_about_win = feh_menu_new();
- menu_about_win->name = estrdup("ABOUTWIN");
-
- feh_menu_add_entry(menu_about_win, "Close", NULL, NULL, CB_CLOSE, NULL, NULL);
- feh_menu_add_entry(menu_about_win, "Exit", NULL, NULL, CB_EXIT, NULL, NULL);
-
- return;
-}
-
void feh_menu_init_single_win(void)
{
feh_menu *m;
@@ -1147,8 +1133,6 @@ void feh_menu_init_single_win(void)
feh_menu_add_entry(menu_single_win, NULL, NULL, NULL, 0, NULL, NULL);
mi = feh_menu_add_entry(menu_single_win, "Options", NULL, "OPTIONS", 0, NULL, NULL);
mi->func_gen_sub = feh_menu_func_gen_options;
- feh_menu_add_entry(menu_single_win, "About " PACKAGE, NULL, NULL,
- CB_ABOUT, NULL, NULL);
feh_menu_add_entry(menu_single_win, "Close", NULL, NULL, CB_CLOSE, NULL, NULL);
feh_menu_add_entry(menu_single_win, "Exit", NULL, NULL, CB_EXIT, NULL, NULL);
@@ -1177,8 +1161,6 @@ void feh_menu_init_thumbnail_win(void)
feh_menu_add_entry(menu_thumbnail_win, NULL, NULL, NULL, 0, NULL, NULL);
mi = feh_menu_add_entry(menu_thumbnail_win, "Options", NULL, "OPTIONS", 0, NULL, NULL);
mi->func_gen_sub = feh_menu_func_gen_options;
- feh_menu_add_entry(menu_thumbnail_win, "About " PACKAGE, NULL, NULL,
- CB_ABOUT, NULL, NULL);
feh_menu_add_entry(menu_thumbnail_win, "Close", NULL, NULL, CB_CLOSE, NULL, NULL);
feh_menu_add_entry(menu_thumbnail_win, "Exit", NULL, NULL, CB_EXIT, NULL, NULL);
return;
@@ -1216,8 +1198,6 @@ void feh_menu_init_thumbnail_viewer(void)
mi = feh_menu_add_entry(menu_thumbnail_viewer, "Options", NULL,
"OPTIONS", 0, NULL, NULL);
mi->func_gen_sub = feh_menu_func_gen_options;
- feh_menu_add_entry(menu_thumbnail_viewer, "About " PACKAGE, NULL, NULL,
- CB_ABOUT, NULL, NULL);
feh_menu_add_entry(menu_thumbnail_viewer, "Close", NULL, NULL, CB_CLOSE, NULL, NULL);
feh_menu_add_entry(menu_thumbnail_viewer, "Exit", NULL, NULL, CB_EXIT, NULL, NULL);
m = feh_menu_new();
@@ -1284,8 +1264,6 @@ void feh_menu_cb_opt_fullscreen(feh_menu * m, feh_menu_item * i)
void feh_menu_cb(feh_menu * m, feh_menu_item * i, int action, void *data)
{
char *path;
- Imlib_Image im;
- winwidget winwid;
switch (action) {
case CB_BG_TILED:
@@ -1320,16 +1298,6 @@ void feh_menu_cb(feh_menu * m, feh_menu_item * i, int action, void *data)
case CB_BG_FILLED_NOFILE:
feh_wm_set_bg(NULL, m->fehwin->im, 0, 0, 1, (int) data, 1);
break;
- case CB_ABOUT:
- if (feh_load_image_char(&im, PREFIX "/share/feh/images/about.png")
- != 0) {
- winwid = winwidget_create_from_image(im, "About " PACKAGE,
- WIN_TYPE_ABOUT);
- winwid->file = gib_list_add_front(NULL,
- feh_file_new(PREFIX "/share/feh/images/about.png"));
- winwidget_show(winwid);
- }
- break;
case CB_CLOSE:
winwidget_destroy(m->fehwin);
break;
diff --git a/src/menu.h b/src/menu.h
index 9056d98..576ead7 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -144,7 +144,6 @@ void feh_menu_move(feh_menu * m, int x, int y);
void feh_menu_slide_all_menus_relative(int dx, int dy);
void feh_menu_init_main(void);
void feh_menu_init_single_win(void);
-void feh_menu_init_about_win(void);
void feh_menu_init_common(void);
void feh_menu_init_thumbnail_viewer(void);
void feh_menu_init_thumbnail_win(void);
@@ -169,7 +168,6 @@ void feh_menu_select_submenu(feh_menu * selected_menu);
extern feh_menu *menu_root;
extern feh_menu *menu_single_win;
-extern feh_menu *menu_about_win;
extern feh_menu *menu_thumbnail_viewer;
extern feh_menu *menu_thumbnail_win;
extern Window menu_cover;
diff --git a/src/winwidget.c b/src/winwidget.c
index a39e8ef..047deb7 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -676,10 +676,6 @@ void winwidget_destroy(winwidget winwid)
winwidget_destroy_xwin(winwid);
if (winwid->name)
free(winwid->name);
- if ((winwid->type == WIN_TYPE_ABOUT) && winwid->file) {
- feh_file_free(FEH_FILE(winwid->file->data));
- free(winwid->file);
- }
if (winwid->gc)
XFreeGC(disp, winwid->gc);
if (winwid->im)
@@ -1058,11 +1054,7 @@ void winwidget_show_menu(winwidget winwid)
Window r;
XQueryPointer(disp, winwid->win, &r, &r, &x, &y, &b, &b, &c);
- if (winwid->type == WIN_TYPE_ABOUT) {
- if (!menu_about_win)
- feh_menu_init_about_win();
- feh_menu_show_at_xy(menu_about_win, winwid, x, y);
- } else if (winwid->type == WIN_TYPE_SINGLE) {
+ if (winwid->type == WIN_TYPE_SINGLE) {
if (!menu_single_win)
feh_menu_init_single_win();
feh_menu_show_at_xy(menu_single_win, winwid, x, y);
diff --git a/src/winwidget.h b/src/winwidget.h
index 922ecf5..3af997a 100644
--- a/src/winwidget.h
+++ b/src/winwidget.h
@@ -70,7 +70,6 @@ typedef struct _mwmhints {
enum win_type {
WIN_TYPE_UNSET, WIN_TYPE_SLIDESHOW, WIN_TYPE_SINGLE,
- WIN_TYPE_ABOUT,
WIN_TYPE_THUMBNAIL, WIN_TYPE_THUMBNAIL_VIEWER
};