imap_edit_area_info.c 16.2 KB
Newer Older
Sven Neumann's avatar
Sven Neumann committed
1
/*
2
 * This is a plug-in for GIMP.
Sven Neumann's avatar
Sven Neumann committed
3 4 5
 *
 * Generates clickable image maps.
 *
6
 * Copyright (C) 1998-2005 Maurits Rijk  m.rijk@chello.nl
Sven Neumann's avatar
Sven Neumann committed
7
 *
8
 * This program is free software: you can redistribute it and/or modify
Sven Neumann's avatar
Sven Neumann committed
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation; either version 3 of the License, or
Sven Neumann's avatar
Sven Neumann committed
11 12 13 14 15 16 17 18
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
19
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
Sven Neumann's avatar
Sven Neumann committed
20 21 22
 *
 */

23 24
#include "config.h"

Sven Neumann's avatar
Sven Neumann committed
25 26 27
#include <stdio.h>
#include <string.h>

28 29
#include "libgimp/gimp.h"
#include "libgimp/gimpui.h"
30

Sven Neumann's avatar
Sven Neumann committed
31
#include "imap_browse.h"
32
#include "imap_commands.h"
Sven Neumann's avatar
Sven Neumann committed
33 34 35
#include "imap_default_dialog.h"
#include "imap_edit_area_info.h"
#include "imap_main.h"
36
#include "imap_stock.h"
37
#include "imap_ui_grid.h"
Sven Neumann's avatar
Sven Neumann committed
38

39 40
#include "libgimp/stdplugins-intl.h"

41
static gboolean callback_lock;
Sven Neumann's avatar
Sven Neumann committed
42 43


44
static gchar*
Sven Neumann's avatar
Sven Neumann committed
45 46 47 48
relative_filter(const char *name, gpointer data)
{
   AreaInfoDialog_t *param = (AreaInfoDialog_t*) data;
   if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(param->relative_link)))
49 50
      return g_path_get_basename(name);
   return g_strdup (name);
Sven Neumann's avatar
Sven Neumann committed
51 52 53 54 55 56
}

static void
url_changed(GtkWidget *widget, gpointer data)
{
   AreaInfoDialog_t *param = (AreaInfoDialog_t*) data;
57
   const gchar *url = gtk_entry_get_text(GTK_ENTRY(param->url));
Sven Neumann's avatar
Sven Neumann committed
58 59
   GtkWidget *button;

60
   if (!g_ascii_strncasecmp(url, "http://", sizeof("http://") - 1))
Sven Neumann's avatar
Sven Neumann committed
61
      button = param->web_site;
62
   else if (!g_ascii_strncasecmp(url, "ftp://", sizeof("ftp://") - 1))
Sven Neumann's avatar
Sven Neumann committed
63
      button = param->ftp_site;
64
   else if (!g_ascii_strncasecmp(url, "gopher://", sizeof("gopher://") - 1))
Sven Neumann's avatar
Sven Neumann committed
65
      button = param->gopher;
66
   else if (!g_ascii_strncasecmp(url, "file:/", sizeof("file:/") - 1))
Sven Neumann's avatar
Sven Neumann committed
67
      button = param->file;
68
   else if (!g_ascii_strncasecmp(url, "wais://", sizeof("wais://") - 1))
Sven Neumann's avatar
Sven Neumann committed
69
      button = param->wais;
70
   else if (!g_ascii_strncasecmp(url, "telnet://", sizeof("telnet://") - 1))
Sven Neumann's avatar
Sven Neumann committed
71
      button = param->telnet;
72
   else if (!g_ascii_strncasecmp(url, "mailto:", sizeof("mailto:") - 1))
Sven Neumann's avatar
Sven Neumann committed
73 74 75 76 77 78 79 80 81 82 83
      button = param->email;
   else
      button = param->other;

   callback_lock = TRUE;
   gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
}

static void
set_url(GtkWidget *widget, AreaInfoDialog_t *param, const gchar *prefix)
{
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
   if (callback_lock)
     {
       callback_lock = FALSE;
     }
   else
     {
       if (gtk_widget_get_state (widget) & GTK_STATE_SELECTED)
         {
           char *p;
           gchar *url = g_strdup(gtk_entry_get_text(GTK_ENTRY(param->url)));

           p = strstr(url, "//");    /* 'http://' */
           if (p)
             {
               p += 2;
             }
           else
             {
102
               p = strchr(url, ':');    /* 'mailto:' */
103 104 105
               if (p)
                 {
                   p++;
106
                   if (*p == '/')       /* 'file:/' */
107 108 109 110 111 112 113 114 115 116 117 118 119
                     p++;
                 }
               else
                 {
                   p = url;
                 }
             }
           p = g_strconcat(prefix, p, NULL);
           gtk_entry_set_text(GTK_ENTRY(param->url), p);
           g_free(p);
           g_free(url);
         }
     }
Sven Neumann's avatar
Sven Neumann committed
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
   gtk_widget_grab_focus(param->url);
}

static void
select_web_cb(GtkWidget *widget, AreaInfoDialog_t *param)
{
   set_url(widget, param, "http://");
}

static void
select_ftp_cb(GtkWidget *widget, AreaInfoDialog_t *param)
{
   set_url(widget, param, "ftp://");
}

static void
select_gopher_cb(GtkWidget *widget, AreaInfoDialog_t *param)
{
   set_url(widget, param, "gopher://");
}

static void
select_other_cb(GtkWidget *widget, AreaInfoDialog_t *param)
{
   set_url(widget, param, "");
}

static void
select_file_cb(GtkWidget *widget, AreaInfoDialog_t *param)
{
   set_url(widget, param, "file:/");
}

static void
select_wais_cb(GtkWidget *widget, AreaInfoDialog_t *param)
{
   set_url(widget, param, "wais://");
}

static void
select_telnet_cb(GtkWidget *widget, AreaInfoDialog_t *param)
{
   set_url(widget, param, "telnet://");
}

static void
select_email_cb(GtkWidget *widget, AreaInfoDialog_t *param)
{
   set_url(widget, param, "mailto:");
}

171 172
static void
append_page (GtkWidget *notebook, GtkWidget *page, const gchar *icon_name,
173
             const gchar *label_name)
174 175 176
{
   GtkWidget *hbox, *icon, *label;

177
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 1);
178 179
   gtk_widget_show(hbox);

180
   icon = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
181
   gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
182
   gtk_widget_show (icon);
183

184 185
   label = gtk_label_new_with_mnemonic (label_name);
   gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
186 187 188 189 190
   gtk_widget_show (label);

   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, hbox);
}

Sven Neumann's avatar
Sven Neumann committed
191 192 193 194
static void
create_link_tab(AreaInfoDialog_t *dialog, GtkWidget *notebook)
{
   BrowseWidget_t *browse;
195 196
   GtkWidget *grid, *label;
   GtkWidget *subgrid, *frame;
Sven Neumann's avatar
Sven Neumann committed
197 198
   GSList    *group;

199 200 201 202
   grid = gtk_grid_new ();
   gtk_container_set_border_width (GTK_CONTAINER (grid), 12);
   gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
   gtk_widget_show (grid);
203

204 205 206
   frame = gimp_frame_new (_("Link Type"));
   gtk_grid_attach (GTK_GRID (grid), frame, 0, 0, 2, 1);
   gtk_widget_show (frame);
Sven Neumann's avatar
Sven Neumann committed
207

208 209 210
   subgrid = gtk_grid_new ();
   gtk_container_add (GTK_CONTAINER (frame), subgrid);
   gtk_widget_show (subgrid);
Sven Neumann's avatar
Sven Neumann committed
211

212
   dialog->web_site = create_radio_button_in_grid (subgrid, NULL, 0, 0,
213
                                                   _("_Web Site"));
214
   g_signal_connect(dialog->web_site, "toggled",
215 216
                    G_CALLBACK (select_web_cb), (gpointer) dialog);
   group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(dialog->web_site));
Sven Neumann's avatar
Sven Neumann committed
217

218
   dialog->ftp_site = create_radio_button_in_grid (subgrid, group, 0, 1,
219
                                                   _("_Ftp Site"));
220
   g_signal_connect(dialog->ftp_site, "toggled",
221 222
                    G_CALLBACK (select_ftp_cb), (gpointer) dialog);
   group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(dialog->ftp_site));
Sven Neumann's avatar
Sven Neumann committed
223

224
   dialog->gopher = create_radio_button_in_grid (subgrid, group, 0, 2,
225
                                                 _("_Gopher"));
226
   g_signal_connect(dialog->gopher, "toggled",
227 228
                    G_CALLBACK (select_gopher_cb), (gpointer) dialog);
   group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(dialog->gopher));
Sven Neumann's avatar
Sven Neumann committed
229

230
   dialog->other = create_radio_button_in_grid (subgrid, group, 0, 3,
231
                                                _("Ot_her"));
232
   g_signal_connect(dialog->other, "toggled",
233 234
                    G_CALLBACK (select_other_cb), (gpointer) dialog);
   group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(dialog->other));
Sven Neumann's avatar
Sven Neumann committed
235

236
   dialog->file = create_radio_button_in_grid (subgrid, group, 1, 0,
237
                                               _("F_ile"));
238
   g_signal_connect(dialog->file, "toggled",
239 240
                    G_CALLBACK (select_file_cb), (gpointer) dialog);
   group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(dialog->file));
Sven Neumann's avatar
Sven Neumann committed
241

242
   dialog->wais = create_radio_button_in_grid (subgrid, group, 1, 1,
243
                                               _("WAI_S"));
244
   g_signal_connect(dialog->wais, "toggled",
245 246
                    G_CALLBACK (select_wais_cb), (gpointer) dialog);
   group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(dialog->wais));
Sven Neumann's avatar
Sven Neumann committed
247

248
   dialog->telnet = create_radio_button_in_grid (subgrid, group, 1, 2,
249
                                                 _("Tel_net"));
250
   g_signal_connect(dialog->telnet, "toggled",
251 252
                    G_CALLBACK (select_telnet_cb), (gpointer) dialog);
   group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(dialog->telnet));
Sven Neumann's avatar
Sven Neumann committed
253

254
   dialog->email = create_radio_button_in_grid (subgrid, group, 1, 3,
255
                                                _("e-_mail"));
256
   g_signal_connect(dialog->email, "toggled",
257
                    G_CALLBACK (select_email_cb), (gpointer) dialog);
Sven Neumann's avatar
Sven Neumann committed
258

259 260
   label = create_label_in_grid (
      grid, 2, 0,
261
      _("_URL to activate when this area is clicked: (required)"));
Sven Neumann's avatar
Sven Neumann committed
262

263
   browse = browse_widget_new( _("Select HTML file"));
Sven Neumann's avatar
Sven Neumann committed
264
   browse_widget_set_filter(browse, relative_filter, (gpointer) dialog);
265
   gtk_grid_attach (GTK_GRID (grid), browse->hbox, 0, 3, 1, 1);
Sven Neumann's avatar
Sven Neumann committed
266
   dialog->url = browse->file;
267
   g_signal_connect(dialog->url, "changed", G_CALLBACK(url_changed),
268
                    dialog);
269
   gtk_label_set_mnemonic_widget(GTK_LABEL(label), dialog->url);
Sven Neumann's avatar
Sven Neumann committed
270

271
   dialog->relative_link = create_check_button_in_grid (grid, 4, 0,
272
                                                        _("Relati_ve link"));
273
   gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->relative_link),
274
                                TRUE);
Sven Neumann's avatar
Sven Neumann committed
275

276 277
   label = create_label_in_grid (
      grid, 6, 0,
278
      _("_Target frame name/ID: (optional - used for FRAMES only)"));
279
   dialog->target = create_entry_in_grid (grid, label, 7, 0);
Sven Neumann's avatar
Sven Neumann committed
280

281 282
   label = create_label_in_grid (grid, 9, 0, _("ALT te_xt: (optional)"));
   dialog->comment = create_entry_in_grid (grid, label, 10, 0);
Sven Neumann's avatar
Sven Neumann committed
283

284
   append_page (notebook, grid, GIMP_ICON_WEB, _("_Link"));
Sven Neumann's avatar
Sven Neumann committed
285 286
}

287 288 289 290 291 292 293 294
static void
geometry_changed(Object_t *obj, gpointer data)
{
   AreaInfoDialog_t *dialog = (AreaInfoDialog_t*) data;
   if (dialog->geometry_lock) {
      dialog->geometry_lock = FALSE;
   } else {
      if (dialog->obj == obj) {
295 296
         object_update_info_widget(obj, dialog->infotab);
         obj->class->assign(obj, dialog->clone);
297 298 299 300 301 302 303 304 305 306 307 308 309 310
      }
   }
}

static void
toggle_preview_cb(GtkWidget *widget, AreaInfoDialog_t *param)
{
   param->preview = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
   edit_area_info_dialog_emit_geometry_signal(param);
}

static void
create_info_tab(AreaInfoDialog_t *dialog, GtkWidget *notebook)
{
311
   GtkWidget *vbox, *frame, *preview;
312
   Object_t *obj = dialog->obj;
313

314
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 1);
315
   gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
316 317
   gtk_widget_show(vbox);

318
   frame = gimp_frame_new(_("Dimensions"));
319 320 321
   gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show(frame);

322
   preview = gtk_check_button_new_with_mnemonic(_("Pre_view"));
323
   g_signal_connect(preview, "toggled",
324
                    G_CALLBACK (toggle_preview_cb), (gpointer) dialog);
325 326 327 328 329
   gtk_box_pack_start(GTK_BOX(vbox), preview, FALSE, FALSE, 0);
   gtk_widget_show(preview);

   dialog->infotab = obj->class->create_info_widget(frame);

330
   append_page (notebook, vbox, obj->class->get_stock_icon_name (),
331
                gettext (obj->class->name));
332 333
}

Sven Neumann's avatar
Sven Neumann committed
334 335 336
static void
create_java_script_tab(AreaInfoDialog_t *dialog, GtkWidget *notebook)
{
337
   GtkWidget *vbox, *grid, *label;
338

339
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 1);
Sven Neumann's avatar
Sven Neumann committed
340 341
   gtk_widget_show(vbox);

342 343 344 345 346
   grid = gtk_grid_new ();
   gtk_box_pack_start (GTK_BOX (vbox), grid, FALSE, FALSE, 0);
   gtk_container_set_border_width (GTK_CONTAINER (grid), 12);
   gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
   gtk_widget_show (grid);
347

348 349
   label = create_label_in_grid (grid, 0, 0, "o_nMouseover:");
   dialog->mouse_over = create_entry_in_grid (grid, label, 1, 0);
Sven Neumann's avatar
Sven Neumann committed
350

351 352
   label = create_label_in_grid (grid, 3, 0, "on_Mouseout:");
   dialog->mouse_out = create_entry_in_grid (grid, label, 4, 0);
Sven Neumann's avatar
Sven Neumann committed
353

354 355
   label = create_label_in_grid (grid, 6, 0, "on_Focus (HTML 4.0):");
   dialog->focus = create_entry_in_grid (grid, label, 7, 0);
Sven Neumann's avatar
Sven Neumann committed
356

357 358
   label = create_label_in_grid (grid, 9, 0, "on_Blur (HTML 4.0):");
   dialog->blur = create_entry_in_grid (grid, label, 10, 0);
Sven Neumann's avatar
Sven Neumann committed
359

360
   append_page (notebook, vbox, IMAP_STOCK_JAVA, _("_JavaScript"));
Sven Neumann's avatar
Sven Neumann committed
361 362
}

363 364 365 366 367 368 369 370 371 372 373 374 375 376 377
static gboolean
object_was_changed(AreaInfoDialog_t *dialog)
{
   Object_t *clone = dialog->clone;
   Object_t *obj = dialog->obj;
   gint old_x, old_y, old_width, old_height;
   gint new_x, new_y, new_width, new_height;

   object_get_dimensions(clone, &old_x, &old_y, &old_width, &old_height);
   object_get_dimensions(obj, &new_x, &new_y, &new_width, &new_height);

   return new_x != old_x || new_y != old_y || new_width != old_width ||
      new_height != old_height || clone->selected != obj->selected;
}

Sven Neumann's avatar
Sven Neumann committed
378
static void
379
edit_area_apply_cb(gpointer data)
Sven Neumann's avatar
Sven Neumann committed
380 381 382
{
   AreaInfoDialog_t *param = (AreaInfoDialog_t*) data;
   Object_t *obj = param->obj;
383

Sven Neumann's avatar
Sven Neumann committed
384 385 386
   object_set_url(obj, gtk_entry_get_text(GTK_ENTRY(param->url)));
   object_set_target(obj, gtk_entry_get_text(GTK_ENTRY(param->target)));
   object_set_comment(obj, gtk_entry_get_text(GTK_ENTRY(param->comment)));
387
   object_set_mouse_over(obj,
388
                         gtk_entry_get_text(GTK_ENTRY(param->mouse_over)));
Sven Neumann's avatar
Sven Neumann committed
389 390 391 392 393 394
   object_set_mouse_out(obj, gtk_entry_get_text(GTK_ENTRY(param->mouse_out)));
   object_set_focus(obj, gtk_entry_get_text(GTK_ENTRY(param->focus)));
   object_set_blur(obj, gtk_entry_get_text(GTK_ENTRY(param->blur)));
   object_update(obj, param->infotab);
   update_shape(obj);

395
   if (object_was_changed(param))
396
      preview_redraw();
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
}

static void
edit_area_ok_cb(gpointer data)
{
   AreaInfoDialog_t *param = (AreaInfoDialog_t*) data;
   Object_t *obj = param->obj;

   object_list_remove_geometry_cb(obj->list, param->geometry_cb_id);

   /* Fix me: nasty hack */
   if (param->add)
      command_list_add(edit_object_command_new(obj));

   edit_area_apply_cb(data);
   object_unlock(obj);
413
   object_unref(param->clone);
Sven Neumann's avatar
Sven Neumann committed
414 415 416 417 418
}

static void
edit_area_cancel_cb(gpointer data)
{
419 420 421 422 423 424
   AreaInfoDialog_t *dialog = (AreaInfoDialog_t*) data;
   Object_t *obj = dialog->obj;
   gboolean changed = object_was_changed(dialog);
   gboolean selected = obj->selected;

   object_list_remove_geometry_cb(obj->list, dialog->geometry_cb_id);
Sven Neumann's avatar
Sven Neumann committed
425
   object_unlock(obj);
426 427 428 429 430
   object_assign(dialog->clone, obj);
   obj->selected = selected;
   object_unref(dialog->clone);

   if (changed)
431
      preview_redraw();
Sven Neumann's avatar
Sven Neumann committed
432 433 434
}

static void
435
switch_page(GtkWidget *widget, gpointer page, gint page_num,
436
            gpointer data)
Sven Neumann's avatar
Sven Neumann committed
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454
{
   AreaInfoDialog_t *param = (AreaInfoDialog_t*) data;
   if (page_num == 0) {
      gtk_widget_grab_focus(param->url);
   } else if (page_num == 1) {
      Object_t *obj = param->obj;
      obj->class->set_initial_focus(obj, param->infotab);
   } else {
      gtk_widget_grab_focus(param->mouse_over);
   }
}

AreaInfoDialog_t*
create_edit_area_info_dialog(Object_t *obj)
{
   AreaInfoDialog_t *data = g_new(AreaInfoDialog_t, 1);
   GtkWidget *notebook;

455 456
   data->geometry_lock = FALSE;
   data->preview = FALSE;
Sven Neumann's avatar
Sven Neumann committed
457 458
   data->obj = obj;
   data->browse = NULL;
459
   data->dialog = make_default_dialog(_("Area Settings"));
Sven Neumann's avatar
Sven Neumann committed
460
   default_dialog_set_ok_cb(data->dialog, edit_area_ok_cb, data);
461
   default_dialog_set_apply_cb(data->dialog, edit_area_apply_cb, data);
Sven Neumann's avatar
Sven Neumann committed
462 463 464
   default_dialog_set_cancel_cb(data->dialog, edit_area_cancel_cb, data);

   data->notebook = notebook = gtk_notebook_new();
465
   g_signal_connect_after(notebook, "switch-page",
466
                          G_CALLBACK(switch_page), (gpointer) data);
Sven Neumann's avatar
Sven Neumann committed
467

468
   gtk_box_pack_start(GTK_BOX(data->dialog->vbox), notebook, TRUE, TRUE, 0);
Sven Neumann's avatar
Sven Neumann committed
469
   create_link_tab(data, notebook);
470
   create_info_tab(data, notebook);
Sven Neumann's avatar
Sven Neumann committed
471 472 473 474 475 476 477
   create_java_script_tab(data, notebook);
   gtk_widget_show(notebook);

   return data;
}

void
478
edit_area_info_dialog_show(AreaInfoDialog_t *dialog, Object_t *obj,
479
                           gboolean add)
Sven Neumann's avatar
Sven Neumann committed
480
{
481
   gchar *title;
Sven Neumann's avatar
Sven Neumann committed
482 483 484 485

   object_unlock(dialog->obj);
   object_lock(obj);
   dialog->obj = obj;
486
   dialog->clone = object_clone(obj);
Sven Neumann's avatar
Sven Neumann committed
487
   dialog->add = add;
488
   object_fill_info_tab(obj, dialog->infotab);
Sven Neumann's avatar
Sven Neumann committed
489 490 491 492 493 494 495 496 497
   gtk_entry_set_text(GTK_ENTRY(dialog->url), obj->url);
   gtk_entry_set_text(GTK_ENTRY(dialog->target), obj->target);
   gtk_entry_set_text(GTK_ENTRY(dialog->comment), obj->comment);
   gtk_entry_set_text(GTK_ENTRY(dialog->mouse_over), obj->mouse_over);
   gtk_entry_set_text(GTK_ENTRY(dialog->mouse_out), obj->mouse_out);
   gtk_entry_set_text(GTK_ENTRY(dialog->focus), obj->focus);
   gtk_entry_set_text(GTK_ENTRY(dialog->blur), obj->blur);
   gtk_widget_grab_focus(dialog->url);

498
   dialog->geometry_cb_id =
499 500
      object_list_add_geometry_cb(obj->list, geometry_changed, dialog);

501
   title = g_strdup_printf (_("Area #%d Settings"),
502
                            object_get_position_in_list(obj) + 1);
Sven Neumann's avatar
Sven Neumann committed
503
   default_dialog_set_title(dialog->dialog, title);
504
   g_free (title);
Sven Neumann's avatar
Sven Neumann committed
505 506 507
   default_dialog_show(dialog->dialog);
}

508 509 510 511 512 513 514 515
void
edit_area_info_dialog_emit_geometry_signal(AreaInfoDialog_t *dialog)
{
   if (dialog->preview) {
      dialog->geometry_lock = TRUE;
      object_emit_geometry_signal(dialog->obj);
   }
}