~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/imagemap/imap_cmd_guides.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
#include <gtk/gtk.h>
27
27
 
 
28
#include "libgimpwidgets/gimpwidgets.h"
 
29
 
28
30
#include "imap_commands.h"
29
31
#include "imap_default_dialog.h"
30
32
#include "imap_main.h"
138
140
   dialog = data->dialog = make_default_dialog(_("Create Guides"));
139
141
   default_dialog_set_ok_cb (dialog, guides_ok_cb, data);
140
142
 
141
 
   label = gtk_label_new (
 
143
   hbox = gimp_hint_box_new (
142
144
      _("Guides are pre-defined rectangles covering the image. You define "
143
145
        "them by their width, height, and spacing from each other. This "
144
146
        "allows you to rapidly create the most common image map type - "
145
147
        "image collection of \"thumbnails\", suitable for navigation bars."));
146
 
 
147
 
   gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
148
 
   gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
149
 
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
150
 
   gtk_box_pack_start (GTK_BOX (dialog->vbox), label, FALSE, FALSE, 0);
151
 
   gtk_widget_show (label);
 
148
   gtk_box_pack_start (GTK_BOX (dialog->vbox), hbox, FALSE, FALSE, 0);
 
149
   gtk_widget_show (hbox);
152
150
 
153
151
   data->image_dimensions = gtk_label_new ("");
154
152
   gtk_misc_set_alignment (GTK_MISC (data->image_dimensions), 0.0, 0.5);
169
167
   g_signal_connect (data->width, "changed",
170
168
                     G_CALLBACK(recalc_bounds), (gpointer) data);
171
169
 
172
 
   label = create_label_in_table(table, 0, 2, _("_Left Start at:"));
 
170
   label = create_label_in_table(table, 0, 2, _("_Left start at:"));
173
171
   data->left = create_spin_button_in_table (table, label, 0, 3, 0, 0, 100);
174
172
   g_signal_connect (data->left, "changed",
175
173
                     G_CALLBACK(recalc_bounds), (gpointer) data);
179
177
   g_signal_connect (data->height, "changed",
180
178
                     G_CALLBACK(recalc_bounds), (gpointer) data);
181
179
 
182
 
   label = create_label_in_table (table, 1, 2, _("_Top Start at:"));
 
180
   label = create_label_in_table (table, 1, 2, _("_Top start at:"));
183
181
   data->top = create_spin_button_in_table (table, label, 1, 3, 0, 0, 100);
184
182
   g_signal_connect (data->top, "changed",
185
183
                     G_CALLBACK(recalc_bounds), (gpointer) data);
186
184
 
187
 
   label = create_label_in_table (table, 2, 0, _("_Horz. Spacing:"));
 
185
   label = create_label_in_table (table, 2, 0, _("_Horz. spacing:"));
188
186
   data->horz_spacing = create_spin_button_in_table (table, label, 2, 1, 0, 0,
189
187
                                                     100);
190
188
   g_signal_connect (data->horz_spacing, "changed",
191
189
                     G_CALLBACK(recalc_bounds), (gpointer) data);
192
190
 
193
 
   label = create_label_in_table(table, 2, 2, _("_No. Across:"));
 
191
   label = create_label_in_table(table, 2, 2, _("_No. across:"));
194
192
   data->no_across = create_spin_button_in_table(table, label, 2, 3, 0, 0,
195
193
                                                 100);
196
194
   g_signal_connect (data->no_across, "changed",
197
195
                     G_CALLBACK(recalc_bounds), (gpointer) data);
198
196
 
199
 
   label = create_label_in_table(table, 3, 0, _("_Vert. Spacing:"));
 
197
   label = create_label_in_table(table, 3, 0, _("_Vert. spacing:"));
200
198
   data->vert_spacing = create_spin_button_in_table(table, label, 3, 1, 0, 0,
201
199
                                                    100);
202
200
   g_signal_connect (data->vert_spacing, "changed",
203
201
                     G_CALLBACK(recalc_bounds), (gpointer) data);
204
202
 
205
 
   label = create_label_in_table(table, 3, 2, _("No. _Down:"));
 
203
   label = create_label_in_table(table, 3, 2, _("No. _down:"));
206
204
   data->no_down = create_spin_button_in_table (table, label, 3, 3, 0, 0, 100);
207
205
   g_signal_connect (data->no_down, "changed",
208
206
                     G_CALLBACK(recalc_bounds), (gpointer) data);
230
228
   gchar *dimension;
231
229
 
232
230
   dialog->list = list;
233
 
   dimension = g_strdup_printf (_("Image dimensions: %d x %d"), get_image_width(),
234
 
                               get_image_height());
235
 
   gtk_label_set_text(GTK_LABEL(dialog->image_dimensions), dimension);
 
231
   dimension = g_strdup_printf (_("Image dimensions: %d × %d"),
 
232
                                get_image_width(),
 
233
                                get_image_height());
 
234
   gtk_label_set_text (GTK_LABEL(dialog->image_dimensions), dimension);
236
235
   g_free (dimension);
237
 
   gtk_label_set_text(GTK_LABEL(dialog->guide_bounds),
238
 
                      _("Resulting Guide Bounds: 0,0 to 0,0 (0 areas)"));
239
 
   gtk_widget_grab_focus(dialog->width);
 
236
   gtk_label_set_text (GTK_LABEL(dialog->guide_bounds),
 
237
                       _("Resulting Guide Bounds: 0,0 to 0,0 (0 areas)"));
 
238
   gtk_widget_grab_focus (dialog->width);
240
239
}
241
240
 
242
241
static void
243
 
do_create_guides_dialog(ObjectList_t *list)
 
242
do_create_guides_dialog_local (ObjectList_t *list)
244
243
{
245
244
   static GuidesDialog_t *dialog;
246
245
 
277
276
guides_command_execute(Command_t *parent)
278
277
{
279
278
   GuidesCommand_t *command = (GuidesCommand_t*) parent;
280
 
   do_create_guides_dialog(command->list);
 
279
   do_create_guides_dialog_local (command->list);
281
280
   return CMD_DESTRUCT;
282
281
}