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

gEDA-cvs: pcb.git: branch: master updated (6438ea7a47f0179564644cf5aa570bda70c07661)



The branch, master has been updated
       via  6438ea7a47f0179564644cf5aa570bda70c07661 (commit)
       via  939be83ee0e40ee61644917cc135697b7f7e3263 (commit)
       via  0455a344b71347bc664faad1a3c57197c44da909 (commit)
       via  aa01ed6e4c80b4d56d711f954cfb0ebd04bec403 (commit)
      from  04d8ae5526d9d2660572972d0cbeaf0ec53a8878 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/hid/gtk/gui-output-events.c |   12 +++++--
 src/hid/gtk/gui-utils.c         |   63 +--------------------------------------
 src/hid/gtk/gui.h               |    6 ----
 3 files changed, 10 insertions(+), 71 deletions(-)


=================
 Commit Messages
=================

commit 6438ea7a47f0179564644cf5aa570bda70c07661
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Track previous state of crosshair attachements when undrawing
    
    For correctness - this doesn't necessarily fix any rendering bugs.

:100644 100644 7230aa3... 7cc764e... M	src/hid/gtk/gui-output-events.c

commit 939be83ee0e40ee61644917cc135697b7f7e3263
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Simplify ghid_draw_area_update()
    
    If the rect passed is NULL, we can simply pass that on to
    gdk_window_invalidate_rect() which will invalidate the whole area.

:100644 100644 1902c62... 3d93d19... M	src/hid/gtk/gui-utils.c

commit 0455a344b71347bc664faad1a3c57197c44da909
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Remove unused functions relating to string display
    
    Removes ghid_string_markup_extents() and ghid_string_markup()

:100644 100644 5b85111... 1902c62... M	src/hid/gtk/gui-utils.c
:100644 100644 0a2e747... 7686106... M	src/hid/gtk/gui.h

commit aa01ed6e4c80b4d56d711f954cfb0ebd04bec403
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Remove unused ghid_draw_area_clear() function

:100644 100644 b72b82d... 5b85111... M	src/hid/gtk/gui-utils.c

=========
 Changes
=========

commit 6438ea7a47f0179564644cf5aa570bda70c07661
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Track previous state of crosshair attachements when undrawing
    
    For correctness - this doesn't necessarily fix any rendering bugs.

diff --git a/src/hid/gtk/gui-output-events.c b/src/hid/gtk/gui-output-events.c
index 7230aa3..7cc764e 100644
--- a/src/hid/gtk/gui-output-events.c
+++ b/src/hid/gtk/gui-output-events.c
@@ -407,6 +407,7 @@ ghid_show_crosshair (gboolean show)
 {
   gint x, y;
   static gint x_prev = -1, y_prev = -1;
+  static gboolean draw_markers, draw_markers_prev = FALSE;
   static GdkGC *xor_gc;
   static GdkColor cross_color;
 
@@ -429,7 +430,7 @@ ghid_show_crosshair (gboolean show)
   if (x_prev >= 0)
     {
       draw_crosshair (xor_gc, x_prev, y_prev);
-      if (ghidgui->auto_pan_on && have_crosshair_attachments ())
+      if (draw_markers_prev)
 	{
 	  gdk_draw_rectangle (gport->drawing_area->window, xor_gc, TRUE,
 			      0, y_prev - VCD, VCD, VCW);
@@ -445,7 +446,8 @@ ghid_show_crosshair (gboolean show)
   if (x >= 0 && show)
     {
       draw_crosshair (xor_gc, x, y);
-      if (ghidgui->auto_pan_on && have_crosshair_attachments ())
+      draw_markers = ghidgui->auto_pan_on && have_crosshair_attachments ();
+      if (draw_markers)
 	{
 	  gdk_draw_rectangle (gport->drawing_area->window, xor_gc, TRUE,
 			      0, y - VCD, VCD, VCW);
@@ -458,9 +460,13 @@ ghid_show_crosshair (gboolean show)
 	}
       x_prev = x;
       y_prev = y;
+      draw_markers_prev = draw_markers;
     }
   else
-    x_prev = y_prev = -1;
+    {
+      x_prev = y_prev = -1;
+      draw_markers_prev = FALSE;
+    }
 }
 
 static gboolean

commit 939be83ee0e40ee61644917cc135697b7f7e3263
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Simplify ghid_draw_area_update()
    
    If the rect passed is NULL, we can simply pass that on to
    gdk_window_invalidate_rect() which will invalidate the whole area.

diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index 1902c62..3d93d19 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -152,19 +152,7 @@ ghid_button_state (GdkModifierType * state)
 void
 ghid_draw_area_update (GHidPort * port, GdkRectangle * rect)
 {
-  GdkRectangle update_rect;
-
-  if (rect)
-    update_rect = *rect;
-  else
-    {
-      update_rect.x = 0;
-      update_rect.y = 0;
-      update_rect.width = port->width;
-      update_rect.height = port->height;
-    }
-  gdk_window_invalidate_rect (port->drawing_area->window, &update_rect,
-			      FALSE);
+  gdk_window_invalidate_rect (port->drawing_area->window, rect, FALSE);
 }
 
 

commit 0455a344b71347bc664faad1a3c57197c44da909
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Remove unused functions relating to string display
    
    Removes ghid_string_markup_extents() and ghid_string_markup()

diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index 5b85111..1902c62 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -168,42 +168,6 @@ ghid_draw_area_update (GHidPort * port, GdkRectangle * rect)
 }
 
 
-void
-ghid_string_markup_extents (PangoFontDescription * font_desc, gchar * string,
-			    gint * width, gint * height)
-{
-  PangoLayout *layout;
-  gint w, h;
-  GHidPort *out = &ghid_port;
-
-  layout = gtk_widget_create_pango_layout (out->top_window, NULL);
-  pango_layout_set_font_description (layout, font_desc);
-  pango_layout_set_markup (layout, string, strlen (string));
-  pango_layout_get_pixel_size (layout, &w, &h);
-  g_object_unref (layout);
-
-  if (*width)
-    *width = w;
-  if (*height)
-    *height = h;
-}
-
-void
-ghid_draw_string_markup (GdkDrawable * drawable,
-			 PangoFontDescription * font_desc,
-			 GdkGC * gc, gint x, gint y, gchar * string)
-{
-  PangoLayout *layout;
-  GHidPort *out = &ghid_port;
-
-  layout = gtk_widget_create_pango_layout (out->top_window, NULL);
-  pango_layout_set_font_description (layout, font_desc);
-  pango_layout_set_markup (layout, string, strlen (string));
-  gdk_draw_layout (drawable, gc, x, y, layout);
-  g_object_unref (layout);
-}
-
-
 gchar *
 ghid_get_color_name (GdkColor * color)
 {
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 0a2e747..7686106 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -377,12 +377,6 @@ gboolean ghid_mod1_is_pressed (void);
 gboolean ghid_shift_is_pressed (void);
 
 void ghid_draw_area_update (GHidPort * out, GdkRectangle * rect);
-void ghid_string_markup_extents (PangoFontDescription * font_desc,
-				 gchar * string, gint * width, gint * height);
-void ghid_draw_string_markup (GdkDrawable * drawable,
-			      PangoFontDescription * font_desc,
-			      GdkGC * gc, gint x, gint y, gchar * string);
-
 gchar *ghid_get_color_name (GdkColor * color);
 void ghid_map_color_string (gchar * color_string, GdkColor * color);
 void ghid_button_set_text (GtkWidget * button, gchar * text);

commit aa01ed6e4c80b4d56d711f954cfb0ebd04bec403
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Remove unused ghid_draw_area_clear() function

diff --git a/src/hid/gtk/gui-utils.c b/src/hid/gtk/gui-utils.c
index b72b82d..5b85111 100644
--- a/src/hid/gtk/gui-utils.c
+++ b/src/hid/gtk/gui-utils.c
@@ -149,19 +149,6 @@ ghid_button_state (GdkModifierType * state)
   return bs;
 }
 
-#ifdef FIXME
-void
-ghid_draw_area_clear (GHidPort * out, gboolean to_screen)
-{
-  gdk_gc_set_foreground (out->bgGC, &Settings.BackgroundColor);
-  gdk_draw_rectangle (out->pixmap, out->bgGC, TRUE,
-		      0, 0, out->Width, out->Height);
-  if (to_screen)
-    gdk_draw_rectangle (out->drawing_area->window, out->bgGC, TRUE,
-			0, 0, out->Width, out->Height);
-}
-#endif /* FIXME */
-
 void
 ghid_draw_area_update (GHidPort * port, GdkRectangle * rect)
 {




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs