gimp r25267 - in trunk: . app/dialogs data/tips



Author: neo
Date: Thu Mar 27 21:02:15 2008
New Revision: 25267
URL: http://svn.gnome.org/viewvc/gimp?rev=25267&view=rev

Log:
2008-03-27  Sven Neumann  <sven gimp org>

	* data/tips/gimp-tips.dtd
	* data/tips/gimp-tips.xml.in: simplified the gimp-tips XML 
format
	as we do not any longer need a special welcome tip.

	* app/dialogs/tips-dialog.c
	* app/dialogs/tips-parser.[ch]: changed accordingly.



Modified:
   trunk/ChangeLog
   trunk/app/dialogs/tips-dialog.c
   trunk/app/dialogs/tips-parser.c
   trunk/app/dialogs/tips-parser.h
   trunk/data/tips/gimp-tips.dtd
   trunk/data/tips/gimp-tips.xml.in

Modified: trunk/app/dialogs/tips-dialog.c
==============================================================================
--- trunk/app/dialogs/tips-dialog.c	(original)
+++ trunk/app/dialogs/tips-dialog.c	Thu Mar 27 21:02:15 2008
@@ -43,7 +43,7 @@
   RESPONSE_NEXT     = 2
 };
 
-static void  tips_set_labels      (GimpTip   *tip);
+static void  tips_dialog_set_tip  (GimpTip   *tip);
 static void  tips_dialog_response (GtkWidget *dialog,
                                    gint       response);
 static void  tips_dialog_destroy  (GtkWidget *widget,
@@ -51,7 +51,6 @@
 
 
 static GtkWidget *tips_dialog   = NULL;
-static GtkWidget *welcome_label = NULL;
 static GtkWidget *thetip_label  = NULL;
 static GList     *tips          = NULL;
 static GList     *current_tip   = NULL;
@@ -84,19 +83,23 @@
         {
           GimpTip *tip;
 
-          if (error->code == G_FILE_ERROR_NOENT)
+          if (! error)
             {
-              tip = gimp_tip_new ("<b>%s</b>",
-                                  _("Your GIMP tips file appears to be missing!"));
-              gimp_tip_set (tip,
-                            _("There should be a file called '%s'. "
-                              "Please check your installation."), filename);
+              tip = gimp_tip_new (_("<b>The GIMP tips file is empty!</b>"));
+            }
+          else if (error->code == G_FILE_ERROR_NOENT)
+            {
+              tip = gimp_tip_new (_("<b>The GIMP tips file appears to be "
+                                    "missing!</b>\n\n"
+                                    "There should be a file called '%s'. "
+                                    "Please check your installation."),
+                                  gimp_filename_to_utf8 (filename));
             }
           else
             {
-              tip = gimp_tip_new ("<b>%s</b>",
-                                  _("The GIMP tips file could not be parsed!"));
-              gimp_tip_set (tip, "%s", error->message);
+              tip = gimp_tip_new (_("<b>The GIMP tips file could not be "
+                                    "parsed:</b>\n\n%s"),
+                                  error->message);
             }
 
           tips = g_list_prepend (tips, tip);
@@ -168,12 +171,6 @@
   gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0);
   gtk_widget_show (vbox2);
 
-  welcome_label = gtk_label_new (NULL);
-  gtk_label_set_justify (GTK_LABEL (welcome_label), GTK_JUSTIFY_LEFT);
-  gtk_label_set_line_wrap (GTK_LABEL (welcome_label), TRUE);
-  gtk_misc_set_alignment (GTK_MISC (welcome_label), 0.5, 0.5);
-  gtk_box_pack_start (GTK_BOX (vbox2), welcome_label, FALSE, FALSE, 0);
-
   thetip_label = gtk_label_new (NULL);
   gtk_label_set_selectable (GTK_LABEL (thetip_label), TRUE);
   gtk_label_set_justify (GTK_LABEL (thetip_label), GTK_JUSTIFY_LEFT);
@@ -192,7 +189,7 @@
   gtk_box_pack_start (GTK_BOX (vbox2), image, TRUE, FALSE, 0);
   gtk_widget_show (image);
 
-  tips_set_labels (current_tip->data);
+  tips_dialog_set_tip (current_tip->data);
 
   return tips_dialog;
 }
@@ -221,12 +218,12 @@
     {
     case RESPONSE_PREVIOUS:
       current_tip = current_tip->prev ? current_tip->prev : g_list_last (tips);
-      tips_set_labels (current_tip->data);
+      tips_dialog_set_tip (current_tip->data);
       break;
 
     case RESPONSE_NEXT:
       current_tip = current_tip->next ? current_tip->next : tips;
-      tips_set_labels (current_tip->data);
+      tips_dialog_set_tip (current_tip->data);
       break;
 
     default:
@@ -236,15 +233,9 @@
 }
 
 static void
-tips_set_labels (GimpTip *tip)
+tips_dialog_set_tip (GimpTip *tip)
 {
   g_return_if_fail (tip != NULL);
 
-  if (tip->welcome)
-    gtk_widget_show (welcome_label);
-  else
-    gtk_widget_hide (welcome_label);
-
-  gtk_label_set_markup (GTK_LABEL (welcome_label), tip->welcome);
   gtk_label_set_markup (GTK_LABEL (thetip_label), tip->thetip);
 }

Modified: trunk/app/dialogs/tips-parser.c
==============================================================================
--- trunk/app/dialogs/tips-parser.c	(original)
+++ trunk/app/dialogs/tips-parser.c	Thu Mar 27 21:02:15 2008
@@ -2,7 +2,7 @@
  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  *
  * tips-parser.c -- Parse the gimp-tips.xml file.
- * Copyright (C) 2002  Sven Neumann <sven gimp org>
+ * Copyright (C) 2002, 2008  Sven Neumann <sven gimp org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -38,59 +38,50 @@
   TIPS_START,
   TIPS_IN_TIPS,
   TIPS_IN_TIP,
-  TIPS_IN_WELCOME,
-  TIPS_IN_THETIP,
   TIPS_IN_UNKNOWN
 } TipsParserState;
 
-typedef enum
-{
-  TIPS_LOCALE_NONE,
-  TIPS_LOCALE_MATCH,
-  TIPS_LOCALE_MISMATCH
-} TipsParserLocaleState;
-
 typedef struct
 {
-  TipsParserState        state;
-  TipsParserState        last_known_state;
-  const gchar           *locale;
-  TipsParserLocaleState  locale_state;
-  gint                   markup_depth;
-  gint                   unknown_depth;
-  GString               *value;
-  GimpTip               *current_tip;
-  GList                 *tips;
+  TipsParserState  state;
+  TipsParserState  last_known_state;
+  const gchar     *locale;
+  gboolean         locale_match;
+  gint             markup_depth;
+  gint             unknown_depth;
+  GString         *value;
+  GimpTip         *current_tip;
+  GList           *tips;
 } TipsParser;
 
 
-static void  tips_parser_start_element (GMarkupParseContext  *context,
-                                        const gchar          *element_name,
-                                        const gchar         **attribute_names,
-                                        const gchar         **attribute_values,
-                                        gpointer              user_data,
-                                        GError              **error);
-static void  tips_parser_end_element   (GMarkupParseContext  *context,
-                                        const gchar          *element_name,
-                                        gpointer              user_data,
-                                        GError              **error);
-static void  tips_parser_characters    (GMarkupParseContext  *context,
-                                        const gchar          *text,
-                                        gsize                 text_len,
-                                        gpointer              user_data,
-                                        GError              **error);
-
-static void tips_parser_start_markup   (TipsParser   *parser,
-                                        const gchar  *markup_name);
-static void tips_parser_end_markup     (TipsParser   *parser,
-                                        const gchar  *markup_name);
-static void tips_parser_start_unknown  (TipsParser   *parser);
-static void tips_parser_end_unknown    (TipsParser   *parser);
-static void tips_parser_parse_locale   (TipsParser   *parser,
-                                        const gchar **names,
-                                        const gchar **values);
-static void  tips_parser_set_by_locale (TipsParser   *parser,
-                                        gchar       **dest);
+static void      tips_parser_start_element (GMarkupParseContext  *context,
+                                            const gchar          *element_name,
+                                            const gchar         **attribute_names,
+                                            const gchar         **attribute_values,
+                                            gpointer              user_data,
+                                            GError              **error);
+static void      tips_parser_end_element   (GMarkupParseContext  *context,
+                                            const gchar          *element_name,
+                                            gpointer              user_data,
+                                            GError              **error);
+static void      tips_parser_characters    (GMarkupParseContext  *context,
+                                            const gchar          *text,
+                                            gsize                 text_len,
+                                            gpointer              user_data,
+                                            GError              **error);
+
+static void      tips_parser_start_markup  (TipsParser   *parser,
+                                            const gchar  *markup_name);
+static void      tips_parser_end_markup    (TipsParser   *parser,
+                                            const gchar  *markup_name);
+static void      tips_parser_start_unknown (TipsParser   *parser);
+static void      tips_parser_end_unknown   (TipsParser   *parser);
+static void      tips_parser_parse_locale  (TipsParser   *parser,
+                                            const gchar **names,
+                                            const gchar **values);
+static gboolean  tips_parser_set_by_locale (TipsParser   *parser,
+                                            gchar       **dest);
 
 
 static const GMarkupParser markup_parser =
@@ -104,8 +95,8 @@
 
 
 GimpTip *
-gimp_tip_new  (const gchar *format,
-               ...)
+gimp_tip_new (const gchar *format,
+              ...)
 {
   GimpTip *tip;
   va_list  args;
@@ -115,41 +106,19 @@
   tip = g_slice_new0 (GimpTip);
 
   va_start (args, format);
-
-  tip->welcome = g_strdup_vprintf (format, args);
-
+  tip->thetip = g_strdup_vprintf (format, args);
   va_end (args);
 
   return tip;
 }
 
 void
-gimp_tip_set (GimpTip     *tip,
-              const gchar *format,
-              ...)
-{
-  va_list args;
-
-  g_return_if_fail (tip != NULL);
-  g_return_if_fail (format != NULL);
-
-  va_start (args, format);
-
-  g_free (tip->thetip);
-  tip->thetip = g_strdup_vprintf (format, args);
-
-  va_end (args);
-}
-
-void
 gimp_tip_free (GimpTip *tip)
 {
   if (! tip)
     return;
 
-  g_free (tip->welcome);
   g_free (tip->thetip);
-
   g_slice_free (GimpTip, tip);
 }
 
@@ -239,9 +208,13 @@
     {
     case TIPS_START:
       if (strcmp (element_name, "gimp-tips") == 0)
-        parser->state = TIPS_IN_TIPS;
+        {
+          parser->state = TIPS_IN_TIPS;
+        }
       else
-        tips_parser_start_unknown (parser);
+        {
+          tips_parser_start_unknown (parser);
+        }
       break;
 
     case TIPS_IN_TIPS:
@@ -249,35 +222,26 @@
         {
           parser->state = TIPS_IN_TIP;
           parser->current_tip = g_slice_new0 (GimpTip);
-        }
-      else
-        tips_parser_start_unknown (parser);
-      break;
 
-    case TIPS_IN_TIP:
-      if (strcmp (element_name, "welcome") == 0)
-        {
-          parser->state = TIPS_IN_WELCOME;
           tips_parser_parse_locale (parser, attribute_names, attribute_values);
         }
-      else if (strcmp (element_name, "thetip") == 0)
+      else
         {
-          parser->state = TIPS_IN_THETIP;
-          tips_parser_parse_locale (parser, attribute_names, attribute_values);
+          tips_parser_start_unknown (parser);
         }
-      else
-        tips_parser_start_unknown (parser);
       break;
 
-    case TIPS_IN_WELCOME:
-    case TIPS_IN_THETIP:
+    case TIPS_IN_TIP:
       if (strcmp (element_name, "b"  ) == 0 ||
           strcmp (element_name, "big") == 0 ||
           strcmp (element_name, "tt" ) == 0)
-        tips_parser_start_markup (parser, element_name);
+        {
+          tips_parser_start_markup (parser, element_name);
+        }
       else
-        tips_parser_start_unknown (parser);
-      break;
+        {
+           tips_parser_start_unknown (parser);
+        }
 
     case TIPS_IN_UNKNOWN:
       tips_parser_start_unknown (parser);
@@ -304,31 +268,21 @@
       break;
 
     case TIPS_IN_TIP:
-      parser->tips = g_list_prepend (parser->tips, parser->current_tip);
-      parser->current_tip = NULL;
-      parser->state = TIPS_IN_TIPS;
-      break;
-
-    case TIPS_IN_WELCOME:
       if (parser->markup_depth == 0)
         {
-          tips_parser_set_by_locale (parser, &parser->current_tip->welcome);
+          if (tips_parser_set_by_locale (parser, &parser->current_tip->thetip))
+            {
+              parser->tips = g_list_prepend (parser->tips, parser->current_tip);
+              parser->current_tip = NULL;
+            }
           g_string_truncate (parser->value, 0);
-          parser->state = TIPS_IN_TIP;
+
+          parser->state = TIPS_IN_TIPS;
         }
       else
-        tips_parser_end_markup (parser, element_name);
-      break;
-
-    case TIPS_IN_THETIP:
-      if (parser->markup_depth == 0)
         {
-          tips_parser_set_by_locale (parser, &parser->current_tip->thetip);
-          g_string_truncate (parser->value, 0);
-          parser->state = TIPS_IN_TIP;
+          tips_parser_end_markup (parser, element_name);
         }
-      else
-        tips_parser_end_markup (parser, element_name);
       break;
 
     case TIPS_IN_UNKNOWN:
@@ -348,9 +302,8 @@
 
   switch (parser->state)
     {
-    case TIPS_IN_WELCOME:
-    case TIPS_IN_THETIP:
-      if (parser->locale_state != TIPS_LOCALE_MISMATCH)
+    case TIPS_IN_TIP:
+      if (parser->locale_match)
         {
           gint i;
 
@@ -370,6 +323,7 @@
             }
         }
       break;
+
     default:
       break;
     }
@@ -419,15 +373,16 @@
                           const gchar **names,
                           const gchar **values)
 {
-  parser->locale_state = TIPS_LOCALE_NONE;
+  parser->locale_match = (parser->locale == NULL);
 
   while (*names && *values)
     {
       if (strcmp (*names, "xml:lang") == 0 && **values)
         {
-          parser->locale_state = (parser->locale &&
-                                  strcmp (*values, parser->locale) == 0 ?
-                                  TIPS_LOCALE_MATCH : TIPS_LOCALE_MISMATCH);
+          if (parser->locale)
+            parser->locale_match = (strcmp (*values, parser->locale) == 0);
+          else
+            parser->locale_match = FALSE;
         }
 
       names++;
@@ -435,30 +390,16 @@
     }
 }
 
-static void
+static gboolean
 tips_parser_set_by_locale (TipsParser  *parser,
                            gchar      **dest)
 {
-  switch (parser->locale_state)
+  if (parser->locale_match)
     {
-    case TIPS_LOCALE_NONE:
-      if (!parser->locale)
-        {
-          g_free (*dest);
-          *dest = g_strdup (parser->value->str);
-        }
-      else if (*dest == NULL)
-        {
-          *dest = g_strdup (parser->value->str);
-        }
-      break;
-
-    case TIPS_LOCALE_MATCH:
       g_free (*dest);
       *dest = g_strdup (parser->value->str);
-      break;
-
-    case TIPS_LOCALE_MISMATCH:
-      break;
+      return TRUE;
     }
+
+  return FALSE;
 }

Modified: trunk/app/dialogs/tips-parser.h
==============================================================================
--- trunk/app/dialogs/tips-parser.h	(original)
+++ trunk/app/dialogs/tips-parser.h	Thu Mar 27 21:02:15 2008
@@ -2,7 +2,7 @@
  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  *
  * tips-parser.h -- Parse the gimp-tips.xml file.
- * Copyright (C) 2002  Sven Neumann <sven gimp org>
+ * Copyright (C) 2002, 2008  Sven Neumann <sven gimp org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -27,7 +27,6 @@
 
 struct _GimpTip
 {
-  gchar *welcome;
   gchar *thetip;
 };
 

Modified: trunk/data/tips/gimp-tips.dtd
==============================================================================
--- trunk/data/tips/gimp-tips.dtd	(original)
+++ trunk/data/tips/gimp-tips.dtd	Thu Mar 27 21:02:15 2008
@@ -1,18 +1,13 @@
 <!-- Simple DTD for GIMP tips -->
 
-<!ELEMENT gimp-tips (tip+)>
+<!ENTITY % markup "(#PCDATA|b|big|tt)*" >
 
-<!ELEMENT tip (welcome*, thetip+)>
-<!ATTLIST tip level (start|beginner|intermediate|advanced) #REQUIRED>
+<!ELEMENT gimp-tips (tip+) >
 
-<!ENTITY % markup "(#PCDATA|b|big|tt)*">
+<!ELEMENT tip %markup; >
+<!ATTLIST tip level (start|beginner|intermediate|advanced) #REQUIRED
+	      xml:lang CDATA #IMPLIED >
 
-<!ELEMENT b %markup;>
-<!ELEMENT big %markup;>
-<!ELEMENT tt %markup;>
-
-<!ELEMENT welcome %markup;>
-<!ATTLIST welcome xml:lang CDATA #IMPLIED>
-
-<!ELEMENT thetip %markup;>
-<!ATTLIST thetip xml:lang CDATA #IMPLIED>
+<!ELEMENT b %markup; >
+<!ELEMENT big %markup; >
+<!ELEMENT tt %markup; >

Modified: trunk/data/tips/gimp-tips.xml.in
==============================================================================
--- trunk/data/tips/gimp-tips.xml.in	(original)
+++ trunk/data/tips/gimp-tips.xml.in	Thu Mar 27 21:02:15 2008
@@ -3,264 +3,186 @@
 
 <gimp-tips>
 
-<!-- This is a list of tips for GIMP.  Every time GIMP is                  -->
-<!-- started, one tip will be selected from this file and will be          -->
-<!-- displayed in the "Tip of the day" dialog.                             -->
-<!--                                                                       -->
-<!-- Tips in this file have been contributed by Zachary Beane, Mo Oishi,   -->
-<!-- Raphael Quinet, Sven Neumann, Carey Bunks and other people on the     -->
-<!-- gimp mailing lists and newsgroup (comp.graphics.apps.gimp).           -->
+<!-- This is a list of tips for GIMP.                                      -->
 <!--                                                                       -->
 <!-- The tips parser supports a very basic markup language. You may use    -->
 <!-- the tag b to specify bold text, big to increase the font size and     -->
 <!-- tt to switch to a monospace font.                                     -->
 
-<!--                                                                       -->
-<!-- The first tip should be a welcome message, because this is the        -->
-<!-- first thing that a new user will see.                                 -->
-<!--                                                                       -->
-
-  <tip level="start">
-    <_welcome>
-      <big>Welcome to the GNU Image Manipulation Program!</big>
-    </_welcome>
-    <_thetip>
-      GIMP allows you to undo most changes to the image, so feel free
-      to experiment.
-    </_thetip>
-  </tip>
 
 <!--                                                                       -->
 <!-- Tips for beginners start here                                         -->
 <!-- (for people who are not familiar yet with layers and image formats)   -->
 <!--                                                                       -->
 
-  <tip level="beginner">
-    <_thetip>
-      You can get context-sensitive help for most of GIMP's features by
-      pressing the F1 key at any time.  This also works inside the menus.
-    </_thetip>
-  </tip>
-  <tip level="beginner">
-    <_thetip>
-      GIMP uses layers to let you organize your image.  Think of them
-      as a stack of slides or filters, such that looking through them you
-      see a composite of their contents.
-    </_thetip>
-  </tip>
-  <tip level="beginner">
-    <_thetip>
-      You can perform many layer operations by right-clicking on the text
-      label of a layer in the Layers dialog.
-    </_thetip>
-  </tip>
-  <tip level="beginner">
-    <_thetip>
-      When you save an image to work on it again later, try using XCF,
-      GIMP's native file format (use the file extension <tt>.xcf</tt>).
-      This preserves the layers and every aspect of your work-in-progress.
-      Once a project is completed, you can save it as JPEG, PNG, GIF, ...
-    </_thetip>
-  </tip>
-  <tip level="beginner">
-    <_thetip>
-      Most plug-ins work on the current layer of the current image.  In
-      some cases, you will have to merge all layers (ImageâFlatten Image)
-      if you want the plug-in to work on the whole image.
-    </_thetip>
-  </tip>
-  <tip level="beginner">
-    <_thetip>
-      If a layer's name in the Layers dialog is displayed in <b>bold</b>,
-      this layer doesn't have an alpha-channel. You can add an alpha-channel
-      using LayerâTransparencyâAdd Alpha Channel.
-    </_thetip>
-  </tip>
-  <tip level="beginner">
-    <_thetip>
-      Not all effects can be applied to all kinds of images.  This is
-      indicated by a grayed-out menu-entry.  You may need to change
-      the image mode to RGB (ImageâModeâRGB), add an alpha-channel
-      (LayerâTransparencyâAdd Alpha Channel) or flatten it
-      (ImageâFlatten Image).
-    </_thetip>
-  </tip>
-  <tip level="beginner">
-    <_thetip>
-      You can adjust or move a selection by using <tt>Alt</tt>-drag.
-      If this makes the window move, your window manager uses the
-      <tt>Alt</tt> key already.  Most window managers can be
-      configured to ignore the <tt>Alt</tt> key or to use
-      the <tt>Super</tt> key (or "Windows logo") instead.
-    </_thetip>
-  </tip>
+  <_tip level="beginner">
+    You can get context-sensitive help for most of GIMP's features by
+    pressing the F1 key at any time.  This also works inside the menus.
+  </_tip>
+  <_tip level="beginner">
+    GIMP uses layers to let you organize your image.  Think of them
+    as a stack of slides or filters, such that looking through them you
+    see a composite of their contents.
+  </_tip>
+  <_tip level="beginner">
+    You can perform many layer operations by right-clicking on the text
+    label of a layer in the Layers dialog.
+  </_tip>
+  <_tip level="beginner">
+    When you save an image to work on it again later, try using XCF,
+    GIMP's native file format (use the file extension <tt>.xcf</tt>).
+    This preserves the layers and every aspect of your work-in-progress.
+    Once a project is completed, you can save it as JPEG, PNG, GIF, ...
+  </_tip>
+  <_tip level="beginner">
+    Most plug-ins work on the current layer of the current image.  In
+    some cases, you will have to merge all layers (ImageâFlatten Image)
+    if you want the plug-in to work on the whole image.
+  </_tip>
+  <_tip level="beginner">
+    If a layer's name in the Layers dialog is displayed in <b>bold</b>,
+    this layer doesn't have an alpha-channel. You can add an alpha-channel
+    using LayerâTransparencyâAdd Alpha Channel.
+  </_tip>
+  <_tip level="beginner">
+    Not all effects can be applied to all kinds of images.  This is
+    indicated by a grayed-out menu-entry.  You may need to change
+    the image mode to RGB (ImageâModeâRGB), add an alpha-channel
+    (LayerâTransparencyâAdd Alpha Channel) or flatten it
+    (ImageâFlatten Image).
+  </_tip>
+  <_tip level="beginner">
+    You can adjust or move a selection by using <tt>Alt</tt>-drag.
+    If this makes the window move, your window manager uses the
+    <tt>Alt</tt> key already.  Most window managers can be
+    configured to ignore the <tt>Alt</tt> key or to use
+    the <tt>Super</tt> key (or "Windows logo") instead.
+  </_tip>
 
 <!--                                                                       -->
 <!-- Tips for intermediate users start here                                -->
 <!--                                                                       -->
 
-  <tip level="intermediate">
-    <_thetip>
-      You can drag and drop many things in GIMP.  For example, dragging
-      a color from the toolbox or from a color palette and dropping it into
-      an image will fill the current selection with that color.
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      You can use the middle mouse button to pan around the image 
-      (or optionally hold <tt>Spacebar</tt> while you move the mouse).
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      Click and drag on a ruler to place a guide on an image.  All
-      dragged selections will snap to the guides.  You can remove
-      guides by dragging them off the image with the Move tool.
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      You can drag a layer from the Layers dialog and drop it onto the
-      toolbox.  This will create a new image containing only that layer.
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      A floating selection must be anchored to a new layer or to the last
-      active layer before doing other operations on the image.  Click on the
-      &quot;New Layer&quot; or the &quot;Anchor Layer&quot; button in the
-      Layers dialog, or use the menus to do the same.
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      GIMP supports gzip compression on the fly.  Just add <tt>.gz</tt>
-      (or <tt>.bz2</tt>, if you have bzip2 installed) to the filename and
-      your image will be saved compressed.  Of course loading compressed
-      images works too.
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      Pressing and holding the <tt>Shift</tt> key before making a selection
-      allows you to add to the current selection instead of replacing it.
-      Using <tt>Ctrl</tt> before making a selection subtracts from the
-      current one.
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      You can draw simple squares or circles using EditâStroke Selection.
-      It strokes the edge of your current selection. More complex shapes
-      can be drawn using the Path tool or with FiltersâRenderâGfig.
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      If you stroke a path (EditâStroke Path), the paint tools can
-      be used with their current settings.  You can use the Paintbrush in
-      gradient mode or even the Eraser or the Smudge tool.
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      You can create and edit complex selections using the Path tool.
-      The Paths dialog allows you to work on multiple paths and to convert
-      them to selections.
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      You can use the paint tools to change the selection.  Click on the
-      &quot;Quick Mask&quot; button at the bottom left of an image window.
-      Change your selection by painting in the image and click on the button
-      again to convert it back to a normal selection.
-    </_thetip>
-  </tip>
-  <tip level="intermediate">
-    <_thetip>
-      You can save a selection to a channel (SelectâSave to Channel) and
-      then modify this channel with any paint tools.  Using the buttons in
-      the Channels dialog, you can toggle the visibility of this new channel
-      or convert it to a selection.
-    </_thetip>
-  </tip>
+  <_tip level="intermediate">
+    You can drag and drop many things in GIMP.  For example, dragging
+    a color from the toolbox or from a color palette and dropping it into
+    an image will fill the current selection with that color.
+  </_tip>
+  <_tip level="intermediate">
+    You can use the middle mouse button to pan around the image 
+    (or optionally hold <tt>Spacebar</tt> while you move the mouse).
+  </_tip>
+  <_tip level="intermediate">
+    Click and drag on a ruler to place a guide on an image.  All
+    dragged selections will snap to the guides.  You can remove
+    guides by dragging them off the image with the Move tool.
+  </_tip>
+  <_tip level="intermediate">
+    You can drag a layer from the Layers dialog and drop it onto the
+    toolbox.  This will create a new image containing only that layer.
+  </_tip>
+  <_tip level="intermediate">
+    A floating selection must be anchored to a new layer or to the last
+    active layer before doing other operations on the image.  Click on the
+    &quot;New Layer&quot; or the &quot;Anchor Layer&quot; button in the
+    Layers dialog, or use the menus to do the same.
+  </_tip>
+  <_tip level="intermediate">
+    GIMP supports gzip compression on the fly.  Just add <tt>.gz</tt>
+    (or <tt>.bz2</tt>, if you have bzip2 installed) to the filename and
+    your image will be saved compressed.  Of course loading compressed
+    images works too.
+  </_tip>
+  <_tip level="intermediate">
+    Pressing and holding the <tt>Shift</tt> key before making a selection
+    allows you to add to the current selection instead of replacing it.
+    Using <tt>Ctrl</tt> before making a selection subtracts from the
+    current one.
+  </_tip>
+  <_tip level="intermediate">
+    You can draw simple squares or circles using EditâStroke Selection.
+    It strokes the edge of your current selection. More complex shapes
+    can be drawn using the Path tool or with FiltersâRenderâGfig.
+  </_tip>
+  <_tip level="intermediate">
+    If you stroke a path (EditâStroke Path), the paint tools can
+    be used with their current settings.  You can use the Paintbrush in
+    gradient mode or even the Eraser or the Smudge tool.
+  </_tip>
+  <_tip level="intermediate">
+    You can create and edit complex selections using the Path tool.
+    The Paths dialog allows you to work on multiple paths and to convert
+    them to selections.
+  </_tip>
+  <_tip level="intermediate">
+    You can use the paint tools to change the selection.  Click on the
+    &quot;Quick Mask&quot; button at the bottom left of an image window.
+    Change your selection by painting in the image and click on the button
+    again to convert it back to a normal selection.
+  </_tip>
+  <_tip level="intermediate">
+    You can save a selection to a channel (SelectâSave to Channel) and
+    then modify this channel with any paint tools.  Using the buttons in
+    the Channels dialog, you can toggle the visibility of this new channel
+    or convert it to a selection.
+  </_tip>
 
 <!--                                                                       -->
 <!-- Tips for advanced users start here                                    -->
 <!-- (this is mostly for learning shortcut keys)                           -->
 <!--                                                                       -->
 
-  <tip level="advanced">
-    <_thetip>
-      After you enabled &quot;Dynamic Keyboard Shortcuts&quot; in the
-      Preferences dialog, you can reassign shortcut keys. Do so by bringing
-      up the menu, selecting a menu item, and pressing the desired key
-      combination. If &quot;Save Keyboard Shortcuts&quot; is enabled, the
-      key bindings are saved when you exit GIMP.
-      You should probably disable &quot;Dynamic Keyboard Shortcuts&quot; 
-      afterwards, to prevent accidentally assigning/reassigning shortcuts.
-    </_thetip>
-  </tip>
-  <tip level="advanced">
-    <_thetip>
-      If your screen is too cluttered, you can press <tt>Tab</tt> 
-      in an image window to toggle the visibility of the toolbox 
-      and other dialogs.
-    </_thetip>
-  </tip>
-  <tip level="advanced">
-    <_thetip>
-      <tt>Shift</tt>-click on the eye icon in the Layers dialog to hide all
-      layers but that one.  <tt>Shift</tt>-click again to show all layers.
-    </_thetip>
-  </tip>
-  <tip level="advanced">
-    <_thetip>
-      <tt>Ctrl</tt>-clicking on the layer mask's preview in the Layers dialog
-      toggles the effect of the layer mask. <tt>Alt</tt>-clicking on the layer 
-      mask's preview in the Layers dialog toggles viewing the mask directly.
-    </_thetip>
-  </tip>
-  <tip level="advanced">
-    <_thetip>
-      You can use <tt>Ctrl</tt>-<tt>Tab</tt> to cycle through all layers in
-      an image (if your window manager doesn't trap those keys...).
-    </_thetip>
-  </tip>
-  <tip level="advanced">
-    <_thetip>
-      <tt>Ctrl</tt>-click with the Bucket Fill tool to have it use
-      the background color instead of the foreground color.
-      Similarly, <tt>Ctrl</tt>-clicking with the eyedropper tool 
-      sets the background color instead of the foreground color.
-    </_thetip>
-  </tip>
-  <tip level="advanced">
-    <_thetip>
-      <tt>Ctrl</tt>-drag with the Rotate tool will constrain the
-      rotation to 15 degree angles.
-    </_thetip>
-  </tip>
-  <tip level="advanced">
-    <_thetip>
-      To create a circle-shaped selection, hold <tt>Shift</tt> while
-      doing an ellipse select. To place a circle precisely, drag
-      horizontal and vertical guides tangent to the circle you want to
-      select, place your cursor at the intersection of the guides, and
-      the resulting selection will just touch the guides.
-    </_thetip>
-  </tip>
-  <tip level="advanced">
-    <_thetip>
-      If some of your scanned photos do not look colorful enough, you
-      can easily improve their tonal range with the &quot;Auto&quot;
-      button in the Levels tool (ColorsâLevels).  If there are any
-      color casts, you can correct them with the Curves tool
-      (ColorsâCurves).
-    </_thetip>
-  </tip>
+  <_tip level="advanced">
+    After you enabled &quot;Dynamic Keyboard Shortcuts&quot; in the
+    Preferences dialog, you can reassign shortcut keys. Do so by bringing
+    up the menu, selecting a menu item, and pressing the desired key
+    combination. If &quot;Save Keyboard Shortcuts&quot; is enabled, the
+    key bindings are saved when you exit GIMP.
+    You should probably disable &quot;Dynamic Keyboard Shortcuts&quot; 
+    afterwards, to prevent accidentally assigning/reassigning shortcuts.
+  </_tip>
+  <_tip level="advanced">
+    If your screen is too cluttered, you can press <tt>Tab</tt> 
+    in an image window to toggle the visibility of the toolbox 
+    and other dialogs.
+  </_tip>
+  <_tip level="advanced">
+    <tt>Shift</tt>-click on the eye icon in the Layers dialog to hide all
+    layers but that one.  <tt>Shift</tt>-click again to show all layers.
+  </_tip>
+  <_tip level="advanced">
+    <tt>Ctrl</tt>-clicking on the layer mask's preview in the Layers dialog
+    toggles the effect of the layer mask. <tt>Alt</tt>-clicking on the layer 
+    mask's preview in the Layers dialog toggles viewing the mask directly.
+  </_tip>
+  <_tip level="advanced">
+    You can use <tt>Ctrl</tt>-<tt>Tab</tt> to cycle through all layers in
+    an image (if your window manager doesn't trap those keys...).
+  </_tip>
+  <_tip level="advanced">
+    <tt>Ctrl</tt>-click with the Bucket Fill tool to have it use
+    the background color instead of the foreground color.
+    Similarly, <tt>Ctrl</tt>-clicking with the eyedropper tool 
+    sets the background color instead of the foreground color.
+  </_tip>
+  <_tip level="advanced">
+    <tt>Ctrl</tt>-drag with the Rotate tool will constrain the
+    rotation to 15 degree angles.
+  </_tip>
+  <_tip level="advanced">
+    To create a circle-shaped selection, hold <tt>Shift</tt> while
+    doing an ellipse select. To place a circle precisely, drag
+    horizontal and vertical guides tangent to the circle you want to
+    select, place your cursor at the intersection of the guides, and
+    the resulting selection will just touch the guides.
+  </_tip>
+  <_tip level="advanced">
+    If some of your scanned photos do not look colorful enough, you
+    can easily improve their tonal range with the &quot;Auto&quot;
+    button in the Levels tool (ColorsâLevels).  If there are any
+    color casts, you can correct them with the Curves tool
+    (ColorsâCurves).
+  </_tip>
 
 <!--                                                                       -->
 <!-- (end of tips)                                                         -->



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]