Skip to content

Commit 4934c0a

Browse files
committed
minor GUI calculator fix
1 parent c0b252f commit 4934c0a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

gui/calculator.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -2127,6 +2127,8 @@ static int get_restriction_vxy (const char *s, int *vx, int *vy,
21272127
char *str = g_strdup(s);
21282128
int err = 0;
21292129

2130+
/* FIXME : use genr here */
2131+
21302132
if (str == NULL) {
21312133
return 1;
21322134
}
@@ -2194,7 +2196,12 @@ static int get_restriction_vxy (const char *s, int *vx, int *vy,
21942196
}
21952197

21962198
if (!err) {
2197-
if (sscanf(q, "%lf", yval) != 1) {
2199+
q += strspn(q, " ");
2200+
if (!strncmp(q, "TRUE", 4)) {
2201+
*yval = 1;
2202+
} else if (!strncmp(q, "FALSE", 5)) {
2203+
*yval = 0;
2204+
} else if (sscanf(q, "%lf", yval) != 1) {
21982205
err = 1;
21992206
}
22002207
}

gui/viewers.c

+2
Original file line numberDiff line numberDiff line change
@@ -1735,6 +1735,8 @@ windata_t *view_formatted_text_buffer (const gchar *title,
17351735

17361736
if (role == VIEW_BIBITEM) {
17371737
add_text_closer(vwin);
1738+
} else {
1739+
//vwin_add_finder(vwin);
17381740
}
17391741

17401742
gtk_widget_show(vwin->vbox);

0 commit comments

Comments
 (0)