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

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



The branch, master has been updated
       via  ce34fefde11f0b617e1291b27a65aeebe6d3bf6d (commit)
      from  0809a6ec7d32e4acec5a6fcaca8a9fd8ab63e51a (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/gtkhid-gl.c          |   22 ++++++++++++++--------
 src/hid/gtk/gui-drc-window.c     |    7 +++++--
 src/hid/gtk/gui-keyref-window.c  |    7 +++++--
 src/hid/gtk/gui-library-window.c |    7 +++++--
 src/hid/gtk/gui-log-window.c     |    7 +++++--
 src/hid/gtk/gui-netlist-window.c |    5 ++++-
 src/hid/gtk/gui-top-window.c     |   11 +++++++----
 7 files changed, 45 insertions(+), 21 deletions(-)


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

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

    hid/gtk: Use gtk_widget_get_allocation() accessor
    
    In GTK3.0, direct access to widget->allocation will be impossible.

:100644 100644 13c45b0... f5a99a9... M	src/hid/gtk/gtkhid-gl.c
:100644 100644 5972467... e7f5c46... M	src/hid/gtk/gui-drc-window.c
:100644 100644 801d6d7... 6eaf3eb... M	src/hid/gtk/gui-keyref-window.c
:100644 100644 0339cf0... 2cda08e... M	src/hid/gtk/gui-library-window.c
:100644 100644 5f6d58f... 41571e0... M	src/hid/gtk/gui-log-window.c
:100644 100644 28d0ff2... e05ae57... M	src/hid/gtk/gui-netlist-window.c
:100644 100644 f3e95e7... f57dd5c... M	src/hid/gtk/gui-top-window.c

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

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

    hid/gtk: Use gtk_widget_get_allocation() accessor
    
    In GTK3.0, direct access to widget->allocation will be impossible.

diff --git a/src/hid/gtk/gtkhid-gl.c b/src/hid/gtk/gtkhid-gl.c
index 13c45b0..f5a99a9 100644
--- a/src/hid/gtk/gtkhid-gl.c
+++ b/src/hid/gtk/gtkhid-gl.c
@@ -904,8 +904,11 @@ ghid_drawing_area_expose_cb (GtkWidget *widget,
                              GHidPort *port)
 {
   render_priv *priv = port->render_priv;
+  GtkAllocation allocation;
   BoxType region;
 
+  gtk_widget_get_allocation (widget, &allocation);
+
   ghid_start_drawing (port);
 
   hidgl_init ();
@@ -919,16 +922,16 @@ ghid_drawing_area_expose_cb (GtkWidget *widget,
   glEnable (GL_BLEND);
   glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
-  glViewport (0, 0, widget->allocation.width, widget->allocation.height);
+  glViewport (0, 0, allocation.width, allocation.height);
 
   glEnable (GL_SCISSOR_TEST);
   glScissor (ev->area.x,
-             widget->allocation.height - ev->area.height - ev->area.y,
+             allocation.height - ev->area.height - ev->area.y,
              ev->area.width, ev->area.height);
 
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();
-  glOrtho (0, widget->allocation.width, widget->allocation.height, 0, 0, 100);
+  glOrtho (0, allocation.width, allocation.height, 0, 0, 100);
   glMatrixMode (GL_MODELVIEW);
   glLoadIdentity ();
   glTranslatef (0.0f, 0.0f, -Z_NEAR);
@@ -1063,16 +1066,16 @@ ghid_pinout_preview_expose (GtkWidget *widget,
   glEnable (GL_BLEND);
   glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
-  glViewport (0, 0, widget->allocation.width, widget->allocation.height);
+  glViewport (0, 0, allocation.width, allocation.height);
 
   glEnable (GL_SCISSOR_TEST);
   glScissor (ev->area.x,
-             widget->allocation.height - ev->area.height - ev->area.y,
+             allocation.height - ev->area.height - ev->area.y,
              ev->area.width, ev->area.height);
 
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();
-  glOrtho (0, widget->allocation.width, widget->allocation.height, 0, 0, 100);
+  glOrtho (0, allocation.width, allocation.height, 0, 0, 100);
   glMatrixMode (GL_MODELVIEW);
   glLoadIdentity ();
   glTranslatef (0.0f, 0.0f, -Z_NEAR);
@@ -1236,14 +1239,17 @@ ghid_request_debug_draw (void)
 {
   GHidPort *port = gport;
   GtkWidget *widget = port->drawing_area;
+  GtkAllocation allocation;
+
+  gtk_widget_get_allocation (widget, &allocation);
 
   ghid_start_drawing (port);
 
-  glViewport (0, 0, widget->allocation.width, widget->allocation.height);
+  glViewport (0, 0, allocation.width, allocation.height);
 
   glMatrixMode (GL_PROJECTION);
   glLoadIdentity ();
-  glOrtho (0, widget->allocation.width, widget->allocation.height, 0, 0, 100);
+  glOrtho (0, allocation.width, allocation.height, 0, 0, 100);
   glMatrixMode (GL_MODELVIEW);
   glLoadIdentity ();
   glTranslatef (0.0f, 0.0f, -Z_NEAR);
diff --git a/src/hid/gtk/gui-drc-window.c b/src/hid/gtk/gui-drc-window.c
index 5972467..e7f5c46 100644
--- a/src/hid/gtk/gui-drc-window.c
+++ b/src/hid/gtk/gui-drc-window.c
@@ -58,8 +58,11 @@ static gint
 drc_window_configure_event_cb (GtkWidget * widget,
 			       GdkEventConfigure * ev, gpointer data)
 {
-  ghidgui->drc_window_width = widget->allocation.width;
-  ghidgui->drc_window_height = widget->allocation.height;
+  GtkAllocation allocation;
+
+  gtk_widget_get_allocation (widget, &allocation);
+  ghidgui->drc_window_width = allocation.width;
+  ghidgui->drc_window_height = allocation.height;
   ghidgui->config_modified = TRUE;
 
   return FALSE;
diff --git a/src/hid/gtk/gui-keyref-window.c b/src/hid/gtk/gui-keyref-window.c
index 801d6d7..6eaf3eb 100644
--- a/src/hid/gtk/gui-keyref-window.c
+++ b/src/hid/gtk/gui-keyref-window.c
@@ -315,8 +315,11 @@ static gint
 keyref_window_configure_event_cb (GtkWidget * widget, GdkEventConfigure * ev,
 				  gpointer data)
 {
-  ghidgui->keyref_window_width = widget->allocation.width;
-  ghidgui->keyref_window_height = widget->allocation.height;
+  GtkAllocation allocation;
+
+  gtk_widget_get_allocation (widget, &allocation);
+  ghidgui->keyref_window_width = allocation.width;
+  ghidgui->keyref_window_height = allocation.height;
   ghidgui->config_modified = TRUE;
   return FALSE;
 }
diff --git a/src/hid/gtk/gui-library-window.c b/src/hid/gtk/gui-library-window.c
index 0339cf0..2cda08e 100644
--- a/src/hid/gtk/gui-library-window.c
+++ b/src/hid/gtk/gui-library-window.c
@@ -93,8 +93,11 @@ static gint
 library_window_configure_event_cb (GtkWidget * widget, GdkEventConfigure * ev,
 				   gpointer data)
 {
-  ghidgui->library_window_width = widget->allocation.width;
-  ghidgui->library_window_height = widget->allocation.height;
+  GtkAllocation allocation;
+
+  gtk_widget_get_allocation (widget, &allocation);
+  ghidgui->library_window_width = allocation.width;
+  ghidgui->library_window_height = allocation.height;
   ghidgui->config_modified = TRUE;
   return FALSE;
 }
diff --git a/src/hid/gtk/gui-log-window.c b/src/hid/gtk/gui-log-window.c
index 5f6d58f..41571e0 100644
--- a/src/hid/gtk/gui-log-window.c
+++ b/src/hid/gtk/gui-log-window.c
@@ -50,8 +50,11 @@ static gint
 log_window_configure_event_cb (GtkWidget * widget,
 			       GdkEventConfigure * ev, gpointer data)
 {
-  ghidgui->log_window_width = widget->allocation.width;
-  ghidgui->log_window_height = widget->allocation.height;
+  GtkAllocation allocation;
+
+  gtk_widget_get_allocation (widget, &allocation);
+  ghidgui->log_window_width = allocation.width;
+  ghidgui->log_window_height = allocation.height;
   ghidgui->config_modified = TRUE;
 
   return FALSE;
diff --git a/src/hid/gtk/gui-netlist-window.c b/src/hid/gtk/gui-netlist-window.c
index 28d0ff2..e05ae57 100644
--- a/src/hid/gtk/gui-netlist-window.c
+++ b/src/hid/gtk/gui-netlist-window.c
@@ -668,7 +668,10 @@ static gint
 netlist_window_configure_event_cb (GtkWidget * widget, GdkEventConfigure * ev,
 				   gpointer data)
 {
-  ghidgui->netlist_window_height = widget->allocation.height;
+  GtkAllocation allocation;
+
+  gtk_widget_get_allocation (widget, &allocation);
+  ghidgui->netlist_window_height = allocation.height;
   ghidgui->config_modified = TRUE;
   return FALSE;
 }
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index f3e95e7..f57dd5c 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -194,13 +194,16 @@ static gint
 top_window_configure_event_cb (GtkWidget * widget, GdkEventConfigure * ev,
 			       GHidPort * port)
 {
+  GtkAllocation allocation;
   gboolean new_w, new_h;
 
-  new_w = (ghidgui->top_window_width != widget->allocation.width);
-  new_h = (ghidgui->top_window_height != widget->allocation.height);
+  gtk_widget_get_allocation (widget, &allocation);
 
-  ghidgui->top_window_width = widget->allocation.width;
-  ghidgui->top_window_height = widget->allocation.height;
+  new_w = (ghidgui->top_window_width != allocation.width);
+  new_h = (ghidgui->top_window_height != allocation.height);
+
+  ghidgui->top_window_width = allocation.width;
+  ghidgui->top_window_height = allocation.height;
 
   if (new_w || new_h)
     ghidgui->config_modified = TRUE;




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