summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Williams <pfaedit@users.sourceforge.net>2011-02-18 10:19:52 -0800
committerGeorge Williams <pfaedit@users.sourceforge.net>2011-02-18 10:19:52 -0800
commitbb88226b698486910f0eeb84b66b42ea9cc95356 (patch)
tree87cba203f39d5322febaac856c561c6d271a2c5b
parent81dd0e7e914a38bcb831c7b77a45413d6f1d231b (diff)
Richard Gitschlag and Khaled complain that the Glyph Info dlg says "Done" rather than "Cancel".
There is a reason for this. The button does not do a cancel. It only cancels changes to the current glyph, but the dlg can be applied to several glyphs one after another, and any changes made to previous glyphs are committed when the user changes glyphs. So the "Done" button only cancels the current glyph. However, I can change it so that it says "Cancel" until the user changes glyphs. And in most cases the user is only interested in one glyph so this will solve most of the problem... I hope.
-rw-r--r--fontforge/charinfo.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fontforge/charinfo.c b/fontforge/charinfo.c
index d30b790f..a4b308a8 100644
--- a/fontforge/charinfo.c
+++ b/fontforge/charinfo.c
@@ -49,6 +49,7 @@ typedef struct charinfo {
int r,c;
int lc_seen, lc_aspect, vert_aspect;
Color last, real_last;
+ int cancel_is_done;
} CharInfo;
#define CI_Width 218
@@ -3882,6 +3883,10 @@ return( true );
}
ci->sc = new;
ci->enc = enc;
+ if ( !ci->cancel_is_done ) {
+ ci->cancel_is_done = true;
+ GGadgetSetTitle8WithMn(GWidgetGetControl(ci->gw,CID_Cancel),_("_Done"));
+ }
CIFillup(ci);
}
return( true );
@@ -4843,11 +4848,10 @@ return;
mgcd[4].gd.pos.x = -25; mgcd[4].gd.pos.y = mgcd[3].gd.pos.y+3;
mgcd[4].gd.flags = gg_visible | gg_enabled | gg_but_cancel;
- mlabel[4].text = (unichar_t *) _("_Done");
+ mlabel[4].text = (unichar_t *) _("_Cancel");
mlabel[4].text_is_1byte = true;
mlabel[4].text_in_resource = true;
mgcd[4].gd.label = &mlabel[4];
- mgcd[4].gd.mnemonic = 'C';
mgcd[4].gd.handle_controlevent = CI_Cancel;
mgcd[4].gd.cid = CID_Cancel;
mharray2[4] = GCD_Glue; mharray2[5] = &mgcd[4]; mharray2[6] = GCD_Glue; mharray2[7] = NULL;