delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/02/09/12:03:15

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <4F33FBFB.3080507@x-eike.de>
Date: Thu, 09 Feb 2012 18:01:47 +0100
From: Eike Krumbacher <eike DOT krumbacher AT x-eike DOT de>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: geda-user AT delorie DOT com
Subject: [geda-user] Cleaned depreated symbols in gschem/src/x_dialog.c
X-bounce-key: webpack.hosteurope.de;eike DOT krumbacher AT x-eike DOT de;1328806912;705f6e17;
Reply-To: geda-user AT delorie DOT com

This is a multi-part message in MIME format.
--------------020306030203000704000304
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi!

I cleaned some more deprecated symbols. Both patches are using my 
current git HEAD.

The first patch cleans the symbols as always, the second one cleans the 
mess I did with translations.

The patches are tested with files using lines and rectangles as the file 
they belong to is about dialog-boxes which sets line styles, colours and 
some more.

It would be nice to get some feedback about the patches this week. 
Accepted? Rejected?

BTW: Is migration to GTK+ version 3 desired at all?

Best regards

Eike

--------------020306030203000704000304
Content-Type: text/x-diff;
 name="0001-Cleaned-up-the-file-gschem-src-x_dialog.c-and-replac.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0001-Cleaned-up-the-file-gschem-src-x_dialog.c-and-replac.pa";
 filename*1="tch"

From 94d6d03c0eb2551292d300345dc94831593b8b94 Mon Sep 17 00:00:00 2001
From: eikekrumbacher <eike DOT krumbacher AT x-eike DOT de>
Date: Thu, 9 Feb 2012 17:17:53 +0100
Subject: [PATCH 1/2] Cleaned up the file gschem/src/x_dialog.c and replaced
 deprecated symbols. * Replaced GtkOptionMenu with
 GtkComboBoxText * Replaced gtk_object_* with g_object_*
 * and some more

Tested linestyle and color dialogs with some files.

WARNING:
For some kind of reason, (german?) translation is broken after these
modifications. ATM, I don't know why. :-(
---
 gschem/src/x_dialog.c |  398 +++++++++++++++++++------------------------------
 1 files changed, 152 insertions(+), 246 deletions(-)

diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index 9526848..cf307c3 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -38,14 +38,11 @@
 
 #define GLADE_HOOKUP_OBJECT(component,widget,name) \
   g_object_set_data_full (G_OBJECT (component), name, \
-    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
+    g_object_ref (G_OBJECT(widget)), (GDestroyNotify) g_object_unref)
 
-static GtkWidget* create_menu_linetype (GSCHEM_TOPLEVEL *w_current);
 static gint line_type_dialog_linetype_change (GtkWidget *w, gpointer data);
 static void line_type_dialog_ok (GtkWidget *w, gpointer data);
-static GtkWidget* create_menu_lineend (GSCHEM_TOPLEVEL *w_current);
 
-static GtkWidget* create_menu_filltype (GSCHEM_TOPLEVEL *w_current);
 static gint fill_type_dialog_filltype_change(GtkWidget *w, gpointer data);
 static void fill_type_dialog_ok(GtkWidget *w, gpointer data);
 
@@ -102,7 +99,7 @@ void text_input_dialog_apply(GtkWidget *w, GSCHEM_TOPLEVEL *w_current)
   GtkTextBuffer *textbuffer;
   GtkTextIter start, end;
 
-  tientry = gtk_object_get_data(GTK_OBJECT(w_current->tiwindow),"tientry");
+  tientry = g_object_get_data(G_OBJECT(w_current->tiwindow),"tientry");
 
   textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(tientry));
   gtk_text_buffer_get_bounds (textbuffer, &start, &end);
@@ -191,7 +188,7 @@ void text_input_dialog (GSCHEM_TOPLEVEL *w_current)
                                             GTK_RESPONSE_REJECT,
                                             -1);
 
-    gtk_window_position(GTK_WINDOW (w_current->tiwindow),
+    gtk_window_set_position(GTK_WINDOW (w_current->tiwindow),
                         GTK_WIN_POS_NONE);
 
     g_signal_connect (G_OBJECT (w_current->tiwindow), "response",
@@ -201,7 +198,7 @@ void text_input_dialog (GSCHEM_TOPLEVEL *w_current)
     gtk_dialog_set_default_response(GTK_DIALOG(w_current->tiwindow),
                                     GTK_RESPONSE_ACCEPT);
 
-    gtk_container_border_width(GTK_CONTAINER (w_current->tiwindow),
+    gtk_container_set_border_width(GTK_CONTAINER (w_current->tiwindow),
                                DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->tiwindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox),DIALOG_V_SPACING);
@@ -243,7 +240,7 @@ void text_input_dialog (GSCHEM_TOPLEVEL *w_current)
     pango_tab_array_free (tab_array);
     gtk_container_add(GTK_CONTAINER(scrolled_window), tientry);
 
-    gtk_object_set_data(GTK_OBJECT(w_current->tiwindow),
+    g_object_set_data(G_OBJECT(w_current->tiwindow),
                         "tientry",tientry);
 
     gtk_widget_show_all (w_current->tiwindow);
@@ -253,7 +250,7 @@ void text_input_dialog (GSCHEM_TOPLEVEL *w_current)
   }
 
   /* always select the text in the entry */
-  tientry = gtk_object_get_data(GTK_OBJECT(w_current->tiwindow),"tientry");
+  tientry = g_object_get_data(G_OBJECT(w_current->tiwindow),"tientry");
   select_all_text_in_textview(GTK_TEXT_VIEW(tientry));
   gtk_widget_grab_focus(tientry);
 }
@@ -460,7 +457,7 @@ void text_edit_dialog (GSCHEM_TOPLEVEL *w_current, const char *string, int text_
                       G_CALLBACK (text_edit_dialog_response),
                       w_current);
 
-    gtk_window_position(GTK_WINDOW (w_current->tewindow),
+    gtk_window_set_position(GTK_WINDOW (w_current->tewindow),
                         GTK_WIN_POS_MOUSE);
 
 
@@ -534,7 +531,8 @@ void text_edit_dialog (GSCHEM_TOPLEVEL *w_current, const char *string, int text_
     gtk_misc_set_alignment(GTK_MISC(label),0,0);
     gtk_table_attach(GTK_TABLE(table), label, 0,1,1,2, GTK_FILL,0,0,0);
 
-    sizeentry = gtk_entry_new_with_max_length (10);
+    sizeentry = gtk_entry_new();
+    gtk_entry_set_max_length (GTK_ENTRY (sizeentry), 10);
     gtk_editable_select_region(GTK_EDITABLE (sizeentry), 0, -1);
     gtk_table_attach_defaults(GTK_TABLE(table), sizeentry, 1,2,1,2);
     gtk_entry_set_activates_default(GTK_ENTRY(sizeentry), TRUE);
@@ -575,79 +573,6 @@ void text_edit_dialog (GSCHEM_TOPLEVEL *w_current, const char *string, int text_
 
 /***************** End of Text Edit dialog box ************************/
 
-/***************** Start of Line Type/width dialog box ****************/
-
-/*! \brief Create a line type menu for the line type dialog
- *  \par Function Description
- *  This function creates a GtkMenu with the different linetypes.
- */
-static GtkWidget *create_menu_linetype (GSCHEM_TOPLEVEL *w_current)
-{
-  GtkWidget *menu;
-  GSList *group;
-  struct line_type {
-    gchar *str;
-    OBJECT_TYPE type;
-  } types[] = { { N_("Solid"),   TYPE_SOLID },
-                { N_("Dotted"),  TYPE_DOTTED },
-                { N_("Dashed"),  TYPE_DASHED },
-                { N_("Center"),  TYPE_CENTER },
-                { N_("Phantom"), TYPE_PHANTOM },
-                { N_("*unchanged*"), TYPE_ERASE } };
-  gint i;
-
-  menu  = gtk_menu_new ();
-  group = NULL;
-
-  for (i = 0; i < sizeof (types) / sizeof (struct line_type); i++) {
-    GtkWidget *menuitem;
-
-    menuitem = gtk_radio_menu_item_new_with_label (group, _(types[i].str));
-    group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
-    gtk_menu_append (GTK_MENU (menu), menuitem);
-    gtk_object_set_data (GTK_OBJECT(menuitem), "linetype",
-                         GINT_TO_POINTER (types[i].type));
-    gtk_widget_show (menuitem);
-  }
-
-  return(menu);
-}
-
-/*! \brief Create line end menu for the line type dialog
- *  \par Function Description
- *  This function creates a GtkMenu with different line end (capstyle) entries.
- */
-static GtkWidget *create_menu_lineend (GSCHEM_TOPLEVEL *w_current)
-{
-  GtkWidget *menu;
-  GSList *group;
-  struct line_end {
-    gchar *str;
-    OBJECT_END end;
-  } types[] = { { N_("Butt"),   END_NONE   },
-                { N_("Square"), END_SQUARE },
-                { N_("Round"),  END_ROUND  },
-                { N_("*unchanged*"), END_VOID  } };
-  gint i;
-
-  menu  = gtk_menu_new ();
-  group = NULL;
-
-  for (i = 0; i < sizeof (types) / sizeof (struct line_end); i++) {
-    GtkWidget *menuitem;
-
-    menuitem = gtk_radio_menu_item_new_with_label (group, _(types[i].str));
-    group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
-    gtk_menu_append (GTK_MENU (menu), menuitem);
-    gtk_object_set_data (GTK_OBJECT(menuitem), "lineend",
-                         GINT_TO_POINTER (types[i].end));
-    gtk_widget_show (menuitem);
-  }
-
-  return(menu);
-}
-
-
 /*! \brief get the linetype data from selected objects
  *  \par Function Description
  *  Get linetype information over all selected objects.
@@ -716,21 +641,18 @@ static void line_type_dialog_set_values(struct line_type_data *line_type_data,
                                         gint width, gint length, gint space)
 {
   gchar *text;
-  GtkWidget *menu, *menuitem;
 
   if (type == -2)
     type = TYPE_ERASE;
-  gtk_option_menu_set_history(GTK_OPTION_MENU(line_type_data->line_type), type);
-  menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(line_type_data->line_type));
-  menuitem = gtk_menu_get_active(GTK_MENU(menu));
-  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE);
+  gtk_combo_box_set_active (
+    GTK_COMBO_BOX (line_type_data->line_type), type);
 
   if (width == -2)
     text = g_strdup(_("*unchanged*"));
   else
     text = g_strdup_printf ("%d", width);
   gtk_entry_set_text (GTK_ENTRY (line_type_data->width_entry), text);
-  gtk_entry_select_region (GTK_ENTRY (line_type_data->width_entry), 
+  gtk_editable_select_region (GTK_EDITABLE (line_type_data->width_entry), 
                            0, strlen (text));
   g_free(text);
 
@@ -739,7 +661,7 @@ static void line_type_dialog_set_values(struct line_type_data *line_type_data,
   else
     text = g_strdup_printf ("%d", length);
   gtk_entry_set_text (GTK_ENTRY (line_type_data->length_entry), text);
-  gtk_entry_select_region (GTK_ENTRY (line_type_data->length_entry), 
+  gtk_editable_select_region (GTK_EDITABLE (line_type_data->length_entry), 
                            0, strlen (text));
   g_free(text);
 
@@ -748,16 +670,14 @@ static void line_type_dialog_set_values(struct line_type_data *line_type_data,
   else
     text = g_strdup_printf ("%d", space);
   gtk_entry_set_text (GTK_ENTRY (line_type_data->space_entry), text);
-  gtk_entry_select_region (GTK_ENTRY (line_type_data->space_entry),
+  gtk_editable_select_region (GTK_EDITABLE (line_type_data->space_entry),
                            0, strlen (text));
   g_free(text);
 
   if (end == -2)
     end = END_VOID;
-  gtk_option_menu_set_history(GTK_OPTION_MENU(line_type_data->line_end), end);
-  menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(line_type_data->line_end));
-  menuitem = gtk_menu_get_active(GTK_MENU(menu));
-  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE);
+  gtk_combo_box_set_active (
+    GTK_COMBO_BOX (line_type_data->line_end), end);
 }
 
 /*! \brief Callback function for the linetype menu item in the line type dialog
@@ -768,16 +688,12 @@ static void line_type_dialog_set_values(struct line_type_data *line_type_data,
 static gint line_type_dialog_linetype_change(GtkWidget *w, gpointer data)
 {
   struct line_type_data *line_type_data = (struct line_type_data*) data;
-  GtkWidget *menuitem;
   gboolean activate_length_entry, activate_space_entry;
-  gint type;
+  OBJECT_TYPE type;
 
-  menuitem = gtk_menu_get_active (
-    GTK_MENU (gtk_option_menu_get_menu (
-                GTK_OPTION_MENU (line_type_data->line_type))));
+  type = (OBJECT_TYPE) gtk_combo_box_get_active (
+    GTK_COMBO_BOX (line_type_data->line_type));
 
-  type = GPOINTER_TO_INT(
-    gtk_object_get_data (GTK_OBJECT (menuitem), "linetype"));
   switch(type) {
       case(TYPE_SOLID):
         activate_length_entry = FALSE;
@@ -787,13 +703,7 @@ static gint line_type_dialog_linetype_change(GtkWidget *w, gpointer data)
         activate_length_entry = FALSE;
         activate_space_entry  = TRUE;
         break;
-      case(TYPE_DASHED):
-      case(TYPE_CENTER):
-      case(TYPE_PHANTOM):
-        activate_length_entry = TRUE;
-        activate_space_entry  = TRUE;
-        break;
-      default:
+      default:  /* all other cases */
         activate_length_entry = TRUE;
         activate_space_entry  = TRUE;
   }
@@ -803,7 +713,7 @@ static gint line_type_dialog_linetype_change(GtkWidget *w, gpointer data)
   gtk_widget_set_sensitive (line_type_data->length_entry,
                             activate_length_entry);
 
-  return(0);
+  return 0;
 }
 
 
@@ -840,23 +750,16 @@ static void line_type_dialog_ok(GtkWidget *w, gpointer data)
                                       line_type_data->length_entry));
   space_str   = gtk_entry_get_text (GTK_ENTRY (
                                       line_type_data->space_entry));
-  type = GPOINTER_TO_INT(
-    gtk_object_get_data (
-      GTK_OBJECT (
-        gtk_menu_get_active (
-          GTK_MENU (gtk_option_menu_get_menu (
-                      GTK_OPTION_MENU (
-                        line_type_data->line_type))))), "linetype"));
+
+  type = (OBJECT_TYPE) gtk_combo_box_get_active (
+    GTK_COMBO_BOX (line_type_data->line_type));
+
   if (type == TYPE_ERASE)
     type = -1;
 
-  end = GPOINTER_TO_INT(
-    gtk_object_get_data (
-      GTK_OBJECT (
-        gtk_menu_get_active (
-          GTK_MENU (gtk_option_menu_get_menu (
-                      GTK_OPTION_MENU (
-                        line_type_data->line_end))))), "lineend"));
+  end = (OBJECT_TYPE) gtk_combo_box_get_active (
+    GTK_COMBO_BOX (line_type_data->line_end));
+
   if (end == END_VOID)
     end = -1;
 
@@ -945,16 +848,16 @@ void line_type_dialog (GSCHEM_TOPLEVEL *w_current)
 {
   GtkWidget *dialog;
   GtkWidget *vbox;
-  GtkWidget *type_menu    = NULL;
+  GtkWidget *type_cmbtext = NULL;
   GtkWidget *length_entry = NULL;
   GtkWidget *space_entry  = NULL;
   GtkWidget *width_entry  = NULL;
-  GtkWidget *end_menu     = NULL;
+  GtkWidget *end_cmbtext  = NULL;
   GtkWidget *table;
   GtkWidget *label;
   struct line_type_data *line_type_data;
   GList *selection;
-  OBJECT_END end;
+  OBJECT_END end = END_NONE;
   OBJECT_TYPE type=TYPE_SOLID;
   gint width=1, length=-1, space=-1;
 
@@ -987,7 +890,7 @@ void line_type_dialog (GSCHEM_TOPLEVEL *w_current)
                                           GTK_RESPONSE_REJECT,
                                           -1);
 
-  gtk_window_position(GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
+  gtk_window_set_position(GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
 
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
 
@@ -995,7 +898,7 @@ void line_type_dialog (GSCHEM_TOPLEVEL *w_current)
                     G_CALLBACK (line_type_dialog_response),
                     line_type_data);
 
-  gtk_container_border_width(GTK_CONTAINER(dialog),
+  gtk_container_set_border_width(GTK_CONTAINER(dialog),
                              DIALOG_BORDER_SPACING);
   vbox = GTK_DIALOG(dialog)->vbox;
   gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -1030,10 +933,28 @@ void line_type_dialog (GSCHEM_TOPLEVEL *w_current)
   gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
   gtk_table_attach(GTK_TABLE(table), label, 0,1,4,5, GTK_FILL,0,0,0);
 
-  type_menu = gtk_option_menu_new ();
-  gtk_option_menu_set_menu(GTK_OPTION_MENU(type_menu),
-                           create_menu_linetype (w_current));
-  gtk_table_attach_defaults(GTK_TABLE(table), type_menu,
+  /* ComboBoxText entries reflect the order of enum OBJECT_TYPE
+    see libgeda/include/libgeda/struct.h */
+  type_cmbtext = gtk_combo_box_text_new();
+  gtk_combo_box_text_append_text (      /* TYPE_SOLID */
+    GTK_COMBO_BOX_TEXT (type_cmbtext),
+    N_("Solid"));
+  gtk_combo_box_text_append_text (      /* TYPE_DOTTED */
+    GTK_COMBO_BOX_TEXT (type_cmbtext),
+    N_("Dotted"));
+  gtk_combo_box_text_append_text (      /* TYPE_DASHED */
+    GTK_COMBO_BOX_TEXT (type_cmbtext),
+    N_("Dashed"));
+  gtk_combo_box_text_append_text (      /* TYPE_CENTER */
+    GTK_COMBO_BOX_TEXT (type_cmbtext),
+    N_("Center"));
+  gtk_combo_box_text_append_text (      /* TYPE_PHANTOM */
+    GTK_COMBO_BOX_TEXT (type_cmbtext),
+    N_("Phantom"));
+  gtk_combo_box_text_append_text (      /* TYPE_ERASE */
+    GTK_COMBO_BOX_TEXT (type_cmbtext),
+    N_("*unchanged*"));
+  gtk_table_attach_defaults(GTK_TABLE(table), type_cmbtext,
                             1,2,0,1);
 
   width_entry = gtk_entry_new();
@@ -1042,7 +963,7 @@ void line_type_dialog (GSCHEM_TOPLEVEL *w_current)
   gtk_table_attach_defaults(GTK_TABLE(table), width_entry,
                             1,2,1,2);
 
-  g_signal_connect(G_OBJECT (type_menu), "changed",
+  g_signal_connect(G_OBJECT (type_cmbtext), "changed",
                    G_CALLBACK (line_type_dialog_linetype_change),
                    line_type_data);
 
@@ -1058,19 +979,32 @@ void line_type_dialog (GSCHEM_TOPLEVEL *w_current)
   gtk_table_attach_defaults(GTK_TABLE(table), space_entry,
                             1,2,3,4);
 
-  end_menu = gtk_option_menu_new ();
-  gtk_option_menu_set_menu(GTK_OPTION_MENU(end_menu),
-                           create_menu_lineend (w_current));
-  gtk_table_attach_defaults(GTK_TABLE(table), end_menu,
+  /* ComboBoxText entries reflect the order of enum OBJECT_END
+    see libgeda/include/libgeda/struct.h */
+  end_cmbtext = gtk_combo_box_text_new();
+  gtk_combo_box_text_append_text (      /* END_NONE */
+    GTK_COMBO_BOX_TEXT (end_cmbtext),
+    N_("Butt"));
+  gtk_combo_box_text_append_text (      /* END_SQARE */
+    GTK_COMBO_BOX_TEXT (end_cmbtext),
+    N_("Square"));
+  gtk_combo_box_text_append_text (      /* END_ROUND */
+    GTK_COMBO_BOX_TEXT (end_cmbtext),
+    N_("Round"));
+  gtk_combo_box_text_append_text (      /* END_VOID */
+    GTK_COMBO_BOX_TEXT (end_cmbtext),
+    N_("*unchanged*"));
+  
+  gtk_table_attach_defaults(GTK_TABLE(table), end_cmbtext,
                             1,2,4,5);
 
   /* populate the data structure */
   line_type_data->dialog = dialog;
   line_type_data->width_entry  = width_entry;
-  line_type_data->line_type    = type_menu;
+  line_type_data->line_type    = type_cmbtext;
   line_type_data->length_entry = length_entry;
   line_type_data->space_entry  = space_entry;
-  line_type_data->line_end     = end_menu;
+  line_type_data->line_end     = end_cmbtext;
 
   line_type_data->w_current = w_current;
 
@@ -1079,7 +1013,7 @@ void line_type_dialog (GSCHEM_TOPLEVEL *w_current)
                               width, length, space);
 
   /* calling it once will set the dash space/length activity */
-  line_type_dialog_linetype_change(type_menu, line_type_data);
+  line_type_dialog_linetype_change(type_cmbtext, line_type_data);
 
   gtk_widget_grab_focus(width_entry);
   gtk_widget_show_all (dialog);
@@ -1089,41 +1023,6 @@ void line_type_dialog (GSCHEM_TOPLEVEL *w_current)
 
 /***************** Start of Fill Type dialog box **********************/
 
-/*! \brief Create a menu with fill types for the line type dialog
- *  \par Function Description
- *  This function creates a GtkMenu with the different fill types.
- */
-static GtkWidget *create_menu_filltype (GSCHEM_TOPLEVEL *w_current)
-{
-  GtkWidget *menu;
-  GSList *group;
-  struct fill_type {
-    gchar *str;
-    OBJECT_FILLING type;
-  } types[] = { { N_("Hollow"), FILLING_HOLLOW },
-                { N_("Filled"), FILLING_FILL },
-                { N_("Mesh"),   FILLING_MESH },
-                { N_("Hatch"),  FILLING_HATCH },
-                { N_("*unchanged*"), FILLING_VOID } };
-  gint i;
-
-  menu  = gtk_menu_new ();
-  group = NULL;
-
-  for (i = 0; i < sizeof (types) / sizeof (struct fill_type); i++) {
-    GtkWidget *menuitem;
-
-    menuitem = gtk_radio_menu_item_new_with_label (group, _(types[i].str));
-    group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
-    gtk_menu_append (GTK_MENU (menu), menuitem);
-    gtk_object_set_data (GTK_OBJECT(menuitem), "filltype",
-                         GINT_TO_POINTER (types[i].type));
-    gtk_widget_show (menuitem);
-  }
-
-  return menu;
-}
-
 /*! \brief get the filltype data from selected objects
  *  \par Function Description
  *  Get filltype information over all selected objects.
@@ -1197,21 +1096,18 @@ static void fill_type_dialog_set_values(struct fill_type_data *fill_type_data,
                                         gint pitch2, gint angle2)
 {
   gchar *text;
-  GtkWidget *menu, *menuitem;
 
   if (type == -2)
     type = FILLING_VOID;
-  gtk_option_menu_set_history(GTK_OPTION_MENU(fill_type_data->fill_type), type);
-  menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(fill_type_data->fill_type));
-  menuitem = gtk_menu_get_active(GTK_MENU(menu));
-  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE);
+  gtk_combo_box_set_active (
+    GTK_COMBO_BOX (fill_type_data->fill_type), type);
 
   if (width == -2)
     text = g_strdup(_("*unchanged*"));
   else
     text = g_strdup_printf ("%d", width);
   gtk_entry_set_text (GTK_ENTRY (fill_type_data->width_entry), text);
-  gtk_entry_select_region (GTK_ENTRY (fill_type_data->width_entry), 
+  gtk_editable_select_region (GTK_EDITABLE (fill_type_data->width_entry), 
                            0, strlen (text));
   g_free(text);
 
@@ -1220,7 +1116,7 @@ static void fill_type_dialog_set_values(struct fill_type_data *fill_type_data,
   else
     text = g_strdup_printf ("%d", pitch1);
   gtk_entry_set_text (GTK_ENTRY (fill_type_data->pitch1_entry), text);
-  gtk_entry_select_region (GTK_ENTRY (fill_type_data->pitch1_entry), 
+  gtk_editable_select_region (GTK_EDITABLE (fill_type_data->pitch1_entry), 
                            0, strlen (text));
   g_free(text);
 
@@ -1229,7 +1125,7 @@ static void fill_type_dialog_set_values(struct fill_type_data *fill_type_data,
   else
     text = g_strdup_printf ("%d", angle1);
   gtk_entry_set_text (GTK_ENTRY (fill_type_data->angle1_entry), text);
-  gtk_entry_select_region (GTK_ENTRY (fill_type_data->angle1_entry), 
+  gtk_editable_select_region (GTK_EDITABLE (fill_type_data->angle1_entry), 
                            0, strlen (text));
   g_free(text);
 
@@ -1238,7 +1134,7 @@ static void fill_type_dialog_set_values(struct fill_type_data *fill_type_data,
   else
     text = g_strdup_printf ("%d", pitch2);
   gtk_entry_set_text (GTK_ENTRY (fill_type_data->pitch2_entry), text);
-  gtk_entry_select_region (GTK_ENTRY (fill_type_data->pitch2_entry), 
+  gtk_editable_select_region (GTK_EDITABLE (fill_type_data->pitch2_entry), 
                            0, strlen (text));
   g_free(text);
 
@@ -1247,7 +1143,7 @@ static void fill_type_dialog_set_values(struct fill_type_data *fill_type_data,
   else
     text = g_strdup_printf ("%d", angle2);
   gtk_entry_set_text (GTK_ENTRY (fill_type_data->angle2_entry), text);
-  gtk_entry_select_region (GTK_ENTRY (fill_type_data->angle2_entry), 
+  gtk_editable_select_region (GTK_EDITABLE (fill_type_data->angle2_entry), 
                            0, strlen (text));
   g_free(text);
 }
@@ -1261,18 +1157,13 @@ static void fill_type_dialog_set_values(struct fill_type_data *fill_type_data,
 static gint fill_type_dialog_filltype_change(GtkWidget *w, gpointer data)
 {
   struct fill_type_data *fill_type_data = (struct fill_type_data*) data;
-  GtkWidget *menuitem;
   gboolean activate_width_entry;
   gboolean activate_anglepitch1_entries;
   gboolean activate_anglepitch2_entries;
-  gint type;
-
-  menuitem = gtk_menu_get_active (
-    GTK_MENU (gtk_option_menu_get_menu (
-                GTK_OPTION_MENU (fill_type_data->fill_type))));
+  OBJECT_FILLING type;
 
-  type = GPOINTER_TO_INT(
-    gtk_object_get_data (GTK_OBJECT (menuitem), "filltype"));
+  type = (OBJECT_FILLING) gtk_combo_box_get_active (
+    GTK_COMBO_BOX (fill_type_data->fill_type));
   switch(type) {
   case(FILLING_HOLLOW):
   case(FILLING_FILL):
@@ -1344,13 +1235,10 @@ static void fill_type_dialog_ok(GtkWidget *w, gpointer data)
                                      fill_type_data->angle2_entry));
   pitch2_str = gtk_entry_get_text (GTK_ENTRY (
                                      fill_type_data->pitch2_entry));
-  type = GPOINTER_TO_INT(
-    gtk_object_get_data (
-      GTK_OBJECT (
-        gtk_menu_get_active (
-          GTK_MENU (gtk_option_menu_get_menu (
-                      GTK_OPTION_MENU (
-                        fill_type_data->fill_type))))), "filltype"));
+
+  type = (OBJECT_FILLING) gtk_combo_box_get_active (
+    GTK_COMBO_BOX (fill_type_data->fill_type));
+ 
   if (type == FILLING_VOID)
     type = -1;
 
@@ -1446,7 +1334,7 @@ void fill_type_dialog(GSCHEM_TOPLEVEL *w_current)
 {
   GtkWidget *dialog;
   GtkWidget *vbox;
-  GtkWidget *optionmenu = NULL;
+  GtkWidget *filling_cmbtext = NULL;
   GtkWidget *width_entry = NULL;
   GtkWidget *angle1_entry = NULL;
   GtkWidget *pitch1_entry = NULL;
@@ -1488,7 +1376,7 @@ void fill_type_dialog(GSCHEM_TOPLEVEL *w_current)
                                           GTK_RESPONSE_REJECT,
                                           -1);
 
-  gtk_window_position(GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
+  gtk_window_set_position(GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
 
   gtk_dialog_set_default_response(GTK_DIALOG(dialog),
                                   GTK_RESPONSE_ACCEPT);
@@ -1497,7 +1385,7 @@ void fill_type_dialog(GSCHEM_TOPLEVEL *w_current)
                     G_CALLBACK (fill_type_dialog_response),
                     fill_type_data);
 
-  gtk_container_border_width(GTK_CONTAINER(dialog), DIALOG_BORDER_SPACING);
+  gtk_container_set_border_width(GTK_CONTAINER(dialog), DIALOG_BORDER_SPACING);
   vbox = GTK_DIALOG(dialog)->vbox;
   gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
 
@@ -1535,14 +1423,28 @@ void fill_type_dialog(GSCHEM_TOPLEVEL *w_current)
   gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
   gtk_table_attach(GTK_TABLE(table), label, 0,1,5,6, GTK_FILL,0,0,0);
 
-
-  optionmenu = gtk_option_menu_new ();
-  gtk_option_menu_set_menu(GTK_OPTION_MENU(optionmenu),
-                           create_menu_filltype (w_current));
-  gtk_table_attach_defaults(GTK_TABLE(table), optionmenu,
+  /* ComboBoxText entries reflect the order of enum OBJECT_FILLING
+    see libgeda/include/libgeda/struct.h */
+  filling_cmbtext = gtk_combo_box_text_new();
+  gtk_combo_box_text_append_text (      /* FILLING_HOLLOW */
+    GTK_COMBO_BOX_TEXT (filling_cmbtext),
+    N_("Hollow"));
+  gtk_combo_box_text_append_text (      /* FILLING_FILL */
+    GTK_COMBO_BOX_TEXT (filling_cmbtext),
+    N_("Filled"));
+  gtk_combo_box_text_append_text (      /* FILLING_MESH */
+    GTK_COMBO_BOX_TEXT (filling_cmbtext),
+    N_("Mesh"));
+  gtk_combo_box_text_append_text (      /* FILLING_HATCH */
+    GTK_COMBO_BOX_TEXT (filling_cmbtext),
+    N_("Hatch"));
+  gtk_combo_box_text_append_text (      /* FILLING_VOID */
+    GTK_COMBO_BOX_TEXT (filling_cmbtext),
+    N_("*unchanged*"));
+  gtk_table_attach_defaults(GTK_TABLE(table), filling_cmbtext,
                             1,2,0,1);
 
-  g_signal_connect (G_OBJECT (optionmenu), "changed",
+  g_signal_connect (G_OBJECT (filling_cmbtext), "changed",
                     G_CALLBACK (fill_type_dialog_filltype_change),
                     fill_type_data);
 
@@ -1573,7 +1475,7 @@ void fill_type_dialog(GSCHEM_TOPLEVEL *w_current)
 
   /* populate the data structure */
   fill_type_data->dialog = dialog;
-  fill_type_data->fill_type    = optionmenu;
+  fill_type_data->fill_type    = filling_cmbtext;
   fill_type_data->width_entry  = width_entry;
   fill_type_data->angle1_entry = angle1_entry;
   fill_type_data->pitch1_entry = pitch1_entry;
@@ -1587,7 +1489,7 @@ void fill_type_dialog(GSCHEM_TOPLEVEL *w_current)
                               pitch1, angle1, pitch2, angle2);
 
   /* Set the widget activity according to the current filltype */
-  fill_type_dialog_filltype_change(optionmenu, fill_type_data);
+  fill_type_dialog_filltype_change(filling_cmbtext, fill_type_data);
 
   gtk_widget_grab_focus(width_entry);
   gtk_widget_show_all (dialog);
@@ -1674,7 +1576,7 @@ void arc_angle_dialog (GSCHEM_TOPLEVEL *w_current, OBJECT *arc_object)
                                             GTK_RESPONSE_REJECT,
                                             -1);
 
-    gtk_window_position(GTK_WINDOW(w_current->aawindow),
+    gtk_window_set_position(GTK_WINDOW(w_current->aawindow),
                         GTK_WIN_POS_MOUSE);
 
     g_signal_connect (G_OBJECT (w_current->aawindow), "response",
@@ -1684,7 +1586,7 @@ void arc_angle_dialog (GSCHEM_TOPLEVEL *w_current, OBJECT *arc_object)
     gtk_dialog_set_default_response(GTK_DIALOG(w_current->aawindow),
                                     GTK_RESPONSE_ACCEPT);
 
-    gtk_container_border_width(GTK_CONTAINER(w_current->aawindow), DIALOG_BORDER_SPACING);
+    gtk_container_set_border_width(GTK_CONTAINER(w_current->aawindow), DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->aawindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
 
@@ -1818,7 +1720,7 @@ void translate_dialog (GSCHEM_TOPLEVEL *w_current)
                                             GTK_RESPONSE_REJECT,
                                             -1);
 
-    gtk_window_position(GTK_WINDOW (w_current->trwindow),
+    gtk_window_set_position(GTK_WINDOW (w_current->trwindow),
                         GTK_WIN_POS_MOUSE);
 
     g_signal_connect (G_OBJECT (w_current->trwindow), "response",
@@ -1828,7 +1730,7 @@ void translate_dialog (GSCHEM_TOPLEVEL *w_current)
     gtk_dialog_set_default_response(GTK_DIALOG(w_current->trwindow),
                                     GTK_RESPONSE_ACCEPT);
 
-    gtk_container_border_width(GTK_CONTAINER(w_current->trwindow),
+    gtk_container_set_border_width(GTK_CONTAINER(w_current->trwindow),
                                DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->trwindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -1837,7 +1739,8 @@ void translate_dialog (GSCHEM_TOPLEVEL *w_current)
     gtk_misc_set_alignment(GTK_MISC (label), 0, 0);
     gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
 
-    textentry = gtk_entry_new_with_max_length (10);
+    textentry = gtk_entry_new();
+    gtk_entry_set_max_length (GTK_ENTRY (textentry), 10);
     gtk_entry_set_text(GTK_ENTRY(textentry), "0");
     gtk_editable_select_region(GTK_EDITABLE(textentry), 0, -1);
     gtk_entry_set_activates_default(GTK_ENTRY(textentry), TRUE);
@@ -1917,7 +1820,7 @@ void text_size_dialog (GSCHEM_TOPLEVEL *w_current)
                                             GTK_RESPONSE_REJECT,
                                             -1);
 
-    gtk_window_position(GTK_WINDOW(w_current->tswindow),
+    gtk_window_set_position(GTK_WINDOW(w_current->tswindow),
                         GTK_WIN_POS_MOUSE);
 
     g_signal_connect (G_OBJECT (w_current->tswindow), "response",
@@ -1926,7 +1829,7 @@ void text_size_dialog (GSCHEM_TOPLEVEL *w_current)
     gtk_dialog_set_default_response(GTK_DIALOG(w_current->tswindow),
                                     GTK_RESPONSE_ACCEPT);
 
-    gtk_container_border_width(GTK_CONTAINER(w_current->tswindow),
+    gtk_container_set_border_width(GTK_CONTAINER(w_current->tswindow),
                                DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->tswindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -2023,7 +1926,7 @@ void snap_size_dialog (GSCHEM_TOPLEVEL *w_current)
                                             GTK_RESPONSE_REJECT,
                                             -1);
 
-    gtk_window_position(GTK_WINDOW(w_current->tswindow),
+    gtk_window_set_position(GTK_WINDOW(w_current->tswindow),
                         GTK_WIN_POS_MOUSE);
 
     g_signal_connect (G_OBJECT (w_current->tswindow), "response",
@@ -2032,7 +1935,7 @@ void snap_size_dialog (GSCHEM_TOPLEVEL *w_current)
     gtk_dialog_set_default_response(GTK_DIALOG(w_current->tswindow),
                                     GTK_RESPONSE_ACCEPT);
 
-    gtk_container_border_width(GTK_CONTAINER(w_current->tswindow),
+    gtk_container_set_border_width(GTK_CONTAINER(w_current->tswindow),
                                DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->tswindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -2130,7 +2033,7 @@ void slot_edit_dialog (GSCHEM_TOPLEVEL *w_current, const char *string)
                                             GTK_RESPONSE_REJECT,
                                             -1);
 
-    gtk_window_position(GTK_WINDOW(w_current->sewindow),
+    gtk_window_set_position(GTK_WINDOW(w_current->sewindow),
                         GTK_WIN_POS_MOUSE);
 
     gtk_dialog_set_default_response (GTK_DIALOG (w_current->sewindow),
@@ -2140,7 +2043,7 @@ void slot_edit_dialog (GSCHEM_TOPLEVEL *w_current, const char *string)
                       G_CALLBACK (slot_edit_dialog_response),
                       w_current);
 
-    gtk_container_border_width(GTK_CONTAINER(w_current->sewindow),
+    gtk_container_set_border_width(GTK_CONTAINER(w_current->sewindow),
                                DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->sewindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -2278,14 +2181,14 @@ void coord_dialog (GSCHEM_TOPLEVEL *w_current, int x, int y)
                                                          GTK_RESPONSE_REJECT,
                                                          NULL);
 
-    gtk_window_position (GTK_WINDOW (w_current->cowindow),
+    gtk_window_set_position (GTK_WINDOW (w_current->cowindow),
                          GTK_WIN_POS_NONE);
 
     g_signal_connect (G_OBJECT (w_current->cowindow), "response",
                       G_CALLBACK (coord_dialog_response),
                       w_current);
 
-    gtk_container_border_width (GTK_CONTAINER(w_current->cowindow),
+    gtk_container_set_border_width (GTK_CONTAINER(w_current->cowindow),
                                 DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->cowindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -2529,7 +2432,7 @@ create_color_menu (GSCHEM_TOPLEVEL *w_current)
 
   g_signal_connect (cbox,
                     "changed",
-                    GTK_SIGNAL_FUNC (color_menu_change_selection),
+                    G_CALLBACK (color_menu_change_selection),
                     w_current);
 
   return GTK_WIDGET (cbox);
@@ -2610,7 +2513,7 @@ void color_edit_dialog (GSCHEM_TOPLEVEL *w_current)
                                             GTK_RESPONSE_REJECT,
                                             -1);
 
-    gtk_window_position (GTK_WINDOW (w_current->clwindow),
+    gtk_window_set_position (GTK_WINDOW (w_current->clwindow),
                          GTK_WIN_POS_MOUSE);
 
     gtk_dialog_set_default_response (GTK_DIALOG (w_current->clwindow),
@@ -2620,7 +2523,7 @@ void color_edit_dialog (GSCHEM_TOPLEVEL *w_current)
                       G_CALLBACK (color_edit_dialog_response),
                       w_current);
 
-    gtk_container_border_width(GTK_CONTAINER(w_current->clwindow),
+    gtk_container_set_border_width(GTK_CONTAINER(w_current->clwindow),
                                DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->clwindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -2686,7 +2589,7 @@ void x_dialog_hotkeys (GSCHEM_TOPLEVEL *w_current)
                                                          GTK_RESPONSE_REJECT,
                                                          NULL);
 
-    gtk_window_position (GTK_WINDOW (w_current->hkwindow),
+    gtk_window_set_position (GTK_WINDOW (w_current->hkwindow),
                          GTK_WIN_POS_NONE);
 
     g_signal_connect (G_OBJECT (w_current->hkwindow), "response",
@@ -2696,9 +2599,9 @@ void x_dialog_hotkeys (GSCHEM_TOPLEVEL *w_current)
     gtk_dialog_set_default_response(GTK_DIALOG(w_current->hkwindow),
                                     GTK_RESPONSE_ACCEPT);
 
-    gtk_container_border_width (GTK_CONTAINER (w_current->hkwindow),
+    gtk_container_set_border_width (GTK_CONTAINER (w_current->hkwindow),
                                 DIALOG_BORDER_SPACING);
-    gtk_widget_set_usize(w_current->hkwindow, 300,300);
+    gtk_widget_set_size_request(w_current->hkwindow, 300,300);
 
     vbox = GTK_DIALOG(w_current->hkwindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -3047,7 +2950,7 @@ void find_text_dialog(GSCHEM_TOPLEVEL *w_current)
                                             GTK_RESPONSE_REJECT,
                                             -1);
 
-    gtk_window_position(GTK_WINDOW(w_current->tfindwindow),
+    gtk_window_set_position(GTK_WINDOW(w_current->tfindwindow),
                         GTK_WIN_POS_MOUSE);
 
     g_signal_connect (G_OBJECT (w_current->tfindwindow), "response",
@@ -3057,7 +2960,7 @@ void find_text_dialog(GSCHEM_TOPLEVEL *w_current)
     gtk_dialog_set_default_response(GTK_DIALOG(w_current->tfindwindow),
                                      GTK_RESPONSE_ACCEPT);
 
-    gtk_container_border_width(GTK_CONTAINER(w_current->tfindwindow),
+    gtk_container_set_border_width(GTK_CONTAINER(w_current->tfindwindow),
                                DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->tfindwindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -3066,7 +2969,8 @@ void find_text_dialog(GSCHEM_TOPLEVEL *w_current)
     gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
     gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
 
-    textentry = gtk_entry_new_with_max_length(20);
+    textentry = gtk_entry_new();
+    gtk_entry_set_max_length (GTK_ENTRY (textentry), 20);
     gtk_editable_select_region(GTK_EDITABLE(textentry), 0, -1);
     gtk_box_pack_start(GTK_BOX(vbox), textentry, FALSE, FALSE, 0);
     gtk_entry_set_activates_default(GTK_ENTRY(textentry), TRUE);
@@ -3088,7 +2992,7 @@ void find_text_dialog(GSCHEM_TOPLEVEL *w_current)
   /* always select the text string in the entry */
   textentry = g_object_get_data (G_OBJECT (w_current->tfindwindow), "textentry");
   gtk_entry_set_text(GTK_ENTRY(textentry), generic_textstring);
-  gtk_entry_select_region(GTK_ENTRY(textentry), 0, -1);
+  gtk_editable_select_region(GTK_EDITABLE(textentry), 0, -1);
 }
 
 /*********** End of find text dialog box *******/
@@ -3153,7 +3057,7 @@ void hide_text_dialog(GSCHEM_TOPLEVEL * w_current)
                                             GTK_RESPONSE_REJECT,
                                             -1);
 
-    gtk_window_position(GTK_WINDOW(w_current->thidewindow),
+    gtk_window_set_position(GTK_WINDOW(w_current->thidewindow),
                         GTK_WIN_POS_MOUSE);
 
     g_signal_connect (G_OBJECT (w_current->thidewindow), "response",
@@ -3163,7 +3067,7 @@ void hide_text_dialog(GSCHEM_TOPLEVEL * w_current)
     gtk_dialog_set_default_response(GTK_DIALOG(w_current->thidewindow),
                                     GTK_RESPONSE_ACCEPT);
 
-    gtk_container_border_width(GTK_CONTAINER(w_current->thidewindow),
+    gtk_container_set_border_width(GTK_CONTAINER(w_current->thidewindow),
                                DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->thidewindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -3172,7 +3076,8 @@ void hide_text_dialog(GSCHEM_TOPLEVEL * w_current)
     gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
     gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
 
-    textentry = gtk_entry_new_with_max_length(20);
+    textentry = gtk_entry_new();
+    gtk_entry_set_max_length (GTK_ENTRY (textentry), 20);
     gtk_box_pack_start(GTK_BOX(vbox), textentry, FALSE, FALSE, 0);
     gtk_entry_set_activates_default(GTK_ENTRY(textentry), TRUE);
     gtk_widget_grab_focus(textentry);
@@ -3188,7 +3093,7 @@ void hide_text_dialog(GSCHEM_TOPLEVEL * w_current)
   /* always select the text in the search entry */
   textentry = g_object_get_data (G_OBJECT (w_current->thidewindow), "textentry");
   gtk_entry_set_text(GTK_ENTRY(textentry), generic_textstring);
-  gtk_entry_select_region(GTK_ENTRY(textentry), 0, -1);
+  gtk_editable_select_region(GTK_EDITABLE(textentry), 0, -1);
 }
 
 /*********** End of hide text dialog box *******/
@@ -3253,7 +3158,7 @@ void show_text_dialog(GSCHEM_TOPLEVEL * w_current)
                                             GTK_RESPONSE_REJECT,
                                             -1);
 
-    gtk_window_position(GTK_WINDOW(w_current->tshowwindow),
+    gtk_window_set_position(GTK_WINDOW(w_current->tshowwindow),
                         GTK_WIN_POS_MOUSE);
 
     g_signal_connect (G_OBJECT (w_current->tshowwindow), "response",
@@ -3263,7 +3168,7 @@ void show_text_dialog(GSCHEM_TOPLEVEL * w_current)
     gtk_dialog_set_default_response(GTK_DIALOG(w_current->tshowwindow),
                                     GTK_RESPONSE_ACCEPT);
 
-    gtk_container_border_width(GTK_CONTAINER(w_current->tshowwindow),
+    gtk_container_set_border_width(GTK_CONTAINER(w_current->tshowwindow),
                                DIALOG_BORDER_SPACING);
     vbox = GTK_DIALOG(w_current->tshowwindow)->vbox;
     gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
@@ -3272,7 +3177,8 @@ void show_text_dialog(GSCHEM_TOPLEVEL * w_current)
     gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
     gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
 
-    textentry = gtk_entry_new_with_max_length(20);
+    textentry = gtk_entry_new();
+    gtk_entry_set_max_length (GTK_ENTRY (textentry), 20);
     gtk_box_pack_start(GTK_BOX(vbox), textentry, FALSE, FALSE, 0);
     gtk_entry_set_activates_default(GTK_ENTRY(textentry), TRUE);
     gtk_widget_grab_focus(textentry);
@@ -3288,7 +3194,7 @@ void show_text_dialog(GSCHEM_TOPLEVEL * w_current)
   /* always select the text in the entry */
   textentry = g_object_get_data (G_OBJECT (w_current->tshowwindow), "textentry");
   gtk_entry_set_text(GTK_ENTRY(textentry), generic_textstring);
-  gtk_entry_select_region(GTK_ENTRY(textentry), 0, -1);
+  gtk_editable_select_region(GTK_EDITABLE(textentry), 0, -1);
 }
 
 /*********** End of show text dialog box *******/
@@ -4265,11 +4171,11 @@ void x_dialog_edit_pin_type (GSCHEM_TOPLEVEL *w_current, const GList *obj_list)
                                            GTK_RESPONSE_CANCEL,
                                            -1);
 
-  gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
+  gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
 
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
 
-  gtk_container_border_width (GTK_CONTAINER (dialog), DIALOG_BORDER_SPACING);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), DIALOG_BORDER_SPACING);
   vbox = GTK_DIALOG (dialog)->vbox;
   gtk_box_set_spacing (GTK_BOX(vbox), DIALOG_V_SPACING);
 
-- 
1.7.5.4


--------------020306030203000704000304
Content-Type: text/x-diff;
 name="0002-Corrected-translation-N_-foo-to-_-foo.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0002-Corrected-translation-N_-foo-to-_-foo.patch"

From 0d6e246a669066b16e718be8e0e61648d4f076cb Mon Sep 17 00:00:00 2001
From: eikekrumbacher <eike DOT krumbacher AT x-eike DOT de>
Date: Thu, 9 Feb 2012 17:41:26 +0100
Subject: [PATCH 2/2] Corrected translation N_("foo") to _("foo")

---
 gschem/src/x_dialog.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index cf307c3..5b06730 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -938,22 +938,22 @@ void line_type_dialog (GSCHEM_TOPLEVEL *w_current)
   type_cmbtext = gtk_combo_box_text_new();
   gtk_combo_box_text_append_text (      /* TYPE_SOLID */
     GTK_COMBO_BOX_TEXT (type_cmbtext),
-    N_("Solid"));
+    _("Solid"));
   gtk_combo_box_text_append_text (      /* TYPE_DOTTED */
     GTK_COMBO_BOX_TEXT (type_cmbtext),
-    N_("Dotted"));
+    _("Dotted"));
   gtk_combo_box_text_append_text (      /* TYPE_DASHED */
     GTK_COMBO_BOX_TEXT (type_cmbtext),
-    N_("Dashed"));
+    _("Dashed"));
   gtk_combo_box_text_append_text (      /* TYPE_CENTER */
     GTK_COMBO_BOX_TEXT (type_cmbtext),
-    N_("Center"));
+    _("Center"));
   gtk_combo_box_text_append_text (      /* TYPE_PHANTOM */
     GTK_COMBO_BOX_TEXT (type_cmbtext),
-    N_("Phantom"));
+    _("Phantom"));
   gtk_combo_box_text_append_text (      /* TYPE_ERASE */
     GTK_COMBO_BOX_TEXT (type_cmbtext),
-    N_("*unchanged*"));
+    _("*unchanged*"));
   gtk_table_attach_defaults(GTK_TABLE(table), type_cmbtext,
                             1,2,0,1);
 
@@ -984,16 +984,16 @@ void line_type_dialog (GSCHEM_TOPLEVEL *w_current)
   end_cmbtext = gtk_combo_box_text_new();
   gtk_combo_box_text_append_text (      /* END_NONE */
     GTK_COMBO_BOX_TEXT (end_cmbtext),
-    N_("Butt"));
+    _("Butt"));
   gtk_combo_box_text_append_text (      /* END_SQARE */
     GTK_COMBO_BOX_TEXT (end_cmbtext),
-    N_("Square"));
+    _("Square"));
   gtk_combo_box_text_append_text (      /* END_ROUND */
     GTK_COMBO_BOX_TEXT (end_cmbtext),
-    N_("Round"));
+    _("Round"));
   gtk_combo_box_text_append_text (      /* END_VOID */
     GTK_COMBO_BOX_TEXT (end_cmbtext),
-    N_("*unchanged*"));
+    _("*unchanged*"));
   
   gtk_table_attach_defaults(GTK_TABLE(table), end_cmbtext,
                             1,2,4,5);
@@ -1428,19 +1428,19 @@ void fill_type_dialog(GSCHEM_TOPLEVEL *w_current)
   filling_cmbtext = gtk_combo_box_text_new();
   gtk_combo_box_text_append_text (      /* FILLING_HOLLOW */
     GTK_COMBO_BOX_TEXT (filling_cmbtext),
-    N_("Hollow"));
+    _("Hollow"));
   gtk_combo_box_text_append_text (      /* FILLING_FILL */
     GTK_COMBO_BOX_TEXT (filling_cmbtext),
-    N_("Filled"));
+    _("Filled"));
   gtk_combo_box_text_append_text (      /* FILLING_MESH */
     GTK_COMBO_BOX_TEXT (filling_cmbtext),
-    N_("Mesh"));
+    _("Mesh"));
   gtk_combo_box_text_append_text (      /* FILLING_HATCH */
     GTK_COMBO_BOX_TEXT (filling_cmbtext),
-    N_("Hatch"));
+    _("Hatch"));
   gtk_combo_box_text_append_text (      /* FILLING_VOID */
     GTK_COMBO_BOX_TEXT (filling_cmbtext),
-    N_("*unchanged*"));
+    _("*unchanged*"));
   gtk_table_attach_defaults(GTK_TABLE(table), filling_cmbtext,
                             1,2,0,1);
 
-- 
1.7.5.4


--------------020306030203000704000304--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019