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

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



The branch, master has been updated
       via  f25fc1e7997dcf3979bdefa693704d59571824b2 (commit)
       via  dc62f672ee70361cdbf7213f97097377fcfddc36 (commit)
       via  da8dffc2d49dff3b3067c729321ac23d51ae5cc7 (commit)
       via  c6d6ca16e58b5c7f2248c21e3248825f54e52374 (commit)
       via  6967a2d93334b62ca211be048427a0ee0de94eab (commit)
      from  c9b505b52f912541674fdd1aabda43e7c0702f10 (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-main.c        |   11 ++++-----
 src/hid/gtk/gui-dialog-print.c   |   46 ++++++++++---------------------------
 src/hid/gtk/gui-dialog.c         |    2 +-
 src/hid/gtk/gui-drc-window.c     |    2 +-
 src/hid/gtk/gui-library-window.c |    2 +-
 src/hid/gtk/gui-log-window.c     |    2 +-
 src/hid/gtk/gui-netlist-window.c |    2 +-
 src/hid/gtk/gui-pinout-window.c  |    2 +-
 src/hid/gtk/gui-top-window.c     |    2 +-
 9 files changed, 25 insertions(+), 46 deletions(-)


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

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

    hid/gtk: Re-write the tool-tip handling code to use newer tooltip API
    
    Use the gtk_widget_set_tooltip* API introduced in GTK 2.12. This avoids
    the APIs deprecated in GTK 2.12, and also avoids the requirement to pack
    GTK_WIDGET_NO_WINDOW widgets inside gtk_event_box() widgets to make their
    tooltips work.

:100644 100644 13da605... 5d7d003... M	src/hid/gtk/gui-dialog-print.c

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

    hid/gtk: Replace usage of the deprecated gtk_widget_set_uposition() call
    
    The closest replacement is gtk_window_move(), and looking at the GTK
    sources, appears to be what gtk_widget_set_uposition() calls internally.
    
    We are still rather at the mercy of the user's window manager as to
    whether it will honour the request we make, and arguably we ought to
    remove this (mis-)feature anyway.

:100644 100644 4ab38b1... ce0210c... M	src/hid/gtk/gui-drc-window.c
:100644 100644 a1e1a53... 74b55e9... M	src/hid/gtk/gui-library-window.c
:100644 100644 41571e0... 01daaee... M	src/hid/gtk/gui-log-window.c
:100644 100644 e05ae57... 35b5427... M	src/hid/gtk/gui-netlist-window.c
:100644 100644 5b0feef... 6433fb1... M	src/hid/gtk/gui-pinout-window.c
:100644 100644 06eab4d... 2c76a0a... M	src/hid/gtk/gui-top-window.c

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

    hid/gtk: Replace deprecated function call gtk_box_pack_start_defaults()

:100644 100644 93cea47... 1770bba... M	src/hid/gtk/gui-dialog.c

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

    hid/gtk: Avoid the deprecated gdk_drawable_get_display()
    
    Grab the active display using gdk_window_get_display() on the window
    belonging to the drawing area.

:100644 100644 89d50be... 3e253cb... M	src/hid/gtk/gtkhid-main.c

commit 6967a2d93334b62ca211be048427a0ee0de94eab
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Use the g_timeout_add() function, not the deprecated GTK one.

:100644 100644 e201d3c... 89d50be... M	src/hid/gtk/gtkhid-main.c

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

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

    hid/gtk: Re-write the tool-tip handling code to use newer tooltip API
    
    Use the gtk_widget_set_tooltip* API introduced in GTK 2.12. This avoids
    the APIs deprecated in GTK 2.12, and also avoids the requirement to pack
    GTK_WIDGET_NO_WINDOW widgets inside gtk_event_box() widgets to make their
    tooltips work.

diff --git a/src/hid/gtk/gui-dialog-print.c b/src/hid/gtk/gui-dialog-print.c
index 13da605..5d7d003 100644
--- a/src/hid/gtk/gui-dialog-print.c
+++ b/src/hid/gtk/gui-dialog-print.c
@@ -113,11 +113,8 @@ ghid_attribute_dialog (HID_Attribute * attrs,
   GtkWidget *widget;
   GHidPort *out = &ghid_port;
   int i, j, n;
-  GtkTooltips *tips;
   int rc = 0;
 
-  tips = gtk_tooltips_new ();
-
   dialog = gtk_dialog_new_with_buttons (_(title),
 					GTK_WINDOW (out->top_window),
 					(GtkDialogFlags)(GTK_DIALOG_MODAL
@@ -151,7 +148,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 	case HID_Label:
 	  widget = gtk_label_new (attrs[j].name);
 	  gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
-	  gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
+	  gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
 	  break;
 
 	case HID_Integer:
@@ -167,8 +164,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 			    attrs[j].min_val, attrs[j].max_val, 1.0, 1.0, 0, 0,
 			    intspinner_changed_cb,
 			    &(attrs[j].default_val.int_value), FALSE, NULL);
-
-	  gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
+	  gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
 
 	  widget = gtk_label_new (attrs[j].name);
 	  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
@@ -185,7 +181,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 	  if(attrs[j].default_val.str_value != NULL)
 	    gtk_entry_set_text (GTK_ENTRY (entry),
 				attrs[j].default_val.str_value);
-	  gtk_tooltips_set_tip (tips, entry, attrs[j].help_text, NULL);
+	  gtk_widget_set_tooltip_text (entry, attrs[j].help_text);
 	  g_signal_connect (G_OBJECT (entry), "changed",
 			    G_CALLBACK (coordentry_changed_cb),
 			    &(attrs[j].default_val.coord_value));
@@ -209,7 +205,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 			    dblspinner_changed_cb,
 			    &(attrs[j].default_val.real_value), FALSE, NULL);
 
-	  gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
+	  gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
 
 	  widget = gtk_label_new (attrs[j].name);
 	  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
@@ -224,7 +220,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 	  if(attrs[j].default_val.str_value != NULL)
 	    gtk_entry_set_text (GTK_ENTRY (entry),
 				attrs[j].default_val.str_value);
-	  gtk_tooltips_set_tip (tips, entry, attrs[j].help_text, NULL);
+	  gtk_widget_set_tooltip_text (entry, attrs[j].help_text);
 	  g_signal_connect (G_OBJECT (entry), "changed",
 			    G_CALLBACK (entry_changed_cb),
 			    &(attrs[j].default_val.str_value));
@@ -240,7 +236,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 				       TRUE, FALSE, FALSE, 0, set_flag_cb,
 				       &(attrs[j].default_val.int_value),
 				       attrs[j].name);
-	  gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
+	  gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
 	  break;
 
 	case HID_Enum:
@@ -248,16 +244,9 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 	  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
         do_enum:
-	  /* 
-	   * We have to put the combo_box inside of an event_box in
-	   * order for tooltips to work.
-	   */
-	  widget = gtk_event_box_new ();
-	  gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
-	  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
-
 	  combo = gtk_combo_box_new_text ();
-	  gtk_container_add (GTK_CONTAINER (widget), combo);
+	  gtk_widget_set_tooltip_text (combo, attrs[j].help_text);
+	  gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
 	  g_signal_connect (G_OBJECT (combo), "changed",
 			    G_CALLBACK (enum_changed_cb),
 			    &(attrs[j].default_val.int_value));
@@ -294,7 +283,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 			    0,
 			    dblspinner_changed_cb,
 			    &(attrs[j].default_val.real_value), FALSE, NULL);
-	  gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
+	  gtk_widget_set_tooltip_text (widget, attrs[j].help_text);
 
           goto do_enum;
 	  break;
@@ -309,7 +298,7 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 			    G_CALLBACK (entry_changed_cb),
 			    &(attrs[j].default_val.str_value));
 
-	  gtk_tooltips_set_tip (tips, entry, attrs[j].help_text, NULL);
+	  gtk_widget_set_tooltip_text (entry, attrs[j].help_text);
 	  break;
 
 	case HID_Unit:
@@ -318,16 +307,10 @@ ghid_attribute_dialog (HID_Attribute * attrs,
 
 	  hbox = gtk_hbox_new (FALSE, 4);
 	  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-	  /* 
-	   * We have to put the combo_box inside of an event_box in
-	   * order for tooltips to work.
-	   */
-	  widget = gtk_event_box_new ();
-	  gtk_tooltips_set_tip (tips, widget, attrs[j].help_text, NULL);
-	  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
 
 	  combo = gtk_combo_box_new_text ();
-	  gtk_container_add (GTK_CONTAINER (widget), combo);
+	  gtk_widget_set_tooltip_text (combo, attrs[j].help_text);
+	  gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
 	  g_signal_connect (G_OBJECT (combo), "changed",
 			    G_CALLBACK (enum_changed_cb),
 			    &(attrs[j].default_val.int_value));
@@ -433,11 +416,8 @@ ghid_dialog_export (void)
   GHidPort *out = &ghid_port;
   int i;
   HID **hids;
-  GtkTooltips *tips;
   gboolean no_exporter = TRUE;
 
-  tips = gtk_tooltips_new ();
-
   export_dialog = gtk_dialog_new_with_buttons (_("PCB Export Layout"),
 					       GTK_WINDOW (out->top_window),
 					       (GtkDialogFlags)(GTK_DIALOG_MODAL
@@ -467,7 +447,7 @@ ghid_dialog_export (void)
 	{
 	  no_exporter = FALSE;
 	  button = gtk_button_new_with_label (hids[i]->name);
-	  gtk_tooltips_set_tip (tips, button, hids[i]->description, NULL);
+	  gtk_widget_set_tooltip_text (button, hids[i]->description);
 	  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
 	  g_signal_connect (G_OBJECT (button), "clicked",
 			    G_CALLBACK (exporter_clicked_cb), hids[i]);

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

    hid/gtk: Replace usage of the deprecated gtk_widget_set_uposition() call
    
    The closest replacement is gtk_window_move(), and looking at the GTK
    sources, appears to be what gtk_widget_set_uposition() calls internally.
    
    We are still rather at the mercy of the user's window manager as to
    whether it will honour the request we make, and arguably we ought to
    remove this (mis-)feature anyway.

diff --git a/src/hid/gtk/gui-drc-window.c b/src/hid/gtk/gui-drc-window.c
index 4ab38b1..ce0210c 100644
--- a/src/hid/gtk/gui-drc-window.c
+++ b/src/hid/gtk/gui-drc-window.c
@@ -931,7 +931,7 @@ ghid_drc_window_show (gboolean raise)
 
   gtk_widget_realize (drc_window);
   if (Settings.AutoPlace)
-    gtk_widget_set_uposition (GTK_WIDGET (drc_window), 10, 10);
+    gtk_window_move (GTK_WINDOW (drc_window), 10, 10);
   gtk_widget_show_all (drc_window);
 }
 
diff --git a/src/hid/gtk/gui-library-window.c b/src/hid/gtk/gui-library-window.c
index a1e1a53..74b55e9 100644
--- a/src/hid/gtk/gui-library-window.c
+++ b/src/hid/gtk/gui-library-window.c
@@ -176,7 +176,7 @@ ghid_library_window_create (GHidPort * out)
 
   gtk_widget_realize (library_window);
   if (Settings.AutoPlace)
-    gtk_widget_set_uposition (GTK_WIDGET (library_window), 10, 10);
+    gtk_window_move (GTK_WINDOW (library_window), 10, 10);
 
   gtk_editable_select_region (GTK_EDITABLE
 			      (GHID_LIBRARY_WINDOW (library_window)->
diff --git a/src/hid/gtk/gui-log-window.c b/src/hid/gtk/gui-log-window.c
index 41571e0..01daaee 100644
--- a/src/hid/gtk/gui-log-window.c
+++ b/src/hid/gtk/gui-log-window.c
@@ -110,7 +110,7 @@ ghid_log_window_create ()
 
   gtk_widget_realize (log_window);
   if (Settings.AutoPlace)
-    gtk_widget_set_uposition (GTK_WIDGET (log_window), 10, 10);
+    gtk_window_move (GTK_WINDOW (log_window), 10, 10);
 }
 
 void
diff --git a/src/hid/gtk/gui-netlist-window.c b/src/hid/gtk/gui-netlist-window.c
index e05ae57..35b5427 100644
--- a/src/hid/gtk/gui-netlist-window.c
+++ b/src/hid/gtk/gui-netlist-window.c
@@ -838,7 +838,7 @@ ghid_netlist_window_create (GHidPort * out)
 
   gtk_widget_realize (netlist_window);
   if (Settings.AutoPlace)
-    gtk_widget_set_uposition (GTK_WIDGET (netlist_window), 10, 10);
+    gtk_window_move (GTK_WINDOW (netlist_window), 10, 10);
 
 }
 
diff --git a/src/hid/gtk/gui-pinout-window.c b/src/hid/gtk/gui-pinout-window.c
index 5b0feef..6433fb1 100644
--- a/src/hid/gtk/gui-pinout-window.c
+++ b/src/hid/gtk/gui-pinout-window.c
@@ -102,6 +102,6 @@ ghid_pinout_window_show (GHidPort * out, ElementType * element)
 
   gtk_widget_realize (top_window);
   if (Settings.AutoPlace)
-    gtk_widget_set_uposition (top_window, 10, 10);
+    gtk_window_move (GTK_WINDOW (top_window), 10, 10);
   gtk_widget_show_all (top_window);
 }
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 06eab4d..2c76a0a 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -1685,7 +1685,7 @@ ghid_parse_arguments (int *argc, char ***argv)
 			       ghidgui->top_window_width, ghidgui->top_window_height);
 
   if (Settings.AutoPlace)
-    gtk_widget_set_uposition (GTK_WIDGET (window), 10, 10);
+    gtk_window_move (GTK_WINDOW (window), 10, 10);
 
   gtk_widget_show_all (gport->top_window);
   ghidgui->creating = TRUE;

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

    hid/gtk: Replace deprecated function call gtk_box_pack_start_defaults()

diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index 93cea47..1770bba 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -76,7 +76,7 @@ ghid_dialog_input (const char * prompt, const char * initial)
     gtk_entry_set_text (GTK_ENTRY (entry), initial);
 
   gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
-  gtk_box_pack_start_defaults (GTK_BOX (vbox), entry);
+  gtk_box_pack_start (GTK_BOX (vbox), entry, TRUE, TRUE, 0);
 
   content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
   gtk_container_add (GTK_CONTAINER (content_area), vbox);

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

    hid/gtk: Avoid the deprecated gdk_drawable_get_display()
    
    Grab the active display using gdk_window_get_display() on the window
    belonging to the drawing area.

diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 89d50be..3e253cb 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -1542,9 +1542,8 @@ Benchmark (int argc, char **argv, Coord x, Coord y)
 {
   int i = 0;
   time_t start, end;
-  GdkDisplay *display;
-
-  display = gdk_drawable_get_display (gport->drawable);
+  GdkWindow *window = gtk_widget_get_window (gport->drawing_area);
+  GdkDisplay *display = gdk_window_get_display (window);
 
   gdk_display_sync (display);
   time (&start);

commit 6967a2d93334b62ca211be048427a0ee0de94eab
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Use the g_timeout_add() function, not the deprecated GTK one.

diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index e201d3c..89d50be 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -372,7 +372,7 @@ ghid_set_crosshair (int x, int y, int action)
 typedef struct
 {
   void (*func) (hidval);
-  gint id;
+  guint id;
   hidval user_data;
 }
 GuiTimer;
@@ -397,7 +397,7 @@ ghid_add_timer (void (*func) (hidval user_data),
 
   timer->func = func;
   timer->user_data = user_data;
-  timer->id = gtk_timeout_add (milliseconds, (GtkFunction) ghid_timer, timer);
+  timer->id = g_timeout_add (milliseconds, (GSourceFunc) ghid_timer, timer);
   ret.ptr = (void *) timer;
   return ret;
 }
@@ -407,7 +407,7 @@ ghid_stop_timer (hidval timer)
 {
   void *ptr = timer.ptr;
 
-  gtk_timeout_remove (((GuiTimer *) ptr)->id);
+  g_source_remove (((GuiTimer *) ptr)->id);
   g_free( ptr );
 }
 




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