- if (!fd_form_url) {
- fd_form_url = create_form_form_url();
- fd_form_url->button_close->u_vdata = this;
- fl_set_form_atclose(fd_form_url->form_url,
- CancelCloseBoxCB, 0);
- }
- fl_set_input(fd_form_url->url_name, getContents().c_str());
- fl_set_input(fd_form_url->name_name, getOptions().c_str());
- switch(flag) {
- case InsetUrl::URL:
- fl_set_button(fd_form_url->radio_html, 0);
- break;
- case InsetUrl::HTML_URL:
- fl_set_button(fd_form_url->radio_html, 1);
- break;
- }
-
- if (fd_form_url->form_url->visible) {
- fl_raise_form(fd_form_url->form_url);
- } else {
- fl_show_form(fd_form_url->form_url,
- FL_PLACE_MOUSE | FL_FREE_SIZE,
- FL_FULLBORDER, _("Insert Url"));
- if (ow < 0) {
- ow = fd_form_url->form_url->w;
- oh = fd_form_url->form_url->h;
- }
- fl_set_form_minsize(fd_form_url->form_url, ow, oh);
+ // elide if long
+ if (url.length() > 30) {
+ url = url.substr(0, 10) + "..."
+ + url.substr(url.length() - 17, url.length());