[dia/dia-next: 32/59] Colour & LineWidth areas as 'real' widgets



commit 1b97e3bc3ed5e38d34b3ab772ee8127af2bb280e
Author: Zander Brown <zbrown gnome org>
Date:   Fri Dec 28 00:42:48 2018 +0000

    Colour & LineWidth areas as 'real' widgets

 app/Makefile.am                                 |   8 +-
 app/color_area.c                                | 415 ------------------------
 app/dia-colour-area.c                           | 280 ++++++++++++++++
 app/{color_area.h => dia-colour-area.h}         |  26 +-
 app/dia-line-width-area.c                       | 260 +++++++++++++++
 app/{linewidth_area.h => dia-line-width-area.h} |  14 +-
 app/linewidth_area.c                            | 262 ---------------
 app/toolbox.c                                   |   8 +-
 8 files changed, 583 insertions(+), 690 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index 7c05f03f..8b474176 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -131,10 +131,10 @@ dia_core_files = \
        display.h \
        select.c \
        select.h \
-       color_area.c \
-       color_area.h \
-       linewidth_area.c \
-       linewidth_area.h \
+       dia-colour-area.c \
+       dia-colour-area.h \
+       dia-line-width-area.c \
+       dia-line-width-area.h \
        grid.c \
        grid.h \
        handle_ops.c \
diff --git a/app/dia-colour-area.c b/app/dia-colour-area.c
new file mode 100644
index 00000000..5848608c
--- /dev/null
+++ b/app/dia-colour-area.c
@@ -0,0 +1,280 @@
+/* Dia -- an diagram creation/manipulation program
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (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
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include "intl.h"
+
+#include "dia-colour-area.h"
+#include "attributes.h"
+#include "persistence.h"
+
+#define FORE_AREA 0
+#define BACK_AREA 1
+#define SWAP_AREA 2
+#define DEF_AREA  3
+
+#define FOREGROUND 0
+#define BACKGROUND 1
+
+G_DEFINE_TYPE (DiaColourArea, dia_colour_area, GTK_TYPE_EVENT_BOX)
+
+/*  Local functions  */
+static int
+dia_colour_area_target (DiaColourArea *self,
+                        int            x,
+                        int            y)
+{
+  gint rect_w, rect_h;
+  gint width, height;
+
+  width = gtk_widget_get_allocated_width (GTK_WIDGET (self));
+  height = gtk_widget_get_allocated_height (GTK_WIDGET (self));
+
+  rect_w = width * 0.65;
+  rect_h = height * 0.65;
+
+  /*  foreground active  */
+  if (x > 0 && x < rect_w &&
+      y > 0 && y < rect_h)
+    return FORE_AREA;
+  else if (x > (width - rect_w) && x < width &&
+           y > (height - rect_h) && y < height)
+    return BACK_AREA;
+  else if (x > 0 && x < (width - rect_w) &&
+           y > rect_h && y < height)
+    return DEF_AREA;
+  else if (x > rect_w && x < width &&
+           y > 0 && y < (height - rect_h))
+    return SWAP_AREA;
+  else
+    return -1;
+}
+
+static gboolean
+dia_colour_area_draw (GtkWidget *self, cairo_t *ctx)
+{
+  GdkRGBA fg, bg;
+  gint rect_w, rect_h;
+  gint width, height;
+  gint img_width, img_height;
+  DiaColourArea *priv = DIA_COLOUR_AREA (self);
+
+  width = gtk_widget_get_allocated_width (self);
+  height = gtk_widget_get_allocated_height (self);
+
+  fg = attributes_get_foreground();
+  bg = attributes_get_background();
+
+  rect_w = width * 0.65;
+  rect_h = height * 0.65;
+
+  gdk_cairo_set_source_rgba (ctx, &bg);
+
+  cairo_rectangle (ctx,
+                   (width - rect_w), (height - rect_h), rect_w, rect_h);
+  cairo_fill (ctx);
+
+  gdk_cairo_set_source_rgba (ctx, &fg);
+  cairo_rectangle (ctx, 0, 0, rect_w, rect_h);
+  cairo_fill (ctx);
+
+  /*  draw the default colours pixmap  */
+  img_width = gdk_pixbuf_get_width (priv->reset);
+  img_height = gdk_pixbuf_get_height (priv->reset);
+  gdk_cairo_set_source_pixbuf (ctx, priv->reset, 0, height - img_height);
+  cairo_rectangle (ctx, 0, height - img_height, img_width, img_height);
+  cairo_fill (ctx);
+
+  /*  draw the swap pixmap  */
+  img_width = gdk_pixbuf_get_width (priv->swap);
+  img_height = gdk_pixbuf_get_height (priv->swap);
+  gdk_cairo_set_source_pixbuf (ctx, priv->swap, width - img_width, 0);
+  cairo_rectangle (ctx, width - img_width, 0, img_width, img_height);
+  cairo_fill (ctx);
+
+  return FALSE;
+}
+
+static void
+dia_colour_area_response (GtkDialog     *chooser,
+                          gint           response,
+                          DiaColourArea *self)
+{
+  if (response == GTK_RESPONSE_OK) {
+    GdkRGBA color;
+
+    gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (chooser), &color);
+
+    if (self->edit_color == FOREGROUND) {
+      attributes_set_foreground (&color);
+    } else {
+      attributes_set_background (&color);
+    }
+  } else {
+    attributes_set_foreground(&self->stored_foreground);
+    attributes_set_background(&self->stored_background);
+  }
+
+  gtk_widget_hide (self->color_select);
+  self->color_select_active = 0;
+
+  /* Trigger redraw */
+  gtk_widget_queue_draw (GTK_WIDGET (self));
+}
+
+static void
+dia_colour_area_edit (DiaColourArea *self)
+{
+  GtkWidget *window;
+  GdkRGBA color;
+
+  if (!self->color_select_active) {
+    self->stored_foreground = attributes_get_foreground();
+    self->stored_background = attributes_get_background();
+  }
+  
+  if (self->active_color == FOREGROUND) {
+    color = attributes_get_foreground();
+    self->edit_color = FOREGROUND;
+  } else {
+    color = attributes_get_background();
+    self->edit_color = BACKGROUND;
+  }
+
+  if (self->color_select) {
+    window = self->color_select;
+
+    gtk_window_set_title (GTK_WINDOW (self->color_select),
+                          self->edit_color == FOREGROUND ?
+                            _("Select foreground color") : _("Select background color"));
+
+    if (!self->color_select_active) {
+      gtk_widget_show (self->color_select);
+    }
+  } else {
+    window = self->color_select = 
+      gtk_color_chooser_dialog_new (self->edit_color == FOREGROUND ?
+                                      _("Select foreground color") : _("Select background color"), 
+                                      GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self))));
+
+    self->color_select_active = 1;
+    gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER (window), TRUE);
+
+    g_signal_connect (G_OBJECT (window), "response",
+                      G_CALLBACK (dia_colour_area_response), self);
+    
+    /* Make sure window is shown before setting its colors: */
+    gtk_widget_show (self->color_select);
+  }
+
+  gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (self->color_select), &color);
+}
+
+static gint
+dia_colour_area_event (GtkWidget *widget,
+                       GdkEvent  *event)
+{
+  DiaColourArea *self = DIA_COLOUR_AREA (widget);
+  GdkEventButton *bevent;
+  int target;
+  
+  switch (event->type) {
+    case GDK_BUTTON_PRESS:
+      bevent = (GdkEventButton *) event;
+
+      if (bevent->button == 1) {
+        switch ((target = dia_colour_area_target (self, bevent->x, bevent->y))) {
+          case FORE_AREA:
+          case BACK_AREA:
+            if (target == self->active_color) {
+              dia_colour_area_edit (self);
+            } else {
+              self->active_color = target;
+              /* Trigger redraw */
+              gtk_widget_queue_draw (GTK_WIDGET (self));
+            }
+            break;
+          case SWAP_AREA:
+            attributes_swap_fgbg();
+            /* Trigger redraw */
+            gtk_widget_queue_draw (GTK_WIDGET (self));
+            break;
+          case DEF_AREA:
+            attributes_default_fgbg();
+            /* Trigger redraw */
+            gtk_widget_queue_draw (GTK_WIDGET (self));
+            break;
+        }
+      }
+      break;
+    
+    default:
+      break;
+  }
+
+  return FALSE;
+}
+
+#include "pixmaps/swap.xpm"
+#include "pixmaps/default.xpm"
+
+static void
+dia_colour_area_class_init (DiaColourAreaClass *class)
+{
+  GtkWidgetClass *widget_class;
+
+  widget_class = GTK_WIDGET_CLASS (class);
+  widget_class->draw = dia_colour_area_draw;
+  widget_class->event = dia_colour_area_event;
+
+  attributes_set_foreground (persistence_register_color ("fg_color", &color_black));
+  attributes_set_background (persistence_register_color ("bg_color", &color_white));
+}
+
+static void
+dia_colour_area_init (DiaColourArea *self)
+{
+  self->reset = gdk_pixbuf_new_from_xpm_data (default_xpm);
+  self->swap = gdk_pixbuf_new_from_xpm_data (swap_xpm);
+
+  self->active_color = 0;
+    
+  self->color_select = NULL;
+  self->color_select_active = 0;
+
+  gtk_widget_set_events (GTK_WIDGET (self), GDK_BUTTON_PRESS_MASK);
+}
+
+GtkWidget *
+dia_colour_area_new (int width,
+                     int height)
+{
+  GtkWidget *event_box;
+
+  event_box = g_object_new (DIA_TYPE_COLOUR_AREA, NULL);
+  gtk_widget_set_size_request (event_box, width, height);
+
+  gtk_widget_show (event_box);
+
+  return event_box;
+}
diff --git a/app/color_area.h b/app/dia-colour-area.h
similarity index 61%
rename from app/color_area.h
rename to app/dia-colour-area.h
index d745732e..1be51757 100644
--- a/app/color_area.h
+++ b/app/dia-colour-area.h
@@ -15,11 +15,29 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
-#ifndef COLOR_AREA_H
-#define COLOR_AREA_H
+#ifndef COLOUR_AREA_H
+#define COLOUR_AREA_H
 
 #include <gtk/gtk.h>
 
-GtkWidget *color_area_create (int width, int height);
+#define DIA_TYPE_COLOUR_AREA (dia_colour_area_get_type ())
+G_DECLARE_FINAL_TYPE (DiaColourArea, dia_colour_area, DIA, COLOUR_AREA, GtkEventBox)
 
-#endif /* COLOR_AREA_H */
+struct _DiaColourArea
+{
+  GtkEventBox parent;
+  int active_color;
+  
+  GdkPixbuf *reset;
+  GdkPixbuf *swap;
+  
+  GtkWidget *color_select;
+  int color_select_active;
+  int edit_color;
+  GdkRGBA stored_foreground;
+  GdkRGBA stored_background;
+};
+
+GtkWidget *dia_colour_area_new (int width, int height);
+
+#endif /* COLOUR_AREA_H */
diff --git a/app/dia-line-width-area.c b/app/dia-line-width-area.c
new file mode 100644
index 00000000..6b0ee5af
--- /dev/null
+++ b/app/dia-line-width-area.c
@@ -0,0 +1,260 @@
+/* Dia -- an diagram creation/manipulation program
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (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
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "dia-line-width-area.h"
+#include "attributes.h"
+#include "persistence.h"
+#include "intl.h"
+
+#if !defined(rint)
+# include <math.h>
+# define rint(x) floor ((x) + 0.5)
+#endif
+
+#define BASE_WIDTH 0.05
+#define PIXELS_BETWEEN_LINES 6
+#define NUMLINES 5
+
+#define X_OFFSET(i) (PIXELS_BETWEEN_LINES*(i)+((i)-1)*(i)/2)
+
+#define AREA_WIDTH X_OFFSET(NUMLINES+1)
+#define AREA_HEIGHT 42
+
+G_DEFINE_TYPE (DiaLineWidthArea, dia_line_width_area, GTK_TYPE_EVENT_BOX)
+
+static int
+linewidth_area_target (int x, int y)
+{
+  int i;
+  int x_offs;
+  for (i=1;i<=NUMLINES;i++) {
+    x_offs = X_OFFSET(i);
+    if ((x>=x_offs-PIXELS_BETWEEN_LINES/2) &&
+        (x<x_offs+i+PIXELS_BETWEEN_LINES/2))
+      return i;
+  }
+  return 0;
+}
+
+static int
+linewidth_number_from_width (real width)
+{
+  if (fabs(width/BASE_WIDTH-rint(width/BASE_WIDTH)) > 0.0005 ||
+      (width/BASE_WIDTH > NUMLINES)) {
+    return 0;
+  } else {
+    return width/BASE_WIDTH+1.0005;
+  }
+}
+
+static void
+dia_line_width_area_dialog_respond (GtkWidget        *widget,
+                                    gint              response_id,
+                                    DiaLineWidthArea *self)
+{
+  if (response_id == GTK_RESPONSE_OK) {
+    float newvalue = gtk_spin_button_get_value (GTK_SPIN_BUTTON (self->button));
+    self->active = linewidth_number_from_width (newvalue);
+    /* Trigger redraw */
+    gtk_widget_queue_draw (self);
+    attributes_set_default_linewidth (newvalue);
+  }
+  gtk_widget_hide(self->dialog);
+}
+
+static void
+dia_line_width_area_dialog_ok (GtkWidget *widget, DiaLineWidthArea *self)
+{
+  gtk_dialog_response (GTK_DIALOG (self->dialog), GTK_RESPONSE_OK);
+}
+
+/* Crashes with gtk_widget_destroyed, so use this instead */
+static void
+dialog_destroyed(GtkWidget *widget, gpointer data)
+{
+  GtkWidget **wid = (GtkWidget**)data;
+  if (wid) *wid = NULL;
+}
+
+static void
+dia_line_width_area_create_dialog (DiaLineWidthArea *self,
+                                   GtkWindow        *toplevel)
+{
+  GtkWidget *hbox;
+  GtkWidget *label;
+  GtkAdjustment *adj;
+
+  self->dialog = gtk_dialog_new_with_buttons (_("Line width"), toplevel, 0,
+                                              _("Cancel"), GTK_RESPONSE_CANCEL,
+                                              _("Okay"), GTK_RESPONSE_OK, 
+                                              NULL);
+  
+  gtk_dialog_set_default_response (GTK_DIALOG(self->dialog), GTK_RESPONSE_OK);
+  gtk_window_set_role (GTK_WINDOW (self->dialog), "linewidth_window");
+  gtk_window_set_resizable (GTK_WINDOW (self->dialog), TRUE);
+  gtk_container_set_border_width (GTK_CONTAINER (self->dialog), 2);
+
+  hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
+  label = gtk_label_new(_("Line width:"));
+  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+  gtk_widget_show (label);
+  adj = (GtkAdjustment *) gtk_adjustment_new(0.1, 0.00, 10.0, 0.01, 0.05, 0.0);
+  self->button = gtk_spin_button_new(adj, attributes_get_default_linewidth(), 2);
+  gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(self->button), TRUE);
+  gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(self->button), TRUE);
+  gtk_box_pack_start(GTK_BOX (hbox), self->button, TRUE, TRUE, 0);
+  gtk_widget_show (self->button);
+  gtk_widget_show(hbox);
+  gtk_box_pack_start (GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG (self->dialog))), hbox, TRUE, TRUE, 0);
+  
+  gtk_widget_show (self->button);
+
+  g_signal_connect(G_OBJECT (self->dialog), "response",
+                   G_CALLBACK (dia_line_width_area_dialog_respond), self);
+  g_signal_connect_after (G_OBJECT (self->button), "activate",
+                   G_CALLBACK (dia_line_width_area_dialog_ok), self);
+
+  g_signal_connect (G_OBJECT (self->dialog), "delete_event",
+                   G_CALLBACK(gtk_widget_hide), NULL);
+  g_signal_connect (G_OBJECT (self->dialog), "destroy",
+                   G_CALLBACK(dialog_destroyed), &self->dialog);
+
+  persistence_register_window (GTK_WINDOW (self->dialog));
+}
+
+static gboolean
+dia_line_width_area_draw (GtkWidget *self, cairo_t *ctx)
+{
+  GdkRGBA fg;
+  int width, height;
+  int i;
+  int x_offs;
+  GtkStyle *style;
+  double dashes[] = { 3 };
+  DiaLineWidthArea *priv = DIA_LINE_WIDTH_AREA (self);
+
+  cairo_set_line_width (ctx, 1);
+  cairo_set_line_cap (ctx, CAIRO_LINE_CAP_BUTT);
+  cairo_set_line_join (ctx, CAIRO_LINE_JOIN_MITER);
+  cairo_set_dash (ctx, dashes, 1, 0);
+
+  width = gtk_widget_get_allocated_width (self);
+  height = gtk_widget_get_allocated_height (self);
+
+  style = gtk_widget_get_style (self);
+
+  gtk_style_context_get_color (gtk_widget_get_style_context (self),
+                               gtk_widget_get_state_flags (self),
+                               &fg);
+
+  gdk_cairo_set_source_rgba (ctx, &fg);
+  
+  for (i = 0; i <= NUMLINES; i++) {
+    x_offs = X_OFFSET(i);
+
+    cairo_rectangle (ctx, x_offs, 2, i, height - 4);
+    cairo_fill (ctx);
+  }
+  
+  if (priv->active != 0) {
+    cairo_rectangle (ctx, X_OFFSET(priv->active) - 2, 0,
+                          priv->active + 4, height - 1);
+    cairo_stroke (ctx);
+  }
+
+  return FALSE;
+}
+
+static gint
+dia_line_width_area_event (GtkWidget *self,
+                           GdkEvent  *event)
+{
+  GdkEventButton *bevent;
+  GdkEventConfigure *cevent;
+  int target;
+  DiaLineWidthArea *priv = DIA_LINE_WIDTH_AREA (self);
+  
+  switch (event->type)
+    {
+    case GDK_BUTTON_PRESS:
+      bevent = (GdkEventButton *) event;
+      if (bevent->button == 1) {
+        target = linewidth_area_target (bevent->x, bevent->y);
+        if (target != 0) {
+          priv->active = target;
+          /* Trigger redraw */
+          gtk_widget_queue_draw (self);
+          attributes_set_default_linewidth(BASE_WIDTH*(target-1));
+        }
+      }
+      break;
+
+    case GDK_2BUTTON_PRESS:
+      if (priv->dialog == NULL)
+        dia_line_width_area_create_dialog (priv, GTK_WINDOW (gtk_widget_get_toplevel (self)));
+      else
+        gtk_widget_grab_focus (priv->button);
+      gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->button), attributes_get_default_linewidth ());
+
+      gtk_widget_show (priv->dialog);
+      break;
+
+    default:
+      break;
+    }
+
+  return FALSE;
+}
+
+static void
+dia_line_width_area_class_init (DiaLineWidthAreaClass *class)
+{
+  GtkWidgetClass *widget_class;
+
+  widget_class = GTK_WIDGET_CLASS (class);
+  widget_class->draw = dia_line_width_area_draw;
+  widget_class->event = dia_line_width_area_event;
+
+  attributes_set_default_linewidth (persistence_register_real ("linewidth", 0.1));
+}
+
+static void
+dia_line_width_area_init (DiaLineWidthArea *self)
+{
+  self->active = linewidth_number_from_width (attributes_get_default_linewidth ());
+
+  gtk_widget_set_events (GTK_WIDGET (self), GDK_BUTTON_PRESS_MASK);
+}
+
+
+GtkWidget *
+dia_line_width_area_new ()
+{
+  GtkWidget *event_box;
+
+  event_box = g_object_new (DIA_TYPE_LINE_WIDTH_AREA, NULL);
+  gtk_widget_set_size_request (event_box, AREA_WIDTH, AREA_HEIGHT);
+
+  gtk_widget_show (event_box);
+
+  return event_box;
+}
diff --git a/app/linewidth_area.h b/app/dia-line-width-area.h
similarity index 74%
rename from app/linewidth_area.h
rename to app/dia-line-width-area.h
index d32b037f..33eb7d10 100644
--- a/app/linewidth_area.h
+++ b/app/dia-line-width-area.h
@@ -20,7 +20,19 @@
 
 #include <gtk/gtk.h>
 
-GtkWidget *linewidth_area_create (void);
+#define DIA_TYPE_LINE_WIDTH_AREA (dia_line_width_area_get_type ())
+G_DECLARE_FINAL_TYPE (DiaLineWidthArea, dia_line_width_area, DIA, LINE_WIDTH_AREA, GtkEventBox)
+
+struct _DiaLineWidthArea
+{
+  GtkEventBox parent;
+
+  int active;
+  GtkWidget *dialog;
+  GtkWidget *button;
+};
+
+GtkWidget *dia_line_width_area_new ();
 
 
 #endif /* LINEWDITH_AREA_H */
diff --git a/app/toolbox.c b/app/toolbox.c
index ec1bc29f..52d297bc 100644
--- a/app/toolbox.c
+++ b/app/toolbox.c
@@ -26,13 +26,13 @@
 #include "diadynamicmenu.h"
 #include "attributes.h"
 #include "sheet.h"
-#include "color_area.h"
+#include "dia-colour-area.h"
+#include "dia-line-width-area.h"
 #include "intl.h"
 #include "message.h"
 #include "object.h"
 #include "widgets.h"
 
-#include "linewidth_area.h"
 #include "preferences.h"
 #include "persistence.h"
 
@@ -550,7 +550,7 @@ create_color_area (GtkWidget *parent)
   alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
   gtk_container_set_border_width (GTK_CONTAINER (alignment), 3);
   
-  col_area = color_area_create (54, 42);
+  col_area = dia_colour_area_new (54, 42);
   gtk_container_add (GTK_CONTAINER (alignment), col_area);
 
 
@@ -568,7 +568,7 @@ create_color_area (GtkWidget *parent)
   alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
   gtk_container_set_border_width (GTK_CONTAINER (alignment), 3);
   
-  line_area = linewidth_area_create ();
+  line_area = dia_line_width_area_new ();
   gtk_container_add (GTK_CONTAINER (alignment), line_area);
   gtk_box_pack_start (GTK_BOX (hbox), alignment, TRUE, TRUE, 0);
   gtk_widget_set_tooltip_text(line_area, _("Line widths.  Click on a line to set the default line width for 
new objects.  Double-click to set the line width more precisely."));


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