Skip to content

Commit

Permalink
started on action links (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrilbyWhite committed Apr 15, 2013
1 parent 8e33c29 commit 51abe7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.h
Expand Up @@ -19,7 +19,7 @@ static const char colors[][9] = {
#define EMPTY_RECT "10 1.0, 1.0, 1.0 0.5"
#define ZOOM_RECT "10 0.0, 0.8, 1.0 0.8"
#define OVERVIEW_RECT "10 1.0, 1.0, 0.0 0.6"
#define ACTION_RECT "4 0.0, 0.2, 1.0 0.3"
#define ACTION_RECT "2 0.0, 0.2, 1.0 0.3"
#define ACTION_FONT "15 0.0, 0.4, 1.0 1.0"

static Key keys[] = {
Expand Down
5 changes: 3 additions & 2 deletions slider.c
Expand Up @@ -83,6 +83,7 @@ static void (*handler[LASTEvent])(XEvent *) = {
};

void action(const char *arg) {
if (mode & OVERVIEW) return;
if (!(show->flag[show->count-1] & RENDERED)) { warn(); return; }
/* create cairo contexts */
int w; double R,G,B,A; char sym[2] = "x";
Expand Down Expand Up @@ -141,11 +142,11 @@ void action(const char *arg) {
PopplerActionGotoDest *a = &act->goto_dest;
if (a->dest->type == POPPLER_DEST_NAMED) {
PopplerDest *d = poppler_document_find_dest(pdf,a->dest->named_dest);
show->cur = d->page_num;
show->cur = d->page_num - 1;
poppler_dest_free(d);
}
else {
show->cur = a->dest->page_num;
show->cur = a->dest->page_num - 1;
}
draw(NULL);
}
Expand Down

0 comments on commit 51abe7e

Please sign in to comment.