~ubuntu-branches/debian/sid/feh/sid

« back to all changes in this revision

Viewing changes to src/keyevents.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Tille
  • Date: 2011-10-11 14:44:42 UTC
  • mfrom: (1.3.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20111011144442-ekq8fa2huypnswm3
Tags: 2.0-1
New upstream version
Closes: #475481

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
 
155
155
        home = getenv("HOME");
156
156
        if (!home)
157
 
                eprintf("No HOME in environment\n");
 
157
                eprintf("No HOME in environment");
158
158
 
159
159
        confhome = getenv("XDG_CONFIG_HOME");
160
160
 
345
345
                                feh_reload_image(winwid, 1, 1);
346
346
                        else
347
347
                                winwidget_destroy(winwid);
348
 
                } else if (winwid->type == WIN_TYPE_THUMBNAIL)
349
 
                        fputs("actions from the main thumb window aren't currently supported!\n"
350
 
                                        "For now, open the image to perform the action on it.\n",
351
 
                                        stdout);
 
348
                } else if (winwid->type == WIN_TYPE_THUMBNAIL) {
 
349
                        feh_file *thumbfile;
 
350
                        thumbfile = feh_thumbnail_get_selected_file();
 
351
 
 
352
                        if (thumbfile) {
 
353
                                feh_action_run(thumbfile, opt.actions[action]);
 
354
 
 
355
                                if (!opt.hold_actions[action])
 
356
                                        feh_thumbnail_mark_removed(thumbfile, 0);
 
357
                        }
 
358
                }
352
359
        }
353
360
        return;
354
361
}
561
568
        else if (feh_is_kp(&keys.zoom_in, keysym, state)) {
562
569
                winwid->old_zoom = winwid->zoom;
563
570
                winwid->zoom = winwid->zoom * 1.25;
 
571
 
 
572
                if (winwid->zoom > ZOOM_MAX)
 
573
                        winwid->zoom = ZOOM_MAX;
 
574
 
564
575
                winwid->im_x = (winwid->w / 2) - (((winwid->w / 2) - winwid->im_x) /
565
576
                        winwid->old_zoom * winwid->zoom);
566
577
                winwid->im_y = (winwid->h / 2) - (((winwid->h / 2) - winwid->im_y) /
571
582
        else if (feh_is_kp(&keys.zoom_out, keysym, state)) {
572
583
                winwid->old_zoom = winwid->zoom;
573
584
                winwid->zoom = winwid->zoom * 0.80;
 
585
 
 
586
                if (winwid->zoom < ZOOM_MIN)
 
587
                        winwid->zoom = ZOOM_MIN;
 
588
 
574
589
                winwid->im_x = (winwid->w / 2) - (((winwid->w / 2) - winwid->im_x) /
575
590
                        winwid->old_zoom * winwid->zoom);
576
591
                winwid->im_y = (winwid->h / 2) - (((winwid->h / 2) - winwid->im_y) /