From a8f83bc078b9f77b8cd5f0e8fe568ef99d1d83d9 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Mon, 31 Mar 2003 17:47:00 +0000 Subject: [PATCH] when the user has changed the layer name from the layers dialog, don't 2003-03-31 Sven Neumann * app/text/gimptextlayer.[ch]: when the user has changed the layer name from the layers dialog, don't change it with the text any longer. * app/tools/gimpmovetool.c: removed redundant include. * app/widgets/gimpcontainerpopup.c * app/widgets/widgets-enums.[ch]: fixed spelling. --- ChangeLog | 10 +++ app/text/gimptextlayer.c | 54 ++++++++++----- app/text/gimptextlayer.h | 1 + app/tools/gimpmovetool.c | 1 - app/widgets/gimpcontainerpopup.c | 4 +- app/widgets/widgets-enums.c | 4 +- app/widgets/widgets-enums.h | 4 +- po/POTFILES.in | 3 +- po/de.po | 112 ++++++++++++++++++------------- 9 files changed, 124 insertions(+), 69 deletions(-) diff --git a/ChangeLog b/ChangeLog index e51b3e99b7..2d9eb2ef43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2003-03-31 Sven Neumann + + * app/text/gimptextlayer.[ch]: when the user has changed the layer + name from the layers dialog, don't change it with the text any longer. + + * app/tools/gimpmovetool.c: removed redundant include. + + * app/widgets/gimpcontainerpopup.c + * app/widgets/widgets-enums.[ch]: fixed spelling. + 2003-03-31 Sven Neumann * themes/Default/images/Makefile.am diff --git a/app/text/gimptextlayer.c b/app/text/gimptextlayer.c index 666f5076a9..9aef63b645 100644 --- a/app/text/gimptextlayer.c +++ b/app/text/gimptextlayer.c @@ -40,24 +40,29 @@ #include "gimptextlayer.h" #include "gimptextlayout.h" +#include "gimp-intl.h" + static void gimp_text_layer_class_init (GimpTextLayerClass *klass); -static void gimp_text_layer_init (GimpTextLayer *layer); -static void gimp_text_layer_dispose (GObject *object); +static void gimp_text_layer_init (GimpTextLayer *layer); +static void gimp_text_layer_dispose (GObject *object); -static gsize gimp_text_layer_get_memsize (GimpObject *object); -static TempBuf * gimp_text_layer_get_preview (GimpViewable *viewable, - gint width, - gint height); -static GimpItem * gimp_text_layer_duplicate (GimpItem *item, - GType new_type, - gboolean add_alpha); +static gsize gimp_text_layer_get_memsize (GimpObject *object); +static TempBuf * gimp_text_layer_get_preview (GimpViewable *viewable, + gint width, + gint height); +static GimpItem * gimp_text_layer_duplicate (GimpItem *item, + GType new_type, + gboolean add_alpha); +static void gimp_text_layer_rename (GimpItem *item, + const gchar *new_name, + const gchar *undo_desc); -static void gimp_text_layer_notify_text (GimpTextLayer *layer); -static gboolean gimp_text_layer_idle_render (GimpTextLayer *layer); -static gboolean gimp_text_layer_render (GimpTextLayer *layer); -static void gimp_text_layer_render_layout (GimpTextLayer *layer, - GimpTextLayout *layout); +static void gimp_text_layer_notify_text (GimpTextLayer *layer); +static gboolean gimp_text_layer_idle_render (GimpTextLayer *layer); +static gboolean gimp_text_layer_render (GimpTextLayer *layer); +static void gimp_text_layer_render_layout (GimpTextLayer *layer, + GimpTextLayout *layout); static GimpLayerClass *parent_class = NULL; @@ -114,12 +119,16 @@ gimp_text_layer_class_init (GimpTextLayerClass *klass) viewable_class->get_preview = gimp_text_layer_get_preview; item_class->duplicate = gimp_text_layer_duplicate; + item_class->rename = gimp_text_layer_rename; + item_class->default_name = _("Text Layer"); } static void gimp_text_layer_init (GimpTextLayer *layer) { - layer->text = NULL; + layer->text = NULL; + layer->idle_render_id = 0; + layer->auto_rename = TRUE; } static void @@ -201,6 +210,16 @@ gimp_text_layer_duplicate (GimpItem *item, return new_item; } +static void +gimp_text_layer_rename (GimpItem *item, + const gchar *new_name, + const gchar *undo_desc) +{ + GIMP_TEXT_LAYER (item)->auto_rename = FALSE; + + GIMP_ITEM_CLASS (parent_class)->rename (item, new_name, undo_desc); +} + GimpLayer * gimp_text_layer_new (GimpImage *image, GimpText *text) @@ -304,7 +323,10 @@ gimp_text_layer_render (GimpTextLayer *layer) } } - gimp_object_set_name_safe (GIMP_OBJECT (layer), layer->text->text); + if (layer->auto_rename) + gimp_object_set_name_safe (GIMP_OBJECT (layer), + layer->text->text ? + layer->text->text : _("Empty Text Layer")); gimp_text_layer_render_layout (layer, layout); g_object_unref (layout); diff --git a/app/text/gimptextlayer.h b/app/text/gimptextlayer.h index f4950d8675..49fde59e7f 100644 --- a/app/text/gimptextlayer.h +++ b/app/text/gimptextlayer.h @@ -42,6 +42,7 @@ struct _GimpTextLayer GimpText *text; guint idle_render_id; + gboolean auto_rename; }; struct _GimpTextLayerClass diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c index 217abcb2e1..ceaf047ce2 100644 --- a/app/tools/gimpmovetool.c +++ b/app/tools/gimpmovetool.c @@ -29,7 +29,6 @@ #include "core/gimpimage.h" #include "core/gimpimage-guides.h" #include "core/gimpimage-mask.h" -#include "core/gimpimage-undo-push.h" #include "core/gimplayer.h" #include "core/gimplayer-floating-sel.h" #include "core/gimptoolinfo.h" diff --git a/app/widgets/gimpcontainerpopup.c b/app/widgets/gimpcontainerpopup.c index e90b24caf7..aff9cd3b32 100644 --- a/app/widgets/gimpcontainerpopup.c +++ b/app/widgets/gimpcontainerpopup.c @@ -467,12 +467,12 @@ gimp_container_popup_create_view (GimpContainerPopup *popup, editor = GIMP_EDITOR (popup->editor->view); gimp_editor_add_button (editor, GTK_STOCK_ZOOM_OUT, - _("Smaller previews"), NULL, + _("Smaller Previews"), NULL, G_CALLBACK (gimp_container_popup_smaller_clicked), NULL, popup); gimp_editor_add_button (editor, GTK_STOCK_ZOOM_IN, - _("Larger previews"), NULL, + _("Larger Previews"), NULL, G_CALLBACK (gimp_container_popup_larger_clicked), NULL, popup); diff --git a/app/widgets/widgets-enums.c b/app/widgets/widgets-enums.c index 56ef1b45af..82254f6e46 100644 --- a/app/widgets/widgets-enums.c +++ b/app/widgets/widgets-enums.c @@ -67,8 +67,8 @@ gimp_histogram_scale_get_type (void) static const GEnumValue gimp_view_type_enum_values[] = { - { GIMP_VIEW_TYPE_LIST, N_("View as list"), "list" }, - { GIMP_VIEW_TYPE_GRID, N_("View as grid"), "grid" }, + { GIMP_VIEW_TYPE_LIST, N_("View as List"), "list" }, + { GIMP_VIEW_TYPE_GRID, N_("View as Grid"), "grid" }, { 0, NULL, NULL } }; diff --git a/app/widgets/widgets-enums.h b/app/widgets/widgets-enums.h index 85051ff0d6..17aba0ecf7 100644 --- a/app/widgets/widgets-enums.h +++ b/app/widgets/widgets-enums.h @@ -65,8 +65,8 @@ GType gimp_view_type_get_type (void) G_GNUC_CONST; typedef enum { - GIMP_VIEW_TYPE_LIST, /*< desc="View as list" >*/ - GIMP_VIEW_TYPE_GRID /*< desc="View as grid" >*/ + GIMP_VIEW_TYPE_LIST, /*< desc="View as List" >*/ + GIMP_VIEW_TYPE_GRID /*< desc="View as Grid" >*/ } GimpViewType; diff --git a/po/POTFILES.in b/po/POTFILES.in index 54a166f661..09bcafa62e 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -171,8 +171,9 @@ app/plug-in/plug-ins.c app/text/text-enums.c app/text/gimpfont.c -app/text/gimptext.c app/text/gimptext-compat.c +app/text/gimptext.c +app/text/gimptextlayer.c app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c diff --git a/po/de.po b/po/de.po index 6ac5704b39..5b9adf20f2 100644 --- a/po/de.po +++ b/po/de.po @@ -6,9 +6,9 @@ # Christian Neumair msgid "" msgstr "" -"Project-Id-Version: GIMP 1.3.13\n" -"POT-Creation-Date: 2003-03-31 02:15+0200\n" -"PO-Revision-Date: 2003-03-31 02:16+0200\n" +"Project-Id-Version: GIMP 1.3.14\n" +"POT-Creation-Date: 2003-03-31 19:44+0200\n" +"PO-Revision-Date: 2003-03-31 19:45+0200\n" "Last-Translator: Sven Neumann \n" "Language-Team: German \n" "MIME-Version: 1.0\n" @@ -954,7 +954,7 @@ msgstr "Auswahl anheben" msgid "Anchor Floating Selection" msgstr "Schwebende Auswahl verankern" -#: app/core/core-enums.c:449 app/core/gimpedit.c:229 +#: app/core/core-enums.c:449 app/core/gimpedit.c:199 #: app/widgets/gimpbufferview.c:147 msgid "Paste" msgstr "Einfügen" @@ -967,7 +967,7 @@ msgstr "Ausschneiden" msgid "Copy" msgstr "Kopieren" -#: app/core/core-enums.c:452 app/tools/gimptexttool.c:114 +#: app/core/core-enums.c:452 app/tools/gimptexttool.c:113 msgid "Text" msgstr "Text" @@ -1433,27 +1433,27 @@ msgstr "Ebene transformieren" msgid "Transform Channel" msgstr "Kanal transformieren" -#: app/core/gimpedit.c:220 app/core/gimpedit.c:284 +#: app/core/gimpedit.c:190 app/core/gimpedit.c:268 msgid "Pasted Layer" msgstr "Eingefügte Ebene" -#: app/core/gimpedit.c:332 +#: app/core/gimpedit.c:316 msgid "Clear" msgstr "Löschen" -#: app/core/gimpedit.c:368 +#: app/core/gimpedit.c:352 msgid "Fill with FG Color" msgstr "Füllen mit VG-Farbe" -#: app/core/gimpedit.c:373 app/core/gimpedit.c:398 +#: app/core/gimpedit.c:357 app/core/gimpedit.c:382 msgid "Fill with BG Color" msgstr "Füllen mit HG-Farbe" -#: app/core/gimpedit.c:380 +#: app/core/gimpedit.c:364 msgid "Fill with White" msgstr "Füllen mit weiß" -#: app/core/gimpedit.c:389 +#: app/core/gimpedit.c:373 msgid "Fill with Transparency" msgstr "Füllen mit Transparenz" @@ -2959,19 +2959,19 @@ msgstr "Das Invertieren funktioniert mit indizierten Bildern nicht." msgid "Equalize does not operate on indexed drawables." msgstr "Das Angleichen funktioniert mit indizierten Bildern nicht." -#: app/gui/edit-commands.c:221 +#: app/gui/edit-commands.c:192 msgid "Cut Named" msgstr "In Ablage ausschneiden" -#: app/gui/edit-commands.c:224 app/gui/edit-commands.c:242 +#: app/gui/edit-commands.c:195 app/gui/edit-commands.c:213 msgid "Enter a name for this buffer" msgstr "Geben Sie dieser Ablage einen Namen" -#: app/gui/edit-commands.c:239 +#: app/gui/edit-commands.c:210 msgid "Copy Named" msgstr "In Ablage kopieren" -#: app/gui/edit-commands.c:318 app/gui/edit-commands.c:347 +#: app/gui/edit-commands.c:289 app/gui/edit-commands.c:318 msgid "(Unnamed Buffer)" msgstr "(Namenlose Ablage)" @@ -6602,18 +6602,26 @@ msgid "Starting extension: \"%s\"\n" msgstr "Erweiterung »%s« wird gestartet\n" #: app/text/text-enums.c:13 +msgid "From Left to Right" +msgstr "Von Links nach Rechts" + +#: app/text/text-enums.c:14 +msgid "From Right to Left" +msgstr "Von Rechts nach Links" + +#: app/text/text-enums.c:32 msgid "Left Justified" msgstr "Linksbündig" -#: app/text/text-enums.c:14 +#: app/text/text-enums.c:33 msgid "Right Justified" msgstr "Rechtsbündig" -#: app/text/text-enums.c:15 +#: app/text/text-enums.c:34 msgid "Centered" msgstr "Zentriert" -#: app/text/text-enums.c:16 +#: app/text/text-enums.c:35 msgid "Filled" msgstr "Blocksatz" @@ -6627,6 +6635,10 @@ msgstr "" "Zwei Boxkämpfer jagen\n" "Eva quer durch Sylt." +#: app/text/gimptext-compat.c:100 app/tools/gimptexttool.c:309 +msgid "Add Text Layer" +msgstr "Textebene hinzufügen" + #: app/text/gimptext.c:157 msgid "" "Hinting alters the font outline to produce a crisp bitmap at small sizes" @@ -6640,9 +6652,13 @@ msgstr "" msgid "Additional line spacing (in pixels)" msgstr "Zusätzlicher Zeilenabstand (in Pixeln)" -#: app/text/gimptext-compat.c:100 app/tools/gimptexttool.c:310 -msgid "Add Text Layer" -msgstr "Textebene hinzufügen" +#: app/text/gimptextlayer.c:123 +msgid "Text Layer" +msgstr "Textebene" + +#: app/text/gimptextlayer.c:329 +msgid "Empty Text Layer" +msgstr "Leere Textebene" #: app/tools/gimpairbrushtool.c:63 msgid "Airbrush with variable pressure" @@ -7496,15 +7512,15 @@ msgstr "Rand um Auswahl verschieben" msgid "Move Pixels" msgstr "Pixel verschieben" -#: app/tools/gimpmovetool.c:104 +#: app/tools/gimpmovetool.c:103 msgid "Move" msgstr "Verschieben" -#: app/tools/gimpmovetool.c:105 +#: app/tools/gimpmovetool.c:104 msgid "Move layers & selections" msgstr "Ebenen und Auswahlen verschieben" -#: app/tools/gimpmovetool.c:106 +#: app/tools/gimpmovetool.c:105 msgid "/Tools/Transform Tools/Move" msgstr "/Werkzeuge/Transformationen/Verschieben" @@ -7756,15 +7772,15 @@ msgstr "" "Zeilen-\n" "abstand:" -#: app/tools/gimptextoptions.c:332 +#: app/tools/gimptextoptions.c:380 msgid "Open the font selection dialog" msgstr "Den Dialog zur Schriftauswahl öffnen" -#: app/tools/gimptexttool.c:115 +#: app/tools/gimptexttool.c:114 msgid "Add text to the image" msgstr "Text zum Bild hinzufügen" -#: app/tools/gimptexttool.c:116 +#: app/tools/gimptexttool.c:115 msgid "/Tools/Text" msgstr "/Werkzeuge/Text" @@ -7930,6 +7946,14 @@ msgstr "Netscape" msgid "Logarithmic" msgstr "Logarithmisch" +#: app/widgets/widgets-enums.c:70 +msgid "View as List" +msgstr "Als Liste anzeigen" + +#: app/widgets/widgets-enums.c:71 +msgid "View as Grid" +msgstr "Als Raster anzeigen" + #: app/widgets/gimpbrusheditor.c:143 msgid "Hardness:" msgstr "Härte:" @@ -8008,21 +8032,13 @@ msgstr "Farbindex:" msgid "(None)" msgstr "(Keine)" -#: app/widgets/gimpcontainerpopup.c:471 +#: app/widgets/gimpcontainerpopup.c:470 msgid "Smaller Previews" -msgstr "Kleinere Vorschau" +msgstr "Kleinere Vorschaubilder" -#: app/widgets/gimpcontainerpopup.c:476 +#: app/widgets/gimpcontainerpopup.c:475 msgid "Larger Previews" -msgstr "Grössere Vorschau" - -#: app/widgets/gimpcontainerpopup.c:483 -msgid "View as List" -msgstr "Als Liste anzeigen" - -#: app/widgets/gimpcontainerpopup.c:492 -msgid "View as Grid" -msgstr "Als Raster anzeigen" +msgstr "Grössere Vorschaubilder" #: app/widgets/gimpdataeditor.c:131 msgid "Save" @@ -8300,7 +8316,7 @@ msgstr "Nicht definiert" msgid "Columns:" msgstr "Spalten:" -#: app/widgets/gimppropwidgets.c:1271 +#: app/widgets/gimppropwidgets.c:1273 #, c-format msgid "This text input field is limited to %d characters." msgstr "Dieses Eingabefeld ist auf %d Zeichen beschränkt." @@ -8309,24 +8325,24 @@ msgstr "Dieses Eingabefeld ist auf %d Zeichen beschränkt." msgid "Save Selection to Channel" msgstr "Auswahl in Kanal speichern" -#: app/widgets/gimptexteditor.c:96 +#: app/widgets/gimptexteditor.c:191 msgid "Load Text from File" msgstr "Text aus Datei laden" -#: app/widgets/gimptexteditor.c:100 +#: app/widgets/gimptexteditor.c:195 msgid "Clear all Text" msgstr "Allen Text löschen" -#: app/widgets/gimptexteditor.c:135 +#: app/widgets/gimptexteditor.c:317 msgid "Open Text File (UTF-8)" msgstr "Text-Datei (UTF-8) öffnen" -#: app/widgets/gimptexteditor.c:184 +#: app/widgets/gimptexteditor.c:366 #, c-format msgid "Error opening file '%s': %s" msgstr "Datei »%s« konnte nicht geöffnet werden: %s" -#: app/widgets/gimptexteditor.c:213 +#: app/widgets/gimptexteditor.c:395 #, c-format msgid "Invalid UTF-8 data in file '%s'." msgstr "Ungültige UTF-8-Daten in Datei »%s«." @@ -8600,3 +8616,9 @@ msgstr "Anzahl der Gitterlinien" #: libgimptool/gimptoolenums.c:138 msgid "Grid Line Spacing" msgstr "Abstand der Gitterlinien" + +#~ msgid "View as list" +#~ msgstr "Als Liste anzeigen" + +#~ msgid "View as grid" +#~ msgstr "Als Raster anzeigen"