Discussion:
[PATCH V2 01/43] Remove deprecated use of GTK_WIDGET_STATE()
(too old to reply)
Riccardo Lucchese
2014-10-14 20:16:53 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_WIDGET_STATE has been
deprecated since version 2.20 and should not be used in newly-written
code. Use gtk_widget_get_state() instead."
---
gschem/src/gschem_accel_label.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gschem/src/gschem_accel_label.c b/gschem/src/gschem_accel_label.c
index b070683..dd90d87 100644
--- a/gschem/src/gschem_accel_label.c
+++ b/gschem/src/gschem_accel_label.c
@@ -256,7 +256,7 @@ gschem_accel_label_expose_event (GtkWidget *widget,

gtk_paint_layout (widget->style,
widget->window,
- GTK_WIDGET_STATE (widget),
+ gtk_widget_get_state(widget),
FALSE,
&event->area,
widget,
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:00 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_object_unref has been
deprecated since version 2.12 and should not be used in newly-written
code. Use g_object_unref() instead."
---
gattrib/src/gtksheet_2_2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index f18c5c4..92fbffe 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -2381,7 +2381,7 @@ gtk_sheet_set_vadjustment (GtkSheet *sheet,
if (sheet->vadjustment)
{
gtk_signal_disconnect_by_data (GTK_OBJECT (sheet->vadjustment), sheet);
- gtk_object_unref (GTK_OBJECT (sheet->vadjustment));
+ g_object_unref(sheet->vadjustment);
}

sheet->vadjustment = adjustment;
@@ -2427,7 +2427,7 @@ gtk_sheet_set_hadjustment (GtkSheet *sheet,
if (sheet->hadjustment)
{
gtk_signal_disconnect_by_data (GTK_OBJECT (sheet->hadjustment), sheet);
- gtk_object_unref (GTK_OBJECT (sheet->hadjustment));
+ g_object_unref(sheet->hadjustment);
}

sheet->hadjustment = adjustment;
@@ -2538,13 +2538,13 @@ gtk_sheet_destroy (GtkObject * object)
if (sheet->hadjustment)
{
gtk_signal_disconnect_by_data (GTK_OBJECT (sheet->hadjustment), sheet);
- gtk_object_unref (GTK_OBJECT (sheet->hadjustment));
+ g_object_unref(sheet->hadjustment);
sheet->hadjustment = NULL;
}
if (sheet->vadjustment)
{
gtk_signal_disconnect_by_data (GTK_OBJECT (sheet->vadjustment), sheet);
- gtk_object_unref (GTK_OBJECT (sheet->vadjustment));
+ g_object_unref(sheet->vadjustment);
sheet->vadjustment = NULL;
}
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:01 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_timeout_add has been
deprecated since version 2.4 and should not be used in newly-written
code. Use g_timeout_add() instead."
---
gattrib/src/gtksheet_2_2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 92fbffe..5a1edc3 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -2122,7 +2122,7 @@ gtk_sheet_clip_range (GtkSheet *sheet, const GtkSheetRange *range)
sheet->clip_range=*range;

sheet->interval=0;
- sheet->clip_timer=gtk_timeout_add(TIMEOUT_FLASH, gtk_sheet_flash, sheet);
+ sheet->clip_timer=g_timeout_add(TIMEOUT_FLASH, gtk_sheet_flash, sheet);

gtk_signal_emit(GTK_OBJECT(sheet), sheet_signals[CLIP_RANGE],
&sheet->clip_range);
@@ -4858,7 +4858,7 @@ gtk_sheet_button_press (GtkWidget * widget,
GDK_BUTTON_RELEASE_MASK,
NULL, NULL, event->time);
gtk_grab_add(GTK_WIDGET(sheet));
- sheet->timer=gtk_timeout_add(TIMEOUT_SCROLL, gtk_sheet_scroll, sheet);
+ sheet->timer=g_timeout_add(TIMEOUT_SCROLL, gtk_sheet_scroll, sheet);
GTK_WIDGET_UNSET_FLAGS(sheet->sheet_entry, GTK_HAS_FOCUS);
GTK_WIDGET_SET_FLAGS(GTK_SHEET(sheet), GTK_HAS_FOCUS);
gtk_widget_grab_focus(GTK_WIDGET(sheet));
@@ -4924,7 +4924,7 @@ gtk_sheet_button_press (GtkWidget * widget,
if(sheet->column[column].is_sensitive){;
gtk_sheet_click_cell(sheet, -1, column, &veto);
gtk_grab_add(GTK_WIDGET(sheet));
- sheet->timer=gtk_timeout_add(TIMEOUT_SCROLL, gtk_sheet_scroll, sheet);
+ sheet->timer=g_timeout_add(TIMEOUT_SCROLL, gtk_sheet_scroll, sheet);
GTK_WIDGET_UNSET_FLAGS(sheet->sheet_entry, GTK_HAS_FOCUS);
GTK_WIDGET_SET_FLAGS(GTK_SHEET(sheet), GTK_HAS_FOCUS);
gtk_widget_grab_focus(GTK_WIDGET(sheet));
@@ -4938,7 +4938,7 @@ gtk_sheet_button_press (GtkWidget * widget,
if(sheet->row[row].is_sensitive){
gtk_sheet_click_cell(sheet, row, -1, &veto);
gtk_grab_add(GTK_WIDGET(sheet));
- sheet->timer=gtk_timeout_add(TIMEOUT_SCROLL, gtk_sheet_scroll, sheet);
+ sheet->timer=g_timeout_add(TIMEOUT_SCROLL, gtk_sheet_scroll, sheet);
GTK_WIDGET_UNSET_FLAGS(sheet->sheet_entry, GTK_HAS_FOCUS);
GTK_WIDGET_SET_FLAGS(GTK_SHEET(sheet), GTK_HAS_FOCUS);
gtk_widget_grab_focus(GTK_WIDGET(sheet));
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:10 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_widget_set_usize has been
deprecated since version 2.2 and should not be used in newly-written
code. Use gtk_widget_set_size_request() instead."
---
gschem/src/x_dialog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index c1b360b..fcc0381 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -682,7 +682,7 @@ void x_dialog_hotkeys (GschemToplevel *w_current)

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);
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:03 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_label_set is deprecated
and should not be used in newly-written code. Use gtk_label_set_text()
instead."
---
gschem/src/gschem_bottom_widget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gschem/src/gschem_bottom_widget.c b/gschem/src/gschem_bottom_widget.c
index c5a9341..ae80417 100644
--- a/gschem/src/gschem_bottom_widget.c
+++ b/gschem/src/gschem_bottom_widget.c
@@ -696,7 +696,7 @@ update_grid_label (GschemBottomWidget *widget, GParamSpec *pspec, gpointer unuse

label_text = g_strdup_printf (_("Grid(%s, %s)"), snap_text, grid_text);

- gtk_label_set (GTK_LABEL (widget->grid_label), label_text);
+ gtk_label_set_text(GTK_LABEL(widget->grid_label), label_text);

g_free (grid_text);
g_free (label_text);
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:04 UTC
Permalink
Verbatim from GObject's Reference Manual: "g_type_init has been
deprecated since version 2.36 and should not be used in newly-written
code. The type system is now initialised automatically."
---
libgeda/src/libgeda.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/libgeda/src/libgeda.c b/libgeda/src/libgeda.c
index ce89862..e17ae18 100644
--- a/libgeda/src/libgeda.c
+++ b/libgeda/src/libgeda.c
@@ -49,9 +49,6 @@ void libgeda_init(void)
bind_textdomain_codeset(LIBGEDA_GETTEXT_DOMAIN, "UTF-8");
#endif

- /* Initialise gobject */
- g_type_init ();
-
s_path_sys_data ();
s_path_sys_config ();
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:08 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_timeout_remove has been
deprecated since version 2.4 and should not be used in newly-written
code. Use g_source_remove() instead."
---
gattrib/src/gtksheet_2_2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 4b8c9fa..6614c16 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -2139,7 +2139,7 @@ gtk_sheet_unclip_range(GtkSheet *sheet)
if(!GTK_SHEET_IN_CLIP(sheet)) return;

GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_CLIP);
- gtk_timeout_remove(sheet->clip_timer);
+ g_source_remove(sheet->clip_timer);
gtk_sheet_range_draw(sheet, &sheet->clip_range);

if(gtk_sheet_range_isvisible(sheet, sheet->range))
@@ -2525,12 +2525,12 @@ gtk_sheet_destroy (GtkObject * object)
}

if(sheet->timer){
- gtk_timeout_remove(sheet->timer);
+ g_source_remove(sheet->timer);
sheet->timer = 0;
}

if(sheet->clip_timer){
- gtk_timeout_remove(sheet->clip_timer);
+ g_source_remove(sheet->clip_timer);
sheet->clip_timer = 0;
}

@@ -5162,7 +5162,7 @@ gtk_sheet_button_release (GtkWidget * widget,
if(GTK_SHEET_IN_SELECTION)
gdk_pointer_ungrab (event->time);
if(sheet->timer)
- gtk_timeout_remove(sheet->timer);
+ g_source_remove(sheet->timer);
gtk_grab_remove(GTK_WIDGET(sheet));

GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_SELECTION);
--
2.1.0
Riccardo Lucchese
2014-10-14 20:16:56 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_WIDGET_DRAWABLE has been
deprecated since version 2.20 and should not be used in newly-written
code. Use gtk_widget_is_drawable() instead."
---
gattrib/src/gtksheet_2_2.c | 18 +++++++++---------
gschem/src/gschem_accel_label.c | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index e74f7c6..f18c5c4 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -2165,7 +2165,7 @@ gtk_sheet_flash(gpointer data)
sheet=GTK_SHEET(data);

if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return TRUE;
- if(!GTK_WIDGET_DRAWABLE(GTK_WIDGET(sheet))) return TRUE;
+ if(!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return TRUE;
if(!gtk_sheet_range_isvisible(sheet, sheet->clip_range)) return TRUE;
if(GTK_SHEET_IN_XDRAG(sheet)) return TRUE;
if(GTK_SHEET_IN_YDRAG(sheet)) return TRUE;
@@ -2936,7 +2936,7 @@ gtk_sheet_cell_draw_default (GtkSheet *sheet, gint row, gint col)
g_return_if_fail (sheet != NULL);

/* bail now if we arn't drawable yet */
- if (!GTK_WIDGET_DRAWABLE (sheet)) return;
+ if (!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return;

if (row < 0 || row > sheet->maxrow) return;
if (col < 0 || col > sheet->maxcol) return;
@@ -2987,7 +2987,7 @@ gtk_sheet_cell_draw_border (GtkSheet *sheet, gint row, gint col, gint mask)
g_return_if_fail (sheet != NULL);

/* bail now if we arn't drawable yet */
- if (!GTK_WIDGET_DRAWABLE (sheet)) return;
+ if (!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return;

if (row < 0 || row > sheet->maxrow) return;
if (col < 0 || col > sheet->maxcol) return;
@@ -3062,7 +3062,7 @@ gtk_sheet_cell_draw_label (GtkSheet *sheet, gint row, gint col)
g_return_if_fail (sheet != NULL);

/* bail now if we aren't drawable yet */
- if (!GTK_WIDGET_DRAWABLE (sheet))
+ if (!gtk_widget_is_drawable(GTK_WIDGET(sheet)))
return;

if (row > sheet->maxallocrow) return;
@@ -3217,7 +3217,7 @@ gtk_sheet_range_draw(GtkSheet *sheet, const GtkSheetRange *range)
g_return_if_fail(sheet != NULL);
g_return_if_fail(GTK_SHEET(sheet));

- if(!GTK_WIDGET_DRAWABLE(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return;
if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;
if(!GTK_WIDGET_MAPPED(GTK_WIDGET(sheet))) return;

@@ -4126,7 +4126,7 @@ gtk_sheet_draw_active_cell(GtkSheet *sheet)
{
gint row, col;

- if(!GTK_WIDGET_DRAWABLE(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return;
if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;

row = sheet->active_cell.row;
@@ -4732,7 +4732,7 @@ gtk_sheet_expose (GtkWidget * widget,

sheet = GTK_SHEET (widget);

- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable(widget))
{
range.row0=ROW_FROM_YPIXEL(sheet,event->area.y);
range.col0=COLUMN_FROM_XPIXEL(sheet,event->area.x);
@@ -6009,7 +6009,7 @@ size_allocate_column_title_buttons (GtkSheet * sheet)
sheet->column_title_area.width,
sheet->column_title_area.height);

- if(!GTK_WIDGET_DRAWABLE(sheet)) return;
+ if(!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return;

for (i = MIN_VISIBLE_COLUMN(sheet); i <= MAX_VISIBLE_COLUMN(sheet); i++)
gtk_sheet_button_draw(sheet,-1,i);
@@ -6049,7 +6049,7 @@ size_allocate_row_title_buttons (GtkSheet * sheet)
sheet->row_title_area.width,
sheet->row_title_area.height);

- if(!GTK_WIDGET_DRAWABLE(sheet)) return;
+ if(!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return;

for(i = MIN_VISIBLE_ROW(sheet); i <= MAX_VISIBLE_ROW(sheet); i++)
gtk_sheet_button_draw(sheet,i,-1);
diff --git a/gschem/src/gschem_accel_label.c b/gschem/src/gschem_accel_label.c
index dd90d87..7f45c80 100644
--- a/gschem/src/gschem_accel_label.c
+++ b/gschem/src/gschem_accel_label.c
@@ -208,7 +208,7 @@ gschem_accel_label_expose_event (GtkWidget *widget,

direction = gtk_widget_get_direction (widget);

- if (GTK_WIDGET_DRAWABLE (accel_label))
+ if (gtk_widget_is_drawable(GTK_WIDGET(accel_label)))
{
guint ac_width;
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:12 UTC
Permalink
Verbatim from GLib's Reference Manual: "g_strcasecmp has been
deprecated since version 2.2 and should not be used in newly-written
code". Use g_ascii_strcasecmp() instead.
---
gattrib/src/g_rc.c | 2 +-
gsymcheck/src/g_rc.c | 2 +-
libgeda/src/s_page.c | 2 +-
utils/gschlas/g_rc.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gattrib/src/g_rc.c b/gattrib/src/g_rc.c
index 95a3068..14eea61 100644
--- a/gattrib/src/g_rc.c
+++ b/gattrib/src/g_rc.c
@@ -66,7 +66,7 @@ SCM g_rc_gattrib_version(SCM scm_version)
SCM_ARG1, "gattrib-version");

version = scm_to_utf8_string (scm_version);
- if (g_strcasecmp (version, PACKAGE_DATE_VERSION) != 0) {
+ if (g_ascii_strcasecmp(version, PACKAGE_DATE_VERSION) != 0) {
fprintf(stderr,
_("You are running gEDA/gaf version [%s%s.%s],\nbut you have a version [%s] gattribrc file.\nPlease be sure that you have the latest rc file.\n"),
PREPEND_VERSION_STRING, PACKAGE_DOTTED_VERSION,
diff --git a/gsymcheck/src/g_rc.c b/gsymcheck/src/g_rc.c
index 0524a6e..103ecfb 100644
--- a/gsymcheck/src/g_rc.c
+++ b/gsymcheck/src/g_rc.c
@@ -53,7 +53,7 @@ SCM g_rc_gsymcheck_version(SCM scm_version)
SCM_ARG1, "gsymcheck-version");

version = scm_to_utf8_string (scm_version);
- if (g_strcasecmp (version, PACKAGE_DATE_VERSION) != 0) {
+ if (g_ascii_strcasecmp(version, PACKAGE_DATE_VERSION) != 0) {
fprintf(stderr, _(
"You are running gEDA/gaf version [%s%s.%s],\n"
"but you have a version [%s] gsymcheckrc file:\n[%s]\n"
diff --git a/libgeda/src/s_page.c b/libgeda/src/s_page.c
index c85d357..f276a49 100644
--- a/libgeda/src/s_page.c
+++ b/libgeda/src/s_page.c
@@ -413,7 +413,7 @@ PAGE *s_page_search (TOPLEVEL *toplevel, const gchar *filename)
iter = g_list_next( iter ) ) {

page = (PAGE *)iter->data;
- if ( g_strcasecmp( page->page_filename, filename ) == 0 )
+ if (g_ascii_strcasecmp(page->page_filename, filename) == 0 )
return page;
}
return NULL;
diff --git a/utils/gschlas/g_rc.c b/utils/gschlas/g_rc.c
index c4355ee..da6d8e1 100644
--- a/utils/gschlas/g_rc.c
+++ b/utils/gschlas/g_rc.c
@@ -51,7 +51,7 @@ SCM g_rc_gschlas_version(SCM scm_version)
SCM_ARG1, "gschlas-version");

version = scm_to_utf8_string (scm_version);
- if (g_strcasecmp (version, PACKAGE_DATE_VERSION) != 0) {
+ if (g_ascii_strcasecmp(version, PACKAGE_DATE_VERSION) != 0) {
fprintf(stderr,
"You are running gEDA/gaf version [%s%s.%s],\n",
PREPEND_VERSION_STRING, PACKAGE_DOTTED_VERSION,
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:13 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_WIDGET_MAPPED has been
deprecated since version 2.20 and should not be used in newly-written
code. Use gtk_widget_get_mapped() instead."
---
gattrib/src/gtksheet_2_2.c | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index bc505f0..6e31514 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -1368,7 +1368,7 @@ gtk_sheet_thaw(GtkSheet *sheet)
"value_changed");

if(sheet->state == GTK_STATE_NORMAL)
- if(sheet->sheet_entry && GTK_WIDGET_MAPPED(sheet->sheet_entry)){
+ if(sheet->sheet_entry && gtk_widget_get_mapped(sheet->sheet_entry)){
gtk_sheet_activate_cell(sheet, sheet->active_cell.row, sheet->active_cell.col);
/*
gtk_signal_connect(GTK_OBJECT(gtk_sheet_get_entry(sheet)),
@@ -2826,7 +2826,7 @@ gtk_sheet_map (GtkWidget * widget)

sheet = GTK_SHEET (widget);

- if (!GTK_WIDGET_MAPPED (widget))
+ if (!gtk_widget_get_mapped(widget))
{
gtk_widget_set_mapped(widget, TRUE);

@@ -2843,20 +2843,20 @@ gtk_sheet_map (GtkWidget * widget)
gdk_window_show (sheet->row_title_window);
}

- if(!GTK_WIDGET_MAPPED (sheet->sheet_entry)){
+ if(!gtk_widget_get_mapped(sheet->sheet_entry)){
gtk_widget_show (sheet->sheet_entry);
gtk_widget_map (sheet->sheet_entry);
}

if (GTK_WIDGET_VISIBLE (sheet->button) &&
- !GTK_WIDGET_MAPPED (sheet->button)){
+ !gtk_widget_get_mapped(sheet->button)){
gtk_widget_show(sheet->button);
gtk_widget_map (sheet->button);
}

if(GTK_BIN(sheet->button)->child)
if (GTK_WIDGET_VISIBLE (GTK_BIN(sheet->button)->child) &&
- !GTK_WIDGET_MAPPED (GTK_BIN(sheet->button)->child))
+ !gtk_widget_get_mapped(GTK_BIN(sheet->button)->child))
gtk_widget_map (GTK_BIN(sheet->button)->child);

gtk_sheet_range_draw(sheet, NULL);
@@ -2871,7 +2871,7 @@ gtk_sheet_map (GtkWidget * widget)
children = g_list_next(children);

if (GTK_WIDGET_VISIBLE (child->widget) &&
- !GTK_WIDGET_MAPPED (child->widget)){
+ !gtk_widget_get_mapped(child->widget)){
gtk_widget_map (child->widget);
gtk_sheet_position_child(sheet, child);
}
@@ -2892,7 +2892,7 @@ gtk_sheet_unmap (GtkWidget * widget)

sheet = GTK_SHEET (widget);

- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped(widget))
{
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);

@@ -2903,10 +2903,10 @@ gtk_sheet_unmap (GtkWidget * widget)
gdk_window_hide (sheet->row_title_window);
gdk_window_hide (widget->window);

- if (GTK_WIDGET_MAPPED (sheet->sheet_entry))
+ if (gtk_widget_get_mapped(sheet->sheet_entry))
gtk_widget_unmap (sheet->sheet_entry);

- if (GTK_WIDGET_MAPPED (sheet->button))
+ if (gtk_widget_get_mapped(sheet->button))
gtk_widget_unmap (sheet->button);

children = sheet->children;
@@ -2916,7 +2916,7 @@ gtk_sheet_unmap (GtkWidget * widget)
children = g_list_next(children);

if (GTK_WIDGET_VISIBLE (child->widget) &&
- GTK_WIDGET_MAPPED (child->widget))
+ gtk_widget_get_mapped(child->widget))
{
gtk_widget_unmap (child->widget);
}
@@ -3219,7 +3219,7 @@ gtk_sheet_range_draw(GtkSheet *sheet, const GtkSheetRange *range)

if(!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return;
if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;
- if(!GTK_WIDGET_MAPPED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_mapped(GTK_WIDGET(sheet))) return;

if(range == NULL)
{
@@ -6090,7 +6090,7 @@ gtk_sheet_size_allocate_entry(GtkSheet *sheet)
const gchar *text;

if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;
- if(!GTK_WIDGET_MAPPED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_mapped(GTK_WIDGET(sheet))) return;

sheet_entry = GTK_ENTRY(gtk_sheet_get_entry(sheet));

@@ -6514,7 +6514,7 @@ gtk_sheet_button_draw (GtkSheet *sheet, gint row, gint column)
gtk_widget_set_state(child->widget, button->state);

if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
- GTK_WIDGET_MAPPED(child->widget))
+ gtk_widget_get_mapped(child->widget))
{
gtk_widget_size_allocate(child->widget,
&allocation);
@@ -8037,8 +8037,8 @@ gtk_sheet_put(GtkSheet *sheet, GtkWidget *child, gint x, gint y)
(!gtk_widget_get_realized(child) || GTK_WIDGET_NO_WINDOW(child)))
gtk_sheet_realize_child(sheet, child_info);

- if(GTK_WIDGET_MAPPED(GTK_WIDGET(sheet)) &&
- !GTK_WIDGET_MAPPED(child))
+ if(gtk_widget_get_mapped(GTK_WIDGET(sheet)) &&
+ !gtk_widget_get_mapped(child))
gtk_widget_map(child);
}

@@ -8135,8 +8135,8 @@ gtk_sheet_attach (GtkSheet *sheet,
(!gtk_widget_get_realized(widget) || GTK_WIDGET_NO_WINDOW(widget)))
gtk_sheet_realize_child(sheet, child);

- if(GTK_WIDGET_MAPPED(GTK_WIDGET(sheet)) &&
- !GTK_WIDGET_MAPPED(widget))
+ if(gtk_widget_get_mapped(GTK_WIDGET(sheet)) &&
+ !gtk_widget_get_mapped(widget))
gtk_widget_map(widget);
}

@@ -8212,8 +8212,8 @@ gtk_sheet_button_attach (GtkSheet *sheet,
(!gtk_widget_get_realized(widget) || GTK_WIDGET_NO_WINDOW(widget)))
gtk_sheet_realize_child(sheet, child);

- if(GTK_WIDGET_MAPPED(GTK_WIDGET(sheet)) &&
- !GTK_WIDGET_MAPPED(widget))
+ if(gtk_widget_get_mapped(GTK_WIDGET(sheet)) &&
+ !gtk_widget_get_mapped(widget))
gtk_widget_map(widget);
}
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:17 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_WIDGET_VISIBLE has been
deprecated since version 2.20 and should not be used in newly-written
code. Use gtk_widget_get_visible() instead."
---
gattrib/src/gtksheet_2_2.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 30b8748..34804d6 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -1502,7 +1502,7 @@ gtk_sheet_hide_column_titles(GtkSheet *sheet)
if(gtk_widget_get_realized(GTK_WIDGET(sheet))){
if(sheet->column_title_window)
gdk_window_hide(sheet->column_title_window);
- if(GTK_WIDGET_VISIBLE(sheet->button))
+ if(gtk_widget_get_visible(sheet->button))
gtk_widget_hide(sheet->button);

for(col = MIN_VISIBLE_COLUMN(sheet); col <= MAX_VISIBLE_COLUMN(sheet); col++){
@@ -1534,7 +1534,7 @@ gtk_sheet_hide_row_titles(GtkSheet *sheet)
if(gtk_widget_get_realized(GTK_WIDGET(sheet))){
if(sheet->row_title_window)
gdk_window_hide(sheet->row_title_window);
- if(GTK_WIDGET_VISIBLE(sheet->button))
+ if(gtk_widget_get_visible(sheet->button))
gtk_widget_hide(sheet->button);
for(row = MIN_VISIBLE_ROW(sheet); row <= MAX_VISIBLE_ROW(sheet); row++){
GtkSheetChild *child;
@@ -2848,14 +2848,14 @@ gtk_sheet_map (GtkWidget * widget)
gtk_widget_map (sheet->sheet_entry);
}

- if (GTK_WIDGET_VISIBLE (sheet->button) &&
+ if (gtk_widget_get_visible(sheet->button) &&
!gtk_widget_get_mapped(sheet->button)){
gtk_widget_show(sheet->button);
gtk_widget_map (sheet->button);
}

if(GTK_BIN(sheet->button)->child)
- if (GTK_WIDGET_VISIBLE (GTK_BIN(sheet->button)->child) &&
+ if (gtk_widget_get_visible(GTK_BIN(sheet->button)->child) &&
!gtk_widget_get_mapped(GTK_BIN(sheet->button)->child))
gtk_widget_map (GTK_BIN(sheet->button)->child);

@@ -2870,7 +2870,7 @@ gtk_sheet_map (GtkWidget * widget)
child = children->data;
children = g_list_next(children);

- if (GTK_WIDGET_VISIBLE (child->widget) &&
+ if (gtk_widget_get_visible(child->widget) &&
!gtk_widget_get_mapped(child->widget)){
gtk_widget_map (child->widget);
gtk_sheet_position_child(sheet, child);
@@ -2915,7 +2915,7 @@ gtk_sheet_unmap (GtkWidget * widget)
child = children->data;
children = g_list_next(children);

- if (GTK_WIDGET_VISIBLE (child->widget) &&
+ if (gtk_widget_get_visible(child->widget) &&
gtk_widget_get_mapped(child->widget))
{
gtk_widget_unmap (child->widget);
@@ -3882,7 +3882,7 @@ gtk_sheet_entry_changed(GtkWidget *widget, gpointer data)

sheet=GTK_SHEET(data);

- if(!GTK_WIDGET_VISIBLE(widget)) return;
+ if(!gtk_widget_get_visible(widget)) return;
if(sheet->state != GTK_STATE_NORMAL) return;

row=sheet->active_cell.row;
@@ -8031,7 +8031,7 @@ gtk_sheet_put(GtkSheet *sheet, GtkWidget *child, gint x, gint y)

gtk_widget_size_request(child, &child_requisition);

- if (GTK_WIDGET_VISIBLE(GTK_WIDGET(sheet)))
+ if (gtk_widget_get_visible(GTK_WIDGET(sheet)))
{
if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
(!gtk_widget_get_realized(child) || GTK_WIDGET_NO_WINDOW(child)))
@@ -8129,7 +8129,7 @@ gtk_sheet_attach (GtkSheet *sheet,
child->x = area.x + child->xpadding;
child->y = area.y + child->ypadding;

- if (GTK_WIDGET_VISIBLE(GTK_WIDGET(sheet)))
+ if (gtk_widget_get_visible(GTK_WIDGET(sheet)))
{
if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
(!gtk_widget_get_realized(widget) || GTK_WIDGET_NO_WINDOW(widget)))
@@ -8206,7 +8206,7 @@ gtk_sheet_button_attach (GtkSheet *sheet,
sheet->row[row].height = button_requisition.height;
}

- if (GTK_WIDGET_VISIBLE(GTK_WIDGET(sheet)))
+ if (gtk_widget_get_visible(GTK_WIDGET(sheet)))
{
if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
(!gtk_widget_get_realized(widget) || GTK_WIDGET_NO_WINDOW(widget)))
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:16 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_OBJECT_TYPE has been
deprecated since version 2.20 and should not be used in newly-written
code. Use G_OBJECT_TYPE() instead."
---
gattrib/src/gtksheet_2_2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 5bac8a5..30b8748 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -601,7 +601,7 @@ _gtkextra_signal_emit(GtkObject *object, guint signal_id, ...)

va_start (var_args, signal_id);

- g_value_init(instance_and_params + 0, GTK_OBJECT_TYPE(object));
+ g_value_init(instance_and_params + 0, G_OBJECT_TYPE(object));
g_value_set_instance (instance_and_params + 0, G_OBJECT(object));

g_signal_query(signal_id, &query);
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:29 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_SIGNAL_FUNC is deprecated
and should not be used in newly-written code." Use G_CALLBACK instead.
---
gattrib/src/x_window.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gattrib/src/x_window.c b/gattrib/src/x_window.c
index 8f3d00a..b94cf3e 100644
--- a/gattrib/src/x_window.c
+++ b/gattrib/src/x_window.c
@@ -94,7 +94,7 @@ x_window_init()
gtk_window_set_default_size(GTK_WINDOW(window), 750, 600);

g_signal_connect(window, "delete_event",
- GTK_SIGNAL_FUNC(gattrib_really_quit), 0);
+ G_CALLBACK(gattrib_really_quit), 0);

/* ----- Now create main_vbox. This is a container which organizes child ----- */
/* ----- widgets into a vertical column. ----- */
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:35 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_object_ref is deprecated
and should not be used in newly-written code. Use g_object_ref()
instead."
---
gattrib/src/gtksheet_2_2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index d412170..7ef26b3 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -2378,7 +2378,7 @@ gtk_sheet_set_vadjustment (GtkSheet *sheet,

if (sheet->vadjustment)
{
- gtk_object_ref (GTK_OBJECT (sheet->vadjustment));
+ g_object_ref(sheet->vadjustment);
g_object_ref_sink(sheet->vadjustment);

g_signal_connect(sheet->vadjustment, "changed",
@@ -2423,7 +2423,7 @@ gtk_sheet_set_hadjustment (GtkSheet *sheet,

if (sheet->hadjustment)
{
- gtk_object_ref (GTK_OBJECT (sheet->hadjustment));
+ g_object_ref(sheet->hadjustment);
g_object_ref_sink(sheet->hadjustment);

g_signal_connect(sheet->hadjustment, "changed",
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:31 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_signal_connect_object is
deprecated and should not be used in newly-written code." Use
g_signal_connect_swapped instead.
---
gattrib/src/gtksheet_2_2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index eb56d43..9a0f78c 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -6205,10 +6205,10 @@ create_sheet_entry(GtkSheet *sheet)

/* #if 0 */
/* SDB says: I need to work out the event passing system */
- gtk_signal_connect_object(GTK_OBJECT(entry),"key_press_event",
- (GtkSignalFunc) gtk_sheet_key_press,
- GTK_OBJECT(sheet));
- /* gtk_signal_connect_object(GTK_OBJECT(entry),"key_press_event",
+ g_signal_connect_swapped(entry, "key_press_event",
+ (GtkSignalFunc)gtk_sheet_key_press,
+ GTK_OBJECT(sheet));
+ /* g_signal_connect_swapped(entry,"key_press_event",
(GtkSignalFunc) gtk_sheet_entry_key_press,
GTK_OBJECT(sheet));
*/
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:20 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_entry_set_editable has
been deprecated since version 2.0 and should not be used in
newly-written code. Use gtk_editable_set_editable() instead."
---
gattrib/src/gtksheet_2_2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 34804d6..00ccc4b 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -4099,9 +4099,9 @@ gtk_sheet_show_active_cell(GtkSheet *sheet)
gtk_entry_set_visibility(GTK_ENTRY(sheet_entry), attributes.is_visible);

if(gtk_sheet_locked(sheet) || !attributes.is_editable){
- gtk_entry_set_editable(GTK_ENTRY(sheet_entry), FALSE);
+ gtk_editable_set_editable(GTK_EDITABLE(sheet_entry), FALSE);
}else{
- gtk_entry_set_editable(GTK_ENTRY(sheet_entry), TRUE);
+ gtk_editable_set_editable(GTK_EDITABLE(sheet_entry), TRUE);
}
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:27 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_CLASS_TYPE is deprecated
and should not be used in newly-written code. Use G_TYPE_FROM_CLASS()
instead."
---
gattrib/src/gtksheet_2_2.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 051fb7a..e81aa45 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -747,7 +747,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[SELECT_ROW] =
gtk_signal_new ("select_row",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, select_row),
gtkextra_VOID__INT,
GTK_TYPE_NONE, 1, GTK_TYPE_INT);
@@ -755,7 +755,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[SELECT_COLUMN] =
gtk_signal_new ("select_column",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, select_column),
gtkextra_VOID__INT,
GTK_TYPE_NONE, 1, GTK_TYPE_INT);
@@ -763,7 +763,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[SELECT_RANGE] =
gtk_signal_new ("select_range",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, select_range),
gtkextra_VOID__BOXED,
GTK_TYPE_NONE, 1, GTK_TYPE_SHEET_RANGE);
@@ -771,7 +771,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[CLIP_RANGE] =
gtk_signal_new ("clip_range",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, clip_range),
gtkextra_VOID__BOXED,
GTK_TYPE_NONE, 1, GTK_TYPE_SHEET_RANGE);
@@ -779,21 +779,21 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[RESIZE_RANGE] =
gtk_signal_new ("resize_range",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, resize_range),
gtkextra_VOID__BOXED_BOXED,
GTK_TYPE_NONE, 2, GTK_TYPE_SHEET_RANGE, GTK_TYPE_SHEET_RANGE);
sheet_signals[MOVE_RANGE] =
gtk_signal_new ("move_range",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, move_range),
gtkextra_VOID__BOXED_BOXED,
GTK_TYPE_NONE, 2, GTK_TYPE_SHEET_RANGE, GTK_TYPE_SHEET_RANGE);
sheet_signals[TRAVERSE] =
gtk_signal_new ("traverse",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, traverse),
gtkextra_BOOLEAN__INT_INT_POINTER_POINTER,
GTK_TYPE_BOOL, 4, GTK_TYPE_INT, GTK_TYPE_INT,
@@ -802,7 +802,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[DEACTIVATE] =
gtk_signal_new ("deactivate",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, deactivate),
gtkextra_BOOLEAN__INT_INT,
GTK_TYPE_BOOL, 2, GTK_TYPE_INT, GTK_TYPE_INT);
@@ -810,7 +810,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[ACTIVATE] =
gtk_signal_new ("activate",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, activate),
gtkextra_BOOLEAN__INT_INT,
GTK_TYPE_BOOL, 2, GTK_TYPE_INT, GTK_TYPE_INT);
@@ -818,7 +818,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[SET_CELL] =
gtk_signal_new ("set_cell",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, set_cell),
gtkextra_VOID__INT_INT,
GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
@@ -826,7 +826,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[CLEAR_CELL] =
gtk_signal_new ("clear_cell",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, clear_cell),
gtkextra_VOID__INT_INT,
GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
@@ -834,7 +834,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[CHANGED] =
gtk_signal_new ("changed",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, changed),
gtkextra_VOID__INT_INT,
GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
@@ -842,7 +842,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[NEW_COL_WIDTH] =
gtk_signal_new ("new_column_width",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, changed),
gtkextra_VOID__INT_INT,
GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
@@ -850,7 +850,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
sheet_signals[NEW_ROW_HEIGHT] =
gtk_signal_new ("new_row_height",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, changed),
gtkextra_VOID__INT_INT,
GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
@@ -860,7 +860,7 @@ gtk_sheet_class_init (GtkSheetClass * klass)
widget_class->set_scroll_adjustments_signal =
gtk_signal_new ("set_scroll_adjustments",
GTK_RUN_LAST,
- GTK_CLASS_TYPE(object_class),
+ G_TYPE_FROM_CLASS(object_class),
GTK_SIGNAL_OFFSET (GtkSheetClass, set_scroll_adjustments),
gtkextra_VOID__OBJECT_OBJECT,
GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:26 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_widget_ref has been
deprecated since version 2.12 and should not be used in newly-written
code. Use g_object_ref() instead."
---
gattrib/src/gtksheet_2_2.c | 6 +++---
gschem/src/x_attribedit.c | 14 +++++++-------
gschem/src/x_autonumber.c | 2 +-
gschem/src/x_dialog.c | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 09bf8fa..051fb7a 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -2684,14 +2684,14 @@ gtk_sheet_realize (GtkWidget * widget)
GDK_GC_SUBWINDOW);

if(sheet->sheet_entry->parent){
- gtk_widget_ref(sheet->sheet_entry);
+ g_object_ref(sheet->sheet_entry);
gtk_widget_unparent(sheet->sheet_entry);
}
gtk_widget_set_parent_window (sheet->sheet_entry, sheet->sheet_window);
gtk_widget_set_parent(sheet->sheet_entry, GTK_WIDGET(sheet));

if(sheet->button && sheet->button->parent){
- gtk_widget_ref(sheet->button);
+ g_object_ref(sheet->button);
gtk_widget_unparent(sheet->button);
}
gtk_widget_set_parent_window(sheet->button, sheet->sheet_window);
@@ -6150,7 +6150,7 @@ create_sheet_entry(GtkSheet *sheet)

if(sheet->sheet_entry){
/* avoids warnings */
- gtk_widget_ref(sheet->sheet_entry);
+ g_object_ref(sheet->sheet_entry);
gtk_widget_unparent(sheet->sheet_entry);
gtk_widget_destroy(sheet->sheet_entry);
}
diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index bc23693..266b2df 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -394,7 +394,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
(GtkAttachOptions) (0), 0, 0);

value_entry = gtk_entry_new ();
- gtk_widget_ref (value_entry);
+ g_object_ref(value_entry);
g_object_set_data_full(G_OBJECT(aewindow), "value_entry", value_entry,
(GtkDestroyNotify)gtk_widget_unref);
gtk_table_attach (GTK_TABLE (table), value_entry, 1, 2, 1, 2,
@@ -404,7 +404,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)

/* Visibility */
visbutton = gtk_check_button_new_with_label (_("Visible"));
- gtk_widget_ref (visbutton);
+ g_object_ref(visbutton);
g_object_set_data_full(G_OBJECT(aewindow), "visbutton", visbutton,
(GtkDestroyNotify)gtk_widget_unref);

@@ -414,7 +414,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
(GtkAttachOptions) (0), 0, 0);

show_options = gtk_option_menu_new ();
- gtk_widget_ref (show_options);
+ g_object_ref(show_options);
g_object_set_data_full(G_OBJECT(aewindow), "show_options", show_options,
(GtkDestroyNotify)gtk_widget_unref);
gtk_widget_show (show_options);
@@ -450,7 +450,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)

addtoallbutton = gtk_radio_button_new_with_label (hbox2_group, _("All"));
hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtoallbutton));
- gtk_widget_ref (addtoallbutton);
+ g_object_ref(addtoallbutton);
g_object_set_data_full(G_OBJECT(aewindow), "addtoallbutton",
addtoallbutton, (GtkDestroyNotify)gtk_widget_unref);
gtk_table_attach(GTK_TABLE(table), addtoallbutton, 0, 1, 0, 1,
@@ -458,7 +458,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)

addtocompsbutton = gtk_radio_button_new_with_label (hbox2_group, _("Components"));
hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtocompsbutton));
- gtk_widget_ref (addtocompsbutton);
+ g_object_ref(addtocompsbutton);
g_object_set_data_full(G_OBJECT(aewindow), "addtocompsbutton",
addtocompsbutton,
(GtkDestroyNotify)gtk_widget_unref);
@@ -467,7 +467,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)

addtonetsbutton = gtk_radio_button_new_with_label (hbox2_group, _("Nets"));
hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtonetsbutton));
- gtk_widget_ref (addtonetsbutton);
+ g_object_ref(addtonetsbutton);
g_object_set_data_full(G_OBJECT(aewindow), "addtonetsbutton",
addtonetsbutton,
(GtkDestroyNotify)gtk_widget_unref);
@@ -476,7 +476,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)

overwritebutton = gtk_check_button_new_with_label (_("Replace existing attributes"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(overwritebutton), TRUE);
- gtk_widget_ref (overwritebutton);
+ g_object_ref(overwritebutton);
g_object_set_data_full(G_OBJECT(aewindow), "overwritebutton",
overwritebutton,
(GtkDestroyNotify)gtk_widget_unref);
diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index 7a94cc1..0926347 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -34,7 +34,7 @@

#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(widget), (GDestroyNotify) gtk_widget_unref)

/** @brief How many entries to keep in the "Search text" combo box. */
#define HISTORY_LENGTH 15
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index fcc0381..97120f1 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -34,7 +34,7 @@

#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(widget), (GDestroyNotify) gtk_widget_unref)
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:18 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_object_set_data_full is
deprecated and should not be used in newly-written code. Use
g_object_set_data_full() instead."
---
gschem/src/x_attribedit.c | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index ee0ad97..641f939 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -395,8 +395,8 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)

value_entry = gtk_entry_new ();
gtk_widget_ref (value_entry);
- gtk_object_set_data_full (GTK_OBJECT (aewindow), "value_entry", value_entry,
- (GtkDestroyNotify) gtk_widget_unref);
+ g_object_set_data_full(G_OBJECT(aewindow), "value_entry", value_entry,
+ (GtkDestroyNotify)gtk_widget_unref);
gtk_table_attach (GTK_TABLE (table), value_entry, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
@@ -405,8 +405,8 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
/* Visibility */
visbutton = gtk_check_button_new_with_label (_("Visible"));
gtk_widget_ref (visbutton);
- gtk_object_set_data_full (GTK_OBJECT (aewindow), "visbutton", visbutton,
- (GtkDestroyNotify) gtk_widget_unref);
+ g_object_set_data_full(G_OBJECT(aewindow), "visbutton", visbutton,
+ (GtkDestroyNotify)gtk_widget_unref);

gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (visbutton), TRUE);
gtk_table_attach (GTK_TABLE (table), visbutton, 0, 1, 2, 3,
@@ -415,9 +415,8 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)

show_options = gtk_option_menu_new ();
gtk_widget_ref (show_options);
- gtk_object_set_data_full (GTK_OBJECT (aewindow), "show_options",
- show_options,
- (GtkDestroyNotify) gtk_widget_unref);
+ g_object_set_data_full(G_OBJECT(aewindow), "show_options", show_options,
+ (GtkDestroyNotify)gtk_widget_unref);
gtk_widget_show (show_options);
gtk_table_attach (GTK_TABLE (table), show_options, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_FILL | GTK_EXPAND),
@@ -452,32 +451,35 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
addtoallbutton = gtk_radio_button_new_with_label (hbox2_group, _("All"));
hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtoallbutton));
gtk_widget_ref (addtoallbutton);
- gtk_object_set_data_full (GTK_OBJECT (aewindow), "addtoallbutton", addtoallbutton,
- (GtkDestroyNotify) gtk_widget_unref);
+ g_object_set_data_full(G_OBJECT(aewindow), "addtoallbutton",
+ addtoallbutton, (GtkDestroyNotify)gtk_widget_unref);
gtk_table_attach(GTK_TABLE(table), addtoallbutton, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL), 0, 0, 0);

addtocompsbutton = gtk_radio_button_new_with_label (hbox2_group, _("Components"));
hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtocompsbutton));
gtk_widget_ref (addtocompsbutton);
- gtk_object_set_data_full (GTK_OBJECT (aewindow), "addtocompsbutton", addtocompsbutton,
- (GtkDestroyNotify) gtk_widget_unref);
+ g_object_set_data_full(G_OBJECT(aewindow), "addtocompsbutton",
+ addtocompsbutton,
+ (GtkDestroyNotify)gtk_widget_unref);
gtk_table_attach(GTK_TABLE(table), addtocompsbutton, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_FILL), 0, 0, 0);

addtonetsbutton = gtk_radio_button_new_with_label (hbox2_group, _("Nets"));
hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtonetsbutton));
gtk_widget_ref (addtonetsbutton);
- gtk_object_set_data_full (GTK_OBJECT (aewindow), "addtonetsbutton", addtonetsbutton,
- (GtkDestroyNotify) gtk_widget_unref);
+ g_object_set_data_full(G_OBJECT(aewindow), "addtonetsbutton",
+ addtonetsbutton,
+ (GtkDestroyNotify)gtk_widget_unref);
gtk_table_attach(GTK_TABLE(table), addtonetsbutton, 2, 3, 0, 1,
(GtkAttachOptions) (GTK_FILL), 0, 0, 0);

overwritebutton = gtk_check_button_new_with_label (_("Replace existing attributes"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(overwritebutton), TRUE);
gtk_widget_ref (overwritebutton);
- gtk_object_set_data_full (GTK_OBJECT (aewindow), "overwritebutton", overwritebutton,
- (GtkDestroyNotify) gtk_widget_unref);
+ g_object_set_data_full(G_OBJECT(aewindow), "overwritebutton",
+ overwritebutton,
+ (GtkDestroyNotify)gtk_widget_unref);
gtk_table_attach(GTK_TABLE(table), overwritebutton, 0, 3, 1, 2,
(GtkAttachOptions) (GTK_FILL), 0, 0, 0);
}
--
2.1.0
Riccardo Lucchese
2014-10-14 20:16:58 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_radio_button_group is
deprecated and should not be used in newly-written code." Use
gtk_radio_button_get_group() instead.
---
gschem/src/x_attribedit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index c744d5f..ef90e2a 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -450,7 +450,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
gtk_container_add (GTK_CONTAINER (alignment), table);

addtoallbutton = gtk_radio_button_new_with_label (hbox2_group, _("All"));
- hbox2_group = gtk_radio_button_group (GTK_RADIO_BUTTON (addtoallbutton));
+ hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtoallbutton));
gtk_widget_ref (addtoallbutton);
gtk_object_set_data_full (GTK_OBJECT (aewindow), "addtoallbutton", addtoallbutton,
(GtkDestroyNotify) gtk_widget_unref);
@@ -458,7 +458,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
(GtkAttachOptions) (GTK_FILL), 0, 0, 0);

addtocompsbutton = gtk_radio_button_new_with_label (hbox2_group, _("Components"));
- hbox2_group = gtk_radio_button_group (GTK_RADIO_BUTTON (addtocompsbutton));
+ hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtocompsbutton));
gtk_widget_ref (addtocompsbutton);
gtk_object_set_data_full (GTK_OBJECT (aewindow), "addtocompsbutton", addtocompsbutton,
(GtkDestroyNotify) gtk_widget_unref);
@@ -466,7 +466,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
(GtkAttachOptions) (GTK_FILL), 0, 0, 0);

addtonetsbutton = gtk_radio_button_new_with_label (hbox2_group, _("Nets"));
- hbox2_group = gtk_radio_button_group (GTK_RADIO_BUTTON (addtonetsbutton));
+ hbox2_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(addtonetsbutton));
gtk_widget_ref (addtonetsbutton);
gtk_object_set_data_full (GTK_OBJECT (aewindow), "addtonetsbutton", addtonetsbutton,
(GtkDestroyNotify) gtk_widget_unref);
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:19 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_toolbar_set_orientation
has been deprecated since version 2.16 and should not be used in
newly-written code. Use gtk_orientable_set_orientation() instead."
---
gschem/src/x_window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index 76f14fb..6df339c 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -288,8 +288,8 @@ void x_window_create_main(GschemToplevel *w_current)

if (w_current->toolbars) {
toolbar = gtk_toolbar_new();
- gtk_toolbar_set_orientation (GTK_TOOLBAR(toolbar),
- GTK_ORIENTATION_HORIZONTAL);
+ gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar),
+ GTK_ORIENTATION_HORIZONTAL);
gtk_toolbar_set_style (GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);

if (w_current->handleboxes) {
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:32 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_WIDGET_NO_WINDOW has been
deprecated since version 2.20 and should not be used in newly-written
code. Use gtk_widget_get_has_window() instead."
---
gattrib/src/gtksheet_2_2.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 9a0f78c..32734d5 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -8011,7 +8011,7 @@ gtk_sheet_put(GtkSheet *sheet, GtkWidget *child, gint x, gint y)
if (gtk_widget_get_visible(GTK_WIDGET(sheet)))
{
if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
- (!gtk_widget_get_realized(child) || GTK_WIDGET_NO_WINDOW(child)))
+ (!gtk_widget_get_realized(child) || !gtk_widget_get_has_window(child)))
gtk_sheet_realize_child(sheet, child_info);

if(gtk_widget_get_mapped(GTK_WIDGET(sheet)) &&
@@ -8109,7 +8109,7 @@ gtk_sheet_attach (GtkSheet *sheet,
if (gtk_widget_get_visible(GTK_WIDGET(sheet)))
{
if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
- (!gtk_widget_get_realized(widget) || GTK_WIDGET_NO_WINDOW(widget)))
+ (!gtk_widget_get_realized(widget) || !gtk_widget_get_has_window(widget)))
gtk_sheet_realize_child(sheet, child);

if(gtk_widget_get_mapped(GTK_WIDGET(sheet)) &&
@@ -8186,7 +8186,7 @@ gtk_sheet_button_attach (GtkSheet *sheet,
if (gtk_widget_get_visible(GTK_WIDGET(sheet)))
{
if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
- (!gtk_widget_get_realized(widget) || GTK_WIDGET_NO_WINDOW(widget)))
+ (!gtk_widget_get_realized(widget) || !gtk_widget_get_has_window(widget)))
gtk_sheet_realize_child(sheet, child);

if(gtk_widget_get_mapped(GTK_WIDGET(sheet)) &&
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:34 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_type_is_a is deprecated
and should not be used in newly-written code." Use g_type_is_a
instead.
---
gattrib/src/gtksheet_2_2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 32734d5..d412170 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -6157,7 +6157,7 @@ create_sheet_entry(GtkSheet *sheet)

if(sheet->entry_type){

- if(!gtk_type_is_a (sheet->entry_type, GTK_TYPE_ENTRY)){
+ if(!g_type_is_a(sheet->entry_type, GTK_TYPE_ENTRY)){

parent = GTK_WIDGET(gtk_type_new(sheet->entry_type));
--
2.1.0
Riccardo Lucchese
2014-10-14 20:16:55 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_entry_select_region has
been deprecated since version 2.0 and should not be used in
newly-written code. Use gtk_editable_select_region() instead."
---
gschem/src/x_attribedit.c | 2 +-
gschem/src/x_dialog.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index a825623..c744d5f 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -520,7 +520,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
if (val) {
gtk_entry_set_text(GTK_ENTRY(value_entry), val);
len = strlen(val);
- gtk_entry_select_region(GTK_ENTRY(value_entry), 0, len);
+ gtk_editable_select_region(GTK_EDITABLE(value_entry), 0, len);
}
gtk_object_set_data(GTK_OBJECT(aewindow), "invocation_flag",
GINT_TO_POINTER(flag));
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index 15f7772..146aea5 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -1052,7 +1052,7 @@ void find_text_dialog(GschemToplevel *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 *******/
@@ -1153,7 +1153,7 @@ void hide_text_dialog(GschemToplevel * 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 *******/
@@ -1254,7 +1254,7 @@ void show_text_dialog(GschemToplevel * 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 *******/
--
2.1.0
Riccardo Lucchese
2014-10-14 20:16:54 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_range_set_update_policy
has been deprecated since version 2.24 and should not be used in
newly-written code." There is only one policy now that corresponds to
'continuous updates'.
---
gschem/src/x_window.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index 2592aff..40faac7 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -233,8 +233,6 @@ void x_window_create_main(GschemToplevel *w_current)
GtkWidget *menubar=NULL;
GtkWidget *toolbar=NULL;
GtkWidget *handlebox=NULL;
- GtkWidget *hscrollbar;
- GtkWidget *vscrollbar;
GtkAdjustment *hadjustment;
GtkAdjustment *vadjustment;
char *right_button_text;
@@ -419,12 +417,6 @@ void x_window_create_main(GschemToplevel *w_current)
policy = (w_current->scrollbars_flag) ? GTK_POLICY_ALWAYS : GTK_POLICY_NEVER;
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (w_current->scrolled), policy, policy);

- hscrollbar = gtk_scrolled_window_get_hscrollbar (GTK_SCROLLED_WINDOW (w_current->scrolled));
- gtk_range_set_update_policy (GTK_RANGE (hscrollbar), GTK_UPDATE_CONTINUOUS);
-
- vscrollbar = gtk_scrolled_window_get_vscrollbar (GTK_SCROLLED_WINDOW (w_current->scrolled));
- gtk_range_set_update_policy (GTK_RANGE (vscrollbar), GTK_UPDATE_CONTINUOUS);
-
/* macro box */
w_current->macro_widget = GTK_WIDGET (g_object_new (GSCHEM_TYPE_MACRO_WIDGET, NULL));
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:09 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_signal_emit_stop_by_name
is deprecated and should not be used in newly-written code. Use
g_signal_stop_emission_by_name() instead."
---
gattrib/src/gtksheet_2_2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 6614c16..bc505f0 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -5571,8 +5571,8 @@ gtk_sheet_key_press(GtkWidget *widget,
case GDK_Return: case GDK_KP_Enter:
if(sheet->state == GTK_SHEET_NORMAL &&
!GTK_SHEET_IN_SELECTION(sheet))
- gtk_signal_emit_stop_by_name(GTK_OBJECT(gtk_sheet_get_entry(sheet)),
- "key_press_event");
+ g_signal_stop_emission_by_name(gtk_sheet_get_entry(sheet),
+ "key_press_event");
row = sheet->active_cell.row;
col = sheet->active_cell.col;
if(sheet->state == GTK_SHEET_COLUMN_SELECTED)
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:23 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_signal_emit_by_name is
deprecated and should not be used in newly-written code. Use
g_signal_emit_by_name() instead."
---
gattrib/src/gtksheet_2_2.c | 63 +++++++++++++++++-----------------------------
1 file changed, 23 insertions(+), 40 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index cfcdad0..09bf8fa 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -1360,11 +1360,9 @@ gtk_sheet_thaw(GtkSheet *sheet)
sheet->old_hadjustment = -1.;

if(sheet->hadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->hadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->hadjustment, "value_changed");
if(sheet->vadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->vadjustment, "value_changed");

if(sheet->state == GTK_STATE_NORMAL)
if(sheet->sheet_entry && gtk_widget_get_mapped(sheet->sheet_entry)){
@@ -1394,8 +1392,7 @@ gtk_sheet_set_row_titles_width(GtkSheet *sheet, guint width)

sheet->old_hadjustment = -1.;
if(sheet->hadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->hadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->hadjustment, "value_changed");
size_allocate_global_button(sheet);
}

@@ -1413,7 +1410,7 @@ gtk_sheet_set_column_titles_height(GtkSheet *sheet, guint height)

sheet->old_vadjustment = -1.;
if(sheet->vadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment),
+ g_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment),
"value_changed");
size_allocate_global_button(sheet);
}
@@ -1448,8 +1445,7 @@ gtk_sheet_show_column_titles(GtkSheet *sheet)

sheet->old_vadjustment = -1.;
if(sheet->vadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->vadjustment, "value_changed");
size_allocate_global_button(sheet);
}

@@ -1483,8 +1479,7 @@ gtk_sheet_show_row_titles(GtkSheet *sheet)

sheet->old_hadjustment = -1.;
if(sheet->hadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->hadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->hadjustment, "value_changed");
size_allocate_global_button(sheet);
}

@@ -1516,8 +1511,7 @@ gtk_sheet_hide_column_titles(GtkSheet *sheet)

sheet->old_vadjustment = -1.;
if(sheet->vadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->vadjustment, "value_changed");
}

void
@@ -1547,8 +1541,7 @@ gtk_sheet_hide_row_titles(GtkSheet *sheet)

sheet->old_hadjustment = -1.;
if(sheet->hadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->hadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->hadjustment, "value_changed");
}

gboolean
@@ -1858,8 +1851,7 @@ gtk_sheet_moveto (GtkSheet * sheet,
sheet->vadjustment->value = y;

sheet->old_vadjustment = -1.;
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->vadjustment, "value_changed");

}

@@ -1893,8 +1885,7 @@ gtk_sheet_moveto (GtkSheet * sheet,
sheet->hadjustment->value = x;

sheet->old_vadjustment = -1.;
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->hadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->hadjustment, "value_changed");

}
}
@@ -5074,7 +5065,7 @@ gtk_sheet_button_release (GtkWidget * widget,

gtk_sheet_set_column_width (sheet, sheet->drag_cell.col, new_column_width (sheet, sheet->drag_cell.col, &x));
sheet->old_hadjustment = -1.;
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->hadjustment), "value_changed");
+ g_signal_emit_by_name (sheet->hadjustment, "value_changed");
return TRUE;
}

@@ -5087,7 +5078,7 @@ gtk_sheet_button_release (GtkWidget * widget,

gtk_sheet_set_row_height (sheet, sheet->drag_cell.row, new_row_height (sheet, sheet->drag_cell.row, &y));
sheet->old_vadjustment = -1.;
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment), "value_changed");
+ g_signal_emit_by_name (sheet->vadjustment, "value_changed");
return TRUE;
}

@@ -5505,7 +5496,7 @@ gtk_sheet_entry_key_press(GtkWidget *widget,
printf("Entered gtk_sheet_entry_key_press. . . . . \n");
#endif

- gtk_signal_emit_by_name(GTK_OBJECT(widget), "key_press_event", key, &focus);
+ gtk_signal_emit_by_name(widget, "key_press_event", key, &focus);
return focus;
}
#endif
@@ -6543,11 +6534,10 @@ adjust_scrollbars (GtkSheet * sheet)
{
sheet->vadjustment->value = MAX(0, SHEET_HEIGHT (sheet) -
sheet->sheet_window_height);
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->vadjustment, "value_changed");
}
*/
- gtk_signal_emit_by_name (GTK_OBJECT(sheet->vadjustment), "changed");
+ g_signal_emit_by_name (sheet->vadjustment, "changed");

}

@@ -6562,11 +6552,10 @@ adjust_scrollbars (GtkSheet * sheet)
{
sheet->hadjustment->value = MAX(0, SHEET_WIDTH (sheet) -
sheet->sheet_window_width);
- gtk_signal_emit_by_name (GTK_OBJECT(sheet->hadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->hadjustment, "value_changed");
}
*/
- gtk_signal_emit_by_name (GTK_OBJECT(sheet->hadjustment), "changed");
+ g_signal_emit_by_name (sheet->hadjustment, "changed");

}
/*
@@ -7052,8 +7041,7 @@ gtk_sheet_add_column(GtkSheet *sheet, guint ncols)

sheet->old_hadjustment = -1.;
if(!GTK_SHEET_IS_FROZEN(sheet) && sheet->hadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->hadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->hadjustment, "value_changed");
}

void
@@ -7073,8 +7061,7 @@ gtk_sheet_add_row(GtkSheet *sheet, guint nrows)

sheet->old_vadjustment = -1.;
if(!GTK_SHEET_IS_FROZEN(sheet) && sheet->vadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->vadjustment, "value_changed");
}

void
@@ -7109,8 +7096,7 @@ gtk_sheet_insert_rows(GtkSheet *sheet, guint row, guint nrows)

sheet->old_vadjustment = -1.;
if(!GTK_SHEET_IS_FROZEN(sheet) && sheet->vadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->vadjustment, "value_changed");

}

@@ -7146,8 +7132,7 @@ gtk_sheet_insert_columns(GtkSheet *sheet, guint col, guint ncols)

sheet->old_hadjustment = -1.;
if(!GTK_SHEET_IS_FROZEN(sheet) && sheet->hadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->hadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->hadjustment, "value_changed");

}

@@ -7213,8 +7198,7 @@ gtk_sheet_delete_rows(GtkSheet *sheet, guint row, guint nrows)

sheet->old_vadjustment = -1.;
if(!GTK_SHEET_IS_FROZEN(sheet) && sheet->vadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->vadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->vadjustment, "value_changed");

}

@@ -7280,8 +7264,7 @@ gtk_sheet_delete_columns(GtkSheet *sheet, guint col, guint ncols)

sheet->old_hadjustment = -1.;
if(!GTK_SHEET_IS_FROZEN(sheet) && sheet->hadjustment)
- gtk_signal_emit_by_name (GTK_OBJECT (sheet->hadjustment),
- "value_changed");
+ g_signal_emit_by_name (sheet->hadjustment, "value_changed");

}
--
2.1.0
Riccardo Lucchese
2014-10-14 20:16:57 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_window_position is
deprecated and should not be used in newly-written code. Use
gtk_window_set_position() instead."
---
gschem/src/x_autonumber.c | 3 +--
gschem/src/x_dialog.c | 32 +++++++++++++++-----------------
gschem/src/x_image.c | 3 +--
gschem/src/x_newtext.c | 3 +--
4 files changed, 18 insertions(+), 23 deletions(-)

diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index 63f58f1..ee495e1 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -1215,8 +1215,7 @@ GtkWidget* autonumber_create_dialog(GschemToplevel *w_current)
GTK_RESPONSE_REJECT,
-1);

- gtk_window_position (GTK_WINDOW (autonumber_text),
- GTK_WIN_POS_MOUSE);
+ gtk_window_set_position(GTK_WINDOW(autonumber_text), GTK_WIN_POS_MOUSE);

gtk_container_border_width(GTK_CONTAINER(autonumber_text),
DIALOG_BORDER_SPACING);
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index 146aea5..a22f703 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -132,8 +132,8 @@ void arc_angle_dialog (GschemToplevel *w_current, OBJECT *arc_object)
GTK_RESPONSE_REJECT,
-1);

- gtk_window_position(GTK_WINDOW(w_current->aawindow),
- GTK_WIN_POS_MOUSE);
+ gtk_window_set_position(GTK_WINDOW(w_current->aawindow),
+ GTK_WIN_POS_MOUSE);

g_signal_connect (G_OBJECT (w_current->aawindow), "response",
G_CALLBACK (arc_angle_dialog_response),
@@ -276,8 +276,8 @@ void translate_dialog (GschemToplevel *w_current)
GTK_RESPONSE_REJECT,
-1);

- gtk_window_position(GTK_WINDOW (w_current->trwindow),
- GTK_WIN_POS_MOUSE);
+ gtk_window_set_position(GTK_WINDOW(w_current->trwindow),
+ GTK_WIN_POS_MOUSE);

g_signal_connect (G_OBJECT (w_current->trwindow), "response",
G_CALLBACK (translate_dialog_response),
@@ -379,8 +379,8 @@ void slot_edit_dialog (GschemToplevel *w_current, const char *string)
GTK_RESPONSE_REJECT,
-1);

- gtk_window_position(GTK_WINDOW(w_current->sewindow),
- GTK_WIN_POS_MOUSE);
+ gtk_window_set_position(GTK_WINDOW(w_current->sewindow),
+ GTK_WIN_POS_MOUSE);

gtk_dialog_set_default_response (GTK_DIALOG (w_current->sewindow),
GTK_RESPONSE_ACCEPT);
@@ -527,8 +527,7 @@ void coord_dialog (GschemToplevel *w_current, int x, int y)
GTK_RESPONSE_REJECT,
NULL);

- gtk_window_position (GTK_WINDOW (w_current->cowindow),
- GTK_WIN_POS_NONE);
+ 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),
@@ -670,8 +669,7 @@ void x_dialog_hotkeys (GschemToplevel *w_current)
GTK_RESPONSE_REJECT,
NULL);

- gtk_window_position (GTK_WINDOW (w_current->hkwindow),
- GTK_WIN_POS_NONE);
+ gtk_window_set_position(GTK_WINDOW(w_current->hkwindow), GTK_WIN_POS_NONE);

g_signal_connect (G_OBJECT (w_current->hkwindow), "response",
G_CALLBACK (x_dialog_hotkeys_response),
@@ -1011,8 +1009,8 @@ void find_text_dialog(GschemToplevel *w_current)
GTK_RESPONSE_REJECT,
-1);

- gtk_window_position(GTK_WINDOW(w_current->tfindwindow),
- GTK_WIN_POS_MOUSE);
+ gtk_window_set_position(GTK_WINDOW(w_current->tfindwindow),
+ GTK_WIN_POS_MOUSE);

g_signal_connect (G_OBJECT (w_current->tfindwindow), "response",
G_CALLBACK (find_text_dialog_response),
@@ -1118,8 +1116,8 @@ void hide_text_dialog(GschemToplevel * w_current)
GTK_RESPONSE_REJECT,
-1);

- gtk_window_position(GTK_WINDOW(w_current->thidewindow),
- GTK_WIN_POS_MOUSE);
+ gtk_window_set_position(GTK_WINDOW(w_current->thidewindow),
+ GTK_WIN_POS_MOUSE);

g_signal_connect (G_OBJECT (w_current->thidewindow), "response",
G_CALLBACK (hide_text_dialog_response),
@@ -1219,8 +1217,8 @@ void show_text_dialog(GschemToplevel * w_current)
GTK_RESPONSE_REJECT,
-1);

- gtk_window_position(GTK_WINDOW(w_current->tshowwindow),
- GTK_WIN_POS_MOUSE);
+ gtk_window_set_position(GTK_WINDOW(w_current->tshowwindow),
+ GTK_WIN_POS_MOUSE);

g_signal_connect (G_OBJECT (w_current->tshowwindow), "response",
G_CALLBACK (show_text_dialog_response),
@@ -2324,7 +2322,7 @@ void x_dialog_edit_pin_type (GschemToplevel *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);

diff --git a/gschem/src/x_image.c b/gschem/src/x_image.c
index a1e40ea..faaf5ae 100644
--- a/gschem/src/x_image.c
+++ b/gschem/src/x_image.c
@@ -432,8 +432,7 @@ void x_image_setup (GschemToplevel *w_current)
gtk_dialog_set_default_response(GTK_DIALOG(dialog),
GTK_RESPONSE_ACCEPT);

- gtk_window_position (GTK_WINDOW (dialog),
- GTK_WIN_POS_MOUSE);
+ gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE);

gtk_container_set_border_width(GTK_CONTAINER(dialog),
DIALOG_BORDER_SPACING);
diff --git a/gschem/src/x_newtext.c b/gschem/src/x_newtext.c
index 293104e..65fe348 100644
--- a/gschem/src/x_newtext.c
+++ b/gschem/src/x_newtext.c
@@ -228,8 +228,7 @@ static void newtext_init(NewText *dialog)
GTK_RESPONSE_REJECT,
-1);

- gtk_window_position(GTK_WINDOW (dialog),
- GTK_WIN_POS_NONE);
+ gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_NONE);

g_signal_connect (G_OBJECT (dialog), "response",
G_CALLBACK (text_input_dialog_response),
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:06 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_set_locale has been
deprecated since version 2.24 and should not be used in newly-written
code. Use setlocale() directly."

In this case, setlocale() has already been called in main().
---
gschem/src/gschem.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/gschem/src/gschem.c b/gschem/src/gschem.c
index 331690c..99cea9b 100644
--- a/gschem/src/gschem.c
+++ b/gschem/src/gschem.c
@@ -141,9 +141,6 @@ void main_prog(void *closure, int argc, char *argv[])
#endif

#if ENABLE_NLS
- /* this should be equivalent to setlocale (LC_ALL, "") */
- gtk_set_locale();
-
/* This must be the same for all locales */
setlocale(LC_NUMERIC, "C");
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:15 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_style_unref has been
deprecated since version 2.0 and should not be used in newly-written
code. use g_object_unref() instead."
---
gattrib/src/gtksheet_2_2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 6e31514..5bac8a5 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -6152,7 +6152,7 @@ gtk_sheet_size_allocate_entry(GtkSheet *sheet)

gtk_widget_size_allocate(sheet->sheet_entry, &shentry_allocation);

- if(previous_style == style) gtk_style_unref(previous_style);
+ if(previous_style == style) g_object_unref(previous_style);
}
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:14 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_object_set_data is
deprecated and should not be used in newly-written code. Use
g_object_set_data() instead."
---
gschem/src/x_attribedit.c | 12 +++++-------
gschem/src/x_menus.c | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index ef90e2a..ee0ad97 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -513,7 +513,7 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
/* show value only */
gtk_option_menu_set_history (GTK_OPTION_MENU (show_options), 0);
}
- gtk_object_set_data(GTK_OBJECT(aewindow), "attrib", attrib);
+ g_object_set_data(G_OBJECT(aewindow), "attrib", attrib);
if (name) {
gtk_entry_set_text(GTK_ENTRY(attrib_combo_entry), name);
}
@@ -522,16 +522,14 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
len = strlen(val);
gtk_editable_select_region(GTK_EDITABLE(value_entry), 0, len);
}
- gtk_object_set_data(GTK_OBJECT(aewindow), "invocation_flag",
- GINT_TO_POINTER(flag));
+ g_object_set_data(G_OBJECT(aewindow), "invocation_flag",
+ GINT_TO_POINTER(flag));

if (!x_event_get_pointer_position(w_current, TRUE, &wx, &wy)) {
wx = wy = -1;
}
- gtk_object_set_data(GTK_OBJECT(aewindow), "position_wx",
- GINT_TO_POINTER(wx));
- gtk_object_set_data(GTK_OBJECT(aewindow), "position_wy",
- GINT_TO_POINTER(wy));
+ g_object_set_data(G_OBJECT(aewindow), "position_wx", GINT_TO_POINTER(wx));
+ g_object_set_data(G_OBJECT(aewindow), "position_wy", GINT_TO_POINTER(wy));

/* gschem specific */
i = 0;
diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index 8a0e3d1..ac5b0d9 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -215,7 +215,7 @@ get_main_menu(GschemToplevel *w_current)
/* add a handle to the menu_bar object to get access to widget objects */
/* This string should NOT be internationalized */
buf = g_strdup_printf("%s/%s", *raw_menu_name, raw_menu_item_name);
- gtk_object_set_data(GTK_OBJECT(menu_bar), buf, menu_item);
+ g_object_set_data(G_OBJECT(menu_bar), buf, menu_item);
g_free(buf);

scm_dynwind_end();
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:25 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_WIDGET_IS_SENSITIVE has
been deprecated since version 2.20 and should not be used in
newly-written code. Use gtk_widget_is_sensitive() instead."
---
gschem/src/x_compselect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gschem/src/x_compselect.c b/gschem/src/x_compselect.c
index e3be08b..cbc68dc 100644
--- a/gschem/src/x_compselect.c
+++ b/gschem/src/x_compselect.c
@@ -653,7 +653,7 @@ compselect_callback_filter_entry_changed (GtkEditable *editable,
sensitive =
(g_ascii_strcasecmp (gtk_entry_get_text (compselect->entry_filter),
"") != 0);
- if (GTK_WIDGET_IS_SENSITIVE (button) != sensitive) {
+ if (gtk_widget_is_sensitive(button) != sensitive) {
gtk_widget_set_sensitive (button, sensitive);
}
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:05 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_container_border_width is
deprecated and should not be used in newly-written code. Use
gtk_container_set_border_width() instead."
---
gschem/src/gschem_options_dialog.c | 3 +--
gschem/src/x_autonumber.c | 4 ++--
gschem/src/x_dialog.c | 33 +++++++++++++++++----------------
gschem/src/x_window.c | 2 +-
4 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/gschem/src/gschem_options_dialog.c b/gschem/src/gschem_options_dialog.c
index ddd51a4..8c85358 100644
--- a/gschem/src/gschem_options_dialog.c
+++ b/gschem/src/gschem_options_dialog.c
@@ -425,8 +425,7 @@ instance_init (GschemOptionsDialog *dialog)
G_CALLBACK (notify_gschem_toplevel),
NULL);

- gtk_container_border_width (GTK_CONTAINER (dialog),
- DIALOG_BORDER_SPACING);
+ gtk_container_set_border_width(GTK_CONTAINER(dialog), DIALOG_BORDER_SPACING);

dialog->size_group = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);

diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index ee495e1..7a94cc1 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -1217,8 +1217,8 @@ GtkWidget* autonumber_create_dialog(GschemToplevel *w_current)

gtk_window_set_position(GTK_WINDOW(autonumber_text), GTK_WIN_POS_MOUSE);

- gtk_container_border_width(GTK_CONTAINER(autonumber_text),
- DIALOG_BORDER_SPACING);
+ gtk_container_set_border_width(GTK_CONTAINER(autonumber_text),
+ DIALOG_BORDER_SPACING);
vbox1 = GTK_DIALOG(autonumber_text)->vbox;
gtk_box_set_spacing(GTK_BOX(vbox1), DIALOG_V_SPACING);

diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index 1f94835..c1b360b 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -142,7 +142,8 @@ void arc_angle_dialog (GschemToplevel *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);

@@ -286,8 +287,8 @@ void translate_dialog (GschemToplevel *w_current)
gtk_dialog_set_default_response(GTK_DIALOG(w_current->trwindow),
GTK_RESPONSE_ACCEPT);

- gtk_container_border_width(GTK_CONTAINER(w_current->trwindow),
- DIALOG_BORDER_SPACING);
+ 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);

@@ -390,8 +391,8 @@ void slot_edit_dialog (GschemToplevel *w_current, const char *string)
G_CALLBACK (slot_edit_dialog_response),
w_current);

- gtk_container_border_width(GTK_CONTAINER(w_current->sewindow),
- DIALOG_BORDER_SPACING);
+ 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);

@@ -534,8 +535,8 @@ void coord_dialog (GschemToplevel *w_current, int x, int y)
G_CALLBACK (coord_dialog_response),
w_current);

- gtk_container_border_width (GTK_CONTAINER(w_current->cowindow),
- DIALOG_BORDER_SPACING);
+ 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);

@@ -679,8 +680,8 @@ void x_dialog_hotkeys (GschemToplevel *w_current)
gtk_dialog_set_default_response(GTK_DIALOG(w_current->hkwindow),
GTK_RESPONSE_ACCEPT);

- gtk_container_border_width (GTK_CONTAINER (w_current->hkwindow),
- DIALOG_BORDER_SPACING);
+ gtk_container_set_border_width(GTK_CONTAINER(w_current->hkwindow),
+ DIALOG_BORDER_SPACING);
gtk_widget_set_usize(w_current->hkwindow, 300,300);

vbox = GTK_DIALOG(w_current->hkwindow)->vbox;
@@ -1020,8 +1021,8 @@ void find_text_dialog(GschemToplevel *w_current)
gtk_dialog_set_default_response(GTK_DIALOG(w_current->tfindwindow),
GTK_RESPONSE_ACCEPT);

- gtk_container_border_width(GTK_CONTAINER(w_current->tfindwindow),
- DIALOG_BORDER_SPACING);
+ 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);

@@ -1128,8 +1129,8 @@ void hide_text_dialog(GschemToplevel * w_current)
gtk_dialog_set_default_response(GTK_DIALOG(w_current->thidewindow),
GTK_RESPONSE_ACCEPT);

- gtk_container_border_width(GTK_CONTAINER(w_current->thidewindow),
- DIALOG_BORDER_SPACING);
+ 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);

@@ -1230,8 +1231,8 @@ void show_text_dialog(GschemToplevel * w_current)
gtk_dialog_set_default_response(GTK_DIALOG(w_current->tshowwindow),
GTK_RESPONSE_ACCEPT);

- gtk_container_border_width(GTK_CONTAINER(w_current->tshowwindow),
- DIALOG_BORDER_SPACING);
+ 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);

@@ -2330,7 +2331,7 @@ void x_dialog_edit_pin_type (GschemToplevel *w_current, const GList *obj_list)

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);

diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index 58c921a..76f14fb 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -266,7 +266,7 @@ void x_window_create_main(GschemToplevel *w_current)

/* Containers first */
main_box = gtk_vbox_new(FALSE, 1);
- gtk_container_border_width(GTK_CONTAINER(main_box), 0);
+ gtk_container_set_border_width(GTK_CONTAINER(main_box), 0);
gtk_container_add(GTK_CONTAINER(w_current->main_window), main_box);

menubar = get_main_menu (w_current);
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:02 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_WIDGET_SET_FLAGS has been
deprecated since version 2.22 and should not be used in newly-written
code. Use the proper function instead."
---
gattrib/src/gtksheet_2_2.c | 13 ++++---------
gschem/src/x_window.c | 2 +-
2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 5a1edc3..dd12fc3 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -928,7 +928,7 @@ gtk_sheet_init (GtkSheet *sheet)
sheet->state = GTK_SHEET_NORMAL;

GTK_WIDGET_UNSET_FLAGS (sheet, GTK_NO_WINDOW);
- GTK_WIDGET_SET_FLAGS (sheet, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (GTK_WIDGET (sheet), TRUE);

sheet->maxrow = 0;
sheet->maxcol = 0;
@@ -2595,7 +2595,7 @@ gtk_sheet_realize (GtkWidget * widget)

sheet = GTK_SHEET (widget);

- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized(widget, TRUE);

attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
@@ -2828,7 +2828,7 @@ gtk_sheet_map (GtkWidget * widget)

if (!GTK_WIDGET_MAPPED (widget))
{
- GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
+ gtk_widget_set_mapped(widget, TRUE);

if(!sheet->cursor_drag) sheet->cursor_drag=gdk_cursor_new(GDK_PLUS);

@@ -4004,7 +4004,6 @@ gtk_sheet_hide_active_cell(GtkSheet *sheet)
sheet->row[row].height+4);

GTK_WIDGET_UNSET_FLAGS(sheet->sheet_entry, GTK_HAS_FOCUS);
- GTK_WIDGET_SET_FLAGS(GTK_WIDGET(sheet), GTK_HAS_FOCUS);
gtk_widget_grab_focus(GTK_WIDGET(sheet));

GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(sheet->sheet_entry), GTK_VISIBLE);
@@ -4079,7 +4078,7 @@ gtk_sheet_show_active_cell(GtkSheet *sheet)
if(sheet->state != GTK_SHEET_NORMAL) return;
if(GTK_SHEET_IN_SELECTION(sheet)) return;

- GTK_WIDGET_SET_FLAGS(GTK_WIDGET(sheet->sheet_entry), GTK_VISIBLE);
+ gtk_widget_set_visible(GTK_WIDGET(sheet->sheet_entry), TRUE);

sheet_entry = GTK_ENTRY(gtk_sheet_get_entry(sheet));

@@ -4115,7 +4114,6 @@ gtk_sheet_show_active_cell(GtkSheet *sheet)
gtk_sheet_draw_active_cell(sheet);

gtk_widget_grab_focus(GTK_WIDGET(sheet_entry));
- GTK_WIDGET_SET_FLAGS(GTK_WIDGET(sheet_entry), GTK_HAS_FOCUS);
GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(sheet), GTK_HAS_FOCUS);

g_free(text);
@@ -4860,7 +4858,6 @@ gtk_sheet_button_press (GtkWidget * widget,
gtk_grab_add(GTK_WIDGET(sheet));
sheet->timer=g_timeout_add(TIMEOUT_SCROLL, gtk_sheet_scroll, sheet);
GTK_WIDGET_UNSET_FLAGS(sheet->sheet_entry, GTK_HAS_FOCUS);
- GTK_WIDGET_SET_FLAGS(GTK_SHEET(sheet), GTK_HAS_FOCUS);
gtk_widget_grab_focus(GTK_WIDGET(sheet));

if(sheet->selection_mode != GTK_SELECTION_SINGLE &&
@@ -4926,7 +4923,6 @@ gtk_sheet_button_press (GtkWidget * widget,
gtk_grab_add(GTK_WIDGET(sheet));
sheet->timer=g_timeout_add(TIMEOUT_SCROLL, gtk_sheet_scroll, sheet);
GTK_WIDGET_UNSET_FLAGS(sheet->sheet_entry, GTK_HAS_FOCUS);
- GTK_WIDGET_SET_FLAGS(GTK_SHEET(sheet), GTK_HAS_FOCUS);
gtk_widget_grab_focus(GTK_WIDGET(sheet));
GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_SELECTION);
}
@@ -4940,7 +4936,6 @@ gtk_sheet_button_press (GtkWidget * widget,
gtk_grab_add(GTK_WIDGET(sheet));
sheet->timer=g_timeout_add(TIMEOUT_SCROLL, gtk_sheet_scroll, sheet);
GTK_WIDGET_UNSET_FLAGS(sheet->sheet_entry, GTK_HAS_FOCUS);
- GTK_WIDGET_SET_FLAGS(GTK_SHEET(sheet), GTK_HAS_FOCUS);
gtk_widget_grab_focus(GTK_WIDGET(sheet));
GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_SELECTION);
}
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index 40faac7..58c921a 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -105,7 +105,7 @@ void x_window_create_drawing(GtkWidget *scrolled, GschemToplevel *w_current)

gtk_container_add(GTK_CONTAINER(scrolled), w_current->drawing_area);

- GTK_WIDGET_SET_FLAGS (w_current->drawing_area, GTK_CAN_FOCUS );
+ gtk_widget_set_can_focus(w_current->drawing_area, TRUE);
gtk_widget_grab_focus (w_current->drawing_area);
gtk_widget_show (w_current->drawing_area);
}
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:11 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gdk_drawable_get_size has been
deprecated since version 2.24 and should not be used in newly-written
code. Use gdk_window_get_width() and gdk_window_get_height() for
GdkWindows."
---
gschem/src/gschem_page_view.c | 5 ++---
gschem/src/x_event.c | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/gschem/src/gschem_page_view.c b/gschem/src/gschem_page_view.c
index a67ff55..99d502f 100644
--- a/gschem/src/gschem_page_view.c
+++ b/gschem/src/gschem_page_view.c
@@ -359,9 +359,8 @@ gschem_page_view_get_page_geometry (GschemPageView *view)
}

geometry = g_hash_table_lookup (view->geometry_table, page);
-
- /* \todo The following line is deprecated in GDK 2.24 */
- gdk_drawable_get_size (GTK_WIDGET (view)->window, &screen_width, &screen_height);
+ screen_width = gdk_window_get_width(GTK_WIDGET(view)->window);
+ screen_height = gdk_window_get_height(GTK_WIDGET(view)->window);

if (geometry == NULL) {
geometry = gschem_page_geometry_new_with_values (screen_width,
diff --git a/gschem/src/x_event.c b/gschem/src/x_event.c
index c31f913..d33a40a 100644
--- a/gschem/src/x_event.c
+++ b/gschem/src/x_event.c
@@ -1328,8 +1328,8 @@ x_event_get_pointer_position (GschemToplevel *w_current, gboolean snapped, gint
g_return_val_if_fail (page_view != NULL, FALSE);
g_return_val_if_fail (GTK_WIDGET (page_view)->window != NULL, FALSE);

- /* \todo The following line is depricated in GDK 2.24 */
- gdk_drawable_get_size (GTK_WIDGET (page_view)->window, &width, &height);
+ width = gdk_window_get_width(GTK_WIDGET(page_view)->window);
+ height = gdk_window_get_height(GTK_WIDGET(page_view)->window);

gtk_widget_get_pointer(GTK_WIDGET (page_view), &sx, &sy);
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:07 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "GTK_WIDGET_REALIZED has been
deprecated since version 2.20 and should not be used in newly-written
code. Use gtk_widget_get_realized() instead."
---
gattrib/src/gtksheet_2_2.c | 112 +++++++++++++++++++++---------------------
gschem/src/gschem_page_view.c | 2 +-
2 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index dd12fc3..4b8c9fa 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -1214,7 +1214,7 @@ gtk_sheet_set_selection_mode(GtkSheet *sheet, gint mode)
g_return_if_fail (sheet != NULL);
g_return_if_fail (GTK_IS_SHEET (sheet));

- if(GTK_WIDGET_REALIZED(sheet))
+ if(gtk_widget_get_realized (GTK_WIDGET (sheet)))
gtk_sheet_real_unselect_range(sheet, NULL);

sheet->selection_mode = mode;
@@ -1325,7 +1325,7 @@ gtk_sheet_set_title(GtkSheet *sheet, const gchar *title)

sheet->name = g_strdup (title);

- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)) || !title) return;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet)) || !title) return;

if(GTK_BIN(sheet->button)->child)
label = GTK_BIN(sheet->button)->child;
@@ -1429,7 +1429,7 @@ gtk_sheet_show_column_titles(GtkSheet *sheet)
sheet->column_titles_visible = TRUE;
gtk_sheet_recalc_top_ypixels(sheet, 0);
gtk_sheet_recalc_left_xpixels(sheet, 0);
- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))){
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet))){
gdk_window_show(sheet->column_title_window);
gdk_window_move_resize (sheet->column_title_window,
sheet->column_title_area.x,
@@ -1464,7 +1464,7 @@ gtk_sheet_show_row_titles(GtkSheet *sheet)
sheet->row_titles_visible = TRUE;
gtk_sheet_recalc_top_ypixels(sheet, 0);
gtk_sheet_recalc_left_xpixels(sheet, 0);
- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))){
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet))){
gdk_window_show(sheet->row_title_window);
gdk_window_move_resize (sheet->row_title_window,
sheet->row_title_area.x,
@@ -1499,7 +1499,7 @@ gtk_sheet_hide_column_titles(GtkSheet *sheet)
sheet->column_titles_visible = FALSE;
gtk_sheet_recalc_top_ypixels(sheet, 0);
gtk_sheet_recalc_left_xpixels(sheet, 0);
- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))){
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet))){
if(sheet->column_title_window)
gdk_window_hide(sheet->column_title_window);
if(GTK_WIDGET_VISIBLE(sheet->button))
@@ -1531,7 +1531,7 @@ gtk_sheet_hide_row_titles(GtkSheet *sheet)
sheet->row_titles_visible = FALSE;
gtk_sheet_recalc_top_ypixels(sheet, 0);
gtk_sheet_recalc_left_xpixels(sheet, 0);
- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))){
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet))){
if(sheet->row_title_window)
gdk_window_hide(sheet->row_title_window);
if(GTK_WIDGET_VISIBLE(sheet->button))
@@ -1914,7 +1914,7 @@ gtk_sheet_column_set_sensitivity(GtkSheet *sheet, gint column, gboolean sensitiv
else
sheet->column[column].button.state=GTK_STATE_NORMAL;

- if(GTK_WIDGET_REALIZED(sheet) && !GTK_SHEET_IS_FROZEN(sheet))
+ if(gtk_widget_get_realized (GTK_WIDGET (sheet)) && !GTK_SHEET_IS_FROZEN(sheet))
gtk_sheet_button_draw(sheet, -1, column);
}

@@ -1964,7 +1964,7 @@ gtk_sheet_row_set_sensitivity(GtkSheet *sheet, gint row, gboolean sensitive)
else
sheet->row[row].button.state=GTK_STATE_NORMAL;

- if(GTK_WIDGET_REALIZED(sheet) && !GTK_SHEET_IS_FROZEN(sheet))
+ if(gtk_widget_get_realized (GTK_WIDGET (sheet)) && !GTK_SHEET_IS_FROZEN(sheet))
gtk_sheet_button_draw(sheet, row, -1);
}

@@ -2164,7 +2164,7 @@ gtk_sheet_flash(gpointer data)

sheet=GTK_SHEET(data);

- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return TRUE;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return TRUE;
if(!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return TRUE;
if(!gtk_sheet_range_isvisible(sheet, sheet->clip_range)) return TRUE;
if(GTK_SHEET_IN_XDRAG(sheet)) return TRUE;
@@ -2571,7 +2571,7 @@ gtk_sheet_style_set (GtkWidget *widget,
if (GTK_WIDGET_CLASS (parent_class)->style_set)
(*GTK_WIDGET_CLASS (parent_class)->style_set) (widget, previous_style);

- if(GTK_WIDGET_REALIZED(widget))
+ if(gtk_widget_get_realized(widget))
{
gtk_style_set_background (widget->style, widget->window, widget->state);
}
@@ -3218,7 +3218,7 @@ gtk_sheet_range_draw(GtkSheet *sheet, const GtkSheetRange *range)
g_return_if_fail(GTK_SHEET(sheet));

if(!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return;
- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;
if(!GTK_WIDGET_MAPPED(GTK_WIDGET(sheet))) return;

if(range == NULL)
@@ -3348,7 +3348,7 @@ gtk_sheet_range_draw_selection(GtkSheet *sheet, GtkSheetRange range)
return;

if(!gtk_sheet_range_isvisible(sheet, range)) return;
- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;

range.col0=MAX(sheet->range.col0, range.col0);
range.coli=MIN(sheet->range.coli, range.coli);
@@ -3406,7 +3406,7 @@ gtk_sheet_draw_backing_pixmap(GtkSheet *sheet, GtkSheetRange range)
{
gint x,y,width,height;

- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;

x=COLUMN_LEFT_XPIXEL(sheet,range.col0);
y=ROW_TOP_YPIXEL(sheet, range.row0);
@@ -3845,7 +3845,7 @@ gtk_sheet_set_active_cell (GtkSheet *sheet, gint row, gint column)
if(row < 0 || column < 0) return FALSE;
if(row > sheet->maxrow || column > sheet->maxcol) return FALSE;

- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)))
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet)))
{
if(!gtk_sheet_deactivate_cell(sheet)) return FALSE;
}
@@ -3927,7 +3927,7 @@ gtk_sheet_deactivate_cell(GtkSheet *sheet)
g_return_val_if_fail (sheet != NULL, FALSE);
g_return_val_if_fail (GTK_IS_SHEET (sheet), FALSE);

- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return FALSE;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return FALSE;
if(sheet->state != GTK_SHEET_NORMAL) return FALSE;

_gtkextra_signal_emit(GTK_OBJECT(sheet),sheet_signals[DEACTIVATE],
@@ -3960,7 +3960,7 @@ gtk_sheet_hide_active_cell(GtkSheet *sheet)
GtkJustification justification;
GtkSheetCellAttr attributes;

- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;

row=sheet->active_cell.row;
col=sheet->active_cell.col;
@@ -4074,7 +4074,7 @@ gtk_sheet_show_active_cell(GtkSheet *sheet)
if(!(row >= 0 && col >= 0)) /* e.g row or coll == -1. */
return;

- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;
if(sheet->state != GTK_SHEET_NORMAL) return;
if(GTK_SHEET_IN_SELECTION(sheet)) return;

@@ -4125,7 +4125,7 @@ gtk_sheet_draw_active_cell(GtkSheet *sheet)
gint row, col;

if(!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return;
- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;

row = sheet->active_cell.row;
col = sheet->active_cell.col;
@@ -4148,7 +4148,7 @@ gtk_sheet_make_backing_pixmap (GtkSheet *sheet, guint width, guint height)
{
gint pixmap_width, pixmap_height;

- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;

if(width == 0 && height == 0){
width=sheet->sheet_window_width+80;
@@ -4689,7 +4689,7 @@ gtk_sheet_real_unselect_range (GtkSheet * sheet,
gint i;

g_return_if_fail (sheet != NULL);
- g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)));
+ g_return_if_fail (gtk_widget_get_realized(GTK_WIDGET(sheet)));

if(range==NULL){
range=&sheet->range;
@@ -5876,7 +5876,7 @@ gtk_sheet_size_allocate (GtkWidget * widget,
widget->allocation = *allocation;
border_width = GTK_CONTAINER(widget)->border_width;

- if (GTK_WIDGET_REALIZED (widget))
+ if (gtk_widget_get_realized(widget))
gdk_window_move_resize (widget->window,
allocation->x + border_width,
allocation->y + border_width,
@@ -5899,7 +5899,7 @@ gtk_sheet_size_allocate (GtkWidget * widget,
sheet->sheet_window_width = sheet_allocation.width;
sheet->sheet_window_height = sheet_allocation.height;

- if (GTK_WIDGET_REALIZED (widget))
+ if (gtk_widget_get_realized(widget))
gdk_window_move_resize (sheet->sheet_window,
sheet_allocation.x,
sheet_allocation.y,
@@ -5913,7 +5913,7 @@ gtk_sheet_size_allocate (GtkWidget * widget,
sheet->column_title_area.x = sheet->row_title_area.width;
sheet->column_title_area.width = sheet_allocation.width -
sheet->column_title_area.x;
- if(GTK_WIDGET_REALIZED(widget) && sheet->column_titles_visible)
+ if(gtk_widget_get_realized(widget) && sheet->column_titles_visible)
gdk_window_move_resize (sheet->column_title_window,
sheet->column_title_area.x,
sheet->column_title_area.y,
@@ -5934,7 +5934,7 @@ gtk_sheet_size_allocate (GtkWidget * widget,
sheet->row_title_area.height = sheet_allocation.height -
sheet->row_title_area.y;

- if(GTK_WIDGET_REALIZED(widget) && sheet->row_titles_visible)
+ if(gtk_widget_get_realized(widget) && sheet->row_titles_visible)
gdk_window_move_resize (sheet->row_title_window,
sheet->row_title_area.x,
sheet->row_title_area.y,
@@ -5974,7 +5974,7 @@ size_allocate_column_title_buttons (GtkSheet * sheet)
gint x,width;

if (!sheet->column_titles_visible) return;
- if (!GTK_WIDGET_REALIZED (sheet))
+ if (!gtk_widget_get_realized (GTK_WIDGET (sheet)))
return;

width = sheet->sheet_window_width;
@@ -6017,7 +6017,7 @@ size_allocate_row_title_buttons (GtkSheet * sheet)
gint y, height;

if (!sheet->row_titles_visible) return;
- if (!GTK_WIDGET_REALIZED (sheet))
+ if (!gtk_widget_get_realized (GTK_WIDGET (sheet)))
return;

height = sheet->sheet_window_height;
@@ -6089,14 +6089,14 @@ gtk_sheet_size_allocate_entry(GtkSheet *sheet)
gint size, max_size, text_size, column_width;
const gchar *text;

- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;
if(!GTK_WIDGET_MAPPED(GTK_WIDGET(sheet))) return;

sheet_entry = GTK_ENTRY(gtk_sheet_get_entry(sheet));

gtk_sheet_get_attributes(sheet, sheet->active_cell.row, sheet->active_cell.col, &attributes);

- if(GTK_WIDGET_REALIZED(sheet->sheet_entry)){
+ if(gtk_widget_get_realized(sheet->sheet_entry)){

if(!GTK_WIDGET(sheet_entry)->style)
gtk_widget_ensure_style(GTK_WIDGET(sheet_entry));
@@ -6211,7 +6211,7 @@ create_sheet_entry(GtkSheet *sheet)

gtk_widget_size_request(sheet->sheet_entry, NULL);

- if(GTK_WIDGET_REALIZED(sheet))
+ if(gtk_widget_get_realized (GTK_WIDGET (sheet)))
{
gtk_widget_set_parent_window (sheet->sheet_entry, sheet->sheet_window);
gtk_widget_set_parent(sheet->sheet_entry, GTK_WIDGET(sheet));
@@ -6345,7 +6345,7 @@ gtk_sheet_button_draw (GtkSheet *sheet, gint row, gint column)
gchar *words = 0;
gchar label[10];

- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))) return;
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return;

if(row >= 0 && !sheet->row[row].is_visible) return;
if(column >= 0 && !sheet->column[column].is_visible) return;
@@ -6513,7 +6513,7 @@ gtk_sheet_button_draw (GtkSheet *sheet, gint row, gint column)

gtk_widget_set_state(child->widget, button->state);

- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)) &&
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
GTK_WIDGET_MAPPED(child->widget))
{
gtk_widget_size_allocate(child->widget,
@@ -6681,7 +6681,7 @@ vadjustment_value_changed (GtkAdjustment * adjustment,
if(!sheet->column_titles_visible)
sheet->view.row0=ROW_FROM_YPIXEL(sheet, 1);

- if(GTK_WIDGET_REALIZED(sheet->sheet_entry) &&
+ if(gtk_widget_get_realized(sheet->sheet_entry) &&
sheet->state == GTK_SHEET_NORMAL &&
sheet->active_cell.row >= 0 && sheet->active_cell.col >= 0 &&
!gtk_sheet_cell_isvisible(sheet, sheet->active_cell.row,
@@ -6774,7 +6774,7 @@ hadjustment_value_changed (GtkAdjustment * adjustment,
if(!sheet->row_titles_visible)
sheet->view.col0=COLUMN_FROM_XPIXEL(sheet, 1);

- if(GTK_WIDGET_REALIZED(sheet->sheet_entry) &&
+ if(gtk_widget_get_realized(sheet->sheet_entry) &&
sheet->state == GTK_SHEET_NORMAL &&
sheet->active_cell.row >= 0 && sheet->active_cell.col >= 0 &&
!gtk_sheet_cell_isvisible(sheet, sheet->active_cell.row,
@@ -6996,7 +6996,7 @@ gtk_sheet_set_column_width (GtkSheet * sheet,

gtk_sheet_recalc_left_xpixels(sheet, column+1);

- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)) && !GTK_SHEET_IS_FROZEN(sheet)){
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet)) && !GTK_SHEET_IS_FROZEN(sheet)){
size_allocate_column_title_buttons (sheet);
adjust_scrollbars (sheet);
gtk_sheet_size_allocate_entry(sheet);
@@ -7028,7 +7028,7 @@ gtk_sheet_set_row_height (GtkSheet * sheet,

gtk_sheet_recalc_top_ypixels(sheet, row+1);

- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)) && !GTK_SHEET_IS_FROZEN(sheet)){
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet)) && !GTK_SHEET_IS_FROZEN(sheet)){
size_allocate_row_title_buttons (sheet);
adjust_scrollbars (sheet);
gtk_sheet_size_allocate_entry(sheet);
@@ -7050,7 +7050,7 @@ gtk_sheet_add_column(GtkSheet *sheet, guint ncols)

AddColumn(sheet, ncols);

- if(!GTK_WIDGET_REALIZED(sheet)) return;
+ if(!gtk_widget_get_realized (GTK_WIDGET (sheet))) return;

adjust_scrollbars(sheet);

@@ -7071,7 +7071,7 @@ gtk_sheet_add_row(GtkSheet *sheet, guint nrows)

AddRow(sheet, nrows);

- if(!GTK_WIDGET_REALIZED(sheet)) return;
+ if(!gtk_widget_get_realized (GTK_WIDGET (sheet))) return;

if(sheet->state==GTK_SHEET_COLUMN_SELECTED) sheet->range.rowi+=nrows;

@@ -7092,7 +7092,7 @@ gtk_sheet_insert_rows(GtkSheet *sheet, guint row, guint nrows)
g_return_if_fail (sheet != NULL);
g_return_if_fail (GTK_IS_SHEET (sheet));

- if(GTK_WIDGET_REALIZED(sheet))
+ if(gtk_widget_get_realized (GTK_WIDGET (sheet)))
gtk_sheet_real_unselect_range(sheet, NULL);

InsertRow(sheet, row, nrows);
@@ -7108,7 +7108,7 @@ gtk_sheet_insert_rows(GtkSheet *sheet, guint row, guint nrows)
children = g_list_next(children);
}

- if(!GTK_WIDGET_REALIZED(sheet)) return;
+ if(!gtk_widget_get_realized (GTK_WIDGET (sheet))) return;

if(sheet->state==GTK_SHEET_COLUMN_SELECTED) sheet->range.rowi+=nrows;
adjust_scrollbars(sheet);
@@ -7129,7 +7129,7 @@ gtk_sheet_insert_columns(GtkSheet *sheet, guint col, guint ncols)
g_return_if_fail (sheet != NULL);
g_return_if_fail (GTK_IS_SHEET (sheet));

- if(GTK_WIDGET_REALIZED(sheet))
+ if(gtk_widget_get_realized (GTK_WIDGET (sheet)))
gtk_sheet_real_unselect_range(sheet, NULL);

InsertColumn(sheet, col, ncols);
@@ -7145,7 +7145,7 @@ gtk_sheet_insert_columns(GtkSheet *sheet, guint col, guint ncols)
children = g_list_next(children);
}

- if(!GTK_WIDGET_REALIZED(sheet)) return;
+ if(!gtk_widget_get_realized (GTK_WIDGET (sheet))) return;

if(sheet->state==GTK_SHEET_ROW_SELECTED) sheet->range.coli+=ncols;
adjust_scrollbars(sheet);
@@ -7170,7 +7170,7 @@ gtk_sheet_delete_rows(GtkSheet *sheet, guint row, guint nrows)

nrows = MIN(nrows, sheet->maxrow-row+1);

- if(GTK_WIDGET_REALIZED(sheet))
+ if(gtk_widget_get_realized (GTK_WIDGET (sheet)))
gtk_sheet_real_unselect_range(sheet, NULL);

DeleteRow(sheet, row, nrows);
@@ -7197,7 +7197,7 @@ gtk_sheet_delete_rows(GtkSheet *sheet, guint row, guint nrows)
children = g_list_next(children);
}

- if(!GTK_WIDGET_REALIZED(sheet)) return;
+ if(!gtk_widget_get_realized (GTK_WIDGET (sheet))) return;

irow = sheet->active_cell.row;
icol = sheet->active_cell.col;
@@ -7237,7 +7237,7 @@ gtk_sheet_delete_columns(GtkSheet *sheet, guint col, guint ncols)

ncols = MIN(ncols, sheet->maxcol-col+1);

- if(GTK_WIDGET_REALIZED(sheet))
+ if(gtk_widget_get_realized (GTK_WIDGET (sheet)))
gtk_sheet_real_unselect_range(sheet, NULL);

DeleteColumn(sheet, col, ncols);
@@ -7264,7 +7264,7 @@ gtk_sheet_delete_columns(GtkSheet *sheet, guint col, guint ncols)
children = g_list_next(children);
}

- if(!GTK_WIDGET_REALIZED(sheet)) return;
+ if(!gtk_widget_get_realized (GTK_WIDGET (sheet))) return;

irow = sheet->active_cell.row;
icol = sheet->active_cell.col;
@@ -7401,7 +7401,7 @@ gtk_sheet_column_set_justification(GtkSheet *sheet, gint col,

sheet->column[col].justification = justification;

- if(GTK_WIDGET_REALIZED(sheet) && !GTK_SHEET_IS_FROZEN(sheet) &&
+ if(gtk_widget_get_realized (GTK_WIDGET (sheet)) && !GTK_SHEET_IS_FROZEN(sheet) &&
col >= MIN_VISIBLE_COLUMN(sheet) && col <= MAX_VISIBLE_COLUMN(sheet))
gtk_sheet_range_draw(sheet, NULL);

@@ -7633,7 +7633,7 @@ init_attributes(GtkSheet *sheet, gint col, GtkSheetCellAttr *attributes)
/* DEFAULT VALUES */
attributes->foreground = GTK_WIDGET(sheet)->style->black;
attributes->background = sheet->bg_color;
- if(!GTK_WIDGET_REALIZED(GTK_WIDGET(sheet))){
+ if(!gtk_widget_get_realized(GTK_WIDGET(sheet))){
GdkColormap *colormap;
colormap=gdk_colormap_get_system();
gdk_color_black(colormap, &attributes->foreground);
@@ -8033,8 +8033,8 @@ gtk_sheet_put(GtkSheet *sheet, GtkWidget *child, gint x, gint y)

if (GTK_WIDGET_VISIBLE(GTK_WIDGET(sheet)))
{
- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)) &&
- (!GTK_WIDGET_REALIZED(child) || GTK_WIDGET_NO_WINDOW(child)))
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
+ (!gtk_widget_get_realized(child) || GTK_WIDGET_NO_WINDOW(child)))
gtk_sheet_realize_child(sheet, child_info);

if(GTK_WIDGET_MAPPED(GTK_WIDGET(sheet)) &&
@@ -8046,7 +8046,7 @@ gtk_sheet_put(GtkSheet *sheet, GtkWidget *child, gint x, gint y)

/* This will avoid drawing on the titles */

- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)))
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet)))
{
if(sheet->row_titles_visible)
gdk_window_show(sheet->row_title_window);
@@ -8131,8 +8131,8 @@ gtk_sheet_attach (GtkSheet *sheet,

if (GTK_WIDGET_VISIBLE(GTK_WIDGET(sheet)))
{
- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)) &&
- (!GTK_WIDGET_REALIZED(widget) || GTK_WIDGET_NO_WINDOW(widget)))
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
+ (!gtk_widget_get_realized(widget) || GTK_WIDGET_NO_WINDOW(widget)))
gtk_sheet_realize_child(sheet, child);

if(GTK_WIDGET_MAPPED(GTK_WIDGET(sheet)) &&
@@ -8144,7 +8144,7 @@ gtk_sheet_attach (GtkSheet *sheet,

/* This will avoid drawing on the titles */

- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)))
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet)))
{
if(GTK_SHEET_ROW_TITLES_VISIBLE(sheet))
gdk_window_show(sheet->row_title_window);
@@ -8208,8 +8208,8 @@ gtk_sheet_button_attach (GtkSheet *sheet,

if (GTK_WIDGET_VISIBLE(GTK_WIDGET(sheet)))
{
- if(GTK_WIDGET_REALIZED(GTK_WIDGET(sheet)) &&
- (!GTK_WIDGET_REALIZED(widget) || GTK_WIDGET_NO_WINDOW(widget)))
+ if(gtk_widget_get_realized(GTK_WIDGET(sheet)) &&
+ (!gtk_widget_get_realized(widget) || GTK_WIDGET_NO_WINDOW(widget)))
gtk_sheet_realize_child(sheet, child);

if(GTK_WIDGET_MAPPED(GTK_WIDGET(sheet)) &&
@@ -8577,7 +8577,7 @@ gtk_sheet_realize_child(GtkSheet *sheet, GtkSheetChild *child)

widget = GTK_WIDGET(sheet);

- if(GTK_WIDGET_REALIZED(widget)){
+ if(gtk_widget_get_realized(widget)){
if(child->row == -1)
gtk_widget_set_parent_window(child->widget, sheet->column_title_window);
else if(child->col == -1)
diff --git a/gschem/src/gschem_page_view.c b/gschem/src/gschem_page_view.c
index a38a4fe..a67ff55 100644
--- a/gschem/src/gschem_page_view.c
+++ b/gschem/src/gschem_page_view.c
@@ -474,7 +474,7 @@ gschem_page_view_invalidate_object (GschemPageView *view, OBJECT *object)
g_return_if_fail (object != NULL);
g_return_if_fail (view != NULL);

- if (!GTK_WIDGET_REALIZED (GTK_WIDGET (view))) {
+ if (!gtk_widget_get_realized(GTK_WIDGET(view))) {
return;
}
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:22 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_signal_connect is
deprecated and should not be used in newly-written code. Use
g_signal_connect() instead."
---
gattrib/src/gtksheet_2_2.c | 42 ++++++++++++++++++------------------------
gattrib/src/x_window.c | 4 ++--
2 files changed, 20 insertions(+), 26 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 00ccc4b..cfcdad0 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -1120,10 +1120,9 @@ gtk_sheet_change_entry(GtkSheet *sheet, GtkType entry_type)
if(state == GTK_SHEET_NORMAL)
{
gtk_sheet_show_active_cell(sheet);
- gtk_signal_connect(GTK_OBJECT(gtk_sheet_get_entry(sheet)),
- "changed",
- (GtkSignalFunc)gtk_sheet_entry_changed,
- GTK_OBJECT(GTK_WIDGET(sheet)));
+ g_signal_connect(gtk_sheet_get_entry(sheet), "changed",
+ (GtkSignalFunc)gtk_sheet_entry_changed,
+ GTK_OBJECT(GTK_WIDGET(sheet)));
}

}
@@ -2391,12 +2390,11 @@ gtk_sheet_set_vadjustment (GtkSheet *sheet,
gtk_object_ref (GTK_OBJECT (sheet->vadjustment));
gtk_object_sink (GTK_OBJECT (sheet->vadjustment));

- gtk_signal_connect (GTK_OBJECT (sheet->vadjustment), "changed",
- (GtkSignalFunc) vadjustment_changed,
- (gpointer) sheet);
- gtk_signal_connect (GTK_OBJECT (sheet->vadjustment), "value_changed",
- (GtkSignalFunc) vadjustment_value_changed,
- (gpointer) sheet);
+ g_signal_connect(sheet->vadjustment, "changed",
+ (GtkSignalFunc)vadjustment_changed, (gpointer)sheet);
+ g_signal_connect(sheet->vadjustment, "value_changed",
+ (GtkSignalFunc)vadjustment_value_changed,
+ (gpointer)sheet);
}

if (!sheet->vadjustment || !old_adjustment)
@@ -2437,12 +2435,11 @@ gtk_sheet_set_hadjustment (GtkSheet *sheet,
gtk_object_ref (GTK_OBJECT (sheet->hadjustment));
gtk_object_sink (GTK_OBJECT (sheet->hadjustment));

- gtk_signal_connect (GTK_OBJECT (sheet->hadjustment), "changed",
- (GtkSignalFunc) hadjustment_changed,
- (gpointer) sheet);
- gtk_signal_connect (GTK_OBJECT (sheet->hadjustment), "value_changed",
- (GtkSignalFunc) hadjustment_value_changed,
- (gpointer) sheet);
+ g_signal_connect(sheet->hadjustment, "changed",
+ (GtkSignalFunc)hadjustment_changed, (gpointer)sheet);
+ g_signal_connect(sheet->hadjustment, "value_changed",
+ (GtkSignalFunc)hadjustment_value_changed,
+ (gpointer)sheet);
}

if (!sheet->hadjustment || !old_adjustment)
@@ -2743,10 +2740,8 @@ create_global_button(GtkSheet *sheet)
{
sheet->button = gtk_button_new_with_label(" ");

- gtk_signal_connect (GTK_OBJECT (sheet->button),
- "pressed",
- (GtkSignalFunc) global_button_clicked,
- (gpointer) sheet);
+ g_signal_connect(sheet->button, "pressed",
+ (GtkSignalFunc)global_button_clicked, (gpointer)sheet);
}

static void
@@ -4045,10 +4040,9 @@ gtk_sheet_activate_cell(GtkSheet *sheet, gint row, gint col)
GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_SELECTION);
gtk_sheet_show_active_cell(sheet);

- gtk_signal_connect(GTK_OBJECT(gtk_sheet_get_entry(sheet)),
- "changed",
- (GtkSignalFunc)gtk_sheet_entry_changed,
- GTK_OBJECT(GTK_WIDGET(sheet)));
+ g_signal_connect(gtk_sheet_get_entry(sheet), "changed",
+ (GtkSignalFunc)gtk_sheet_entry_changed,
+ GTK_OBJECT(GTK_WIDGET(sheet)));

_gtkextra_signal_emit(GTK_OBJECT(sheet),sheet_signals[ACTIVATE], row, col, &veto);

diff --git a/gattrib/src/x_window.c b/gattrib/src/x_window.c
index a4a665e..8f3d00a 100644
--- a/gattrib/src/x_window.c
+++ b/gattrib/src/x_window.c
@@ -93,8 +93,8 @@ x_window_init()
gtk_window_set_title( GTK_WINDOW(window), _("gattrib -- gEDA attribute editor"));
gtk_window_set_default_size(GTK_WINDOW(window), 750, 600);

- gtk_signal_connect (GTK_OBJECT (window), "delete_event",
- GTK_SIGNAL_FUNC (gattrib_really_quit), 0);
+ g_signal_connect(window, "delete_event",
+ GTK_SIGNAL_FUNC(gattrib_really_quit), 0);

/* ----- Now create main_vbox. This is a container which organizes child ----- */
/* ----- widgets into a vertical column. ----- */
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:28 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_object_sink has been
deprecated since version 2.10 and should not be used in newly-written
code. Use g_object_ref_sink() instead."
---
gattrib/src/gtksheet_2_2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index e81aa45..7a68894 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -2379,7 +2379,7 @@ gtk_sheet_set_vadjustment (GtkSheet *sheet,
if (sheet->vadjustment)
{
gtk_object_ref (GTK_OBJECT (sheet->vadjustment));
- gtk_object_sink (GTK_OBJECT (sheet->vadjustment));
+ g_object_ref_sink(sheet->vadjustment);

g_signal_connect(sheet->vadjustment, "changed",
(GtkSignalFunc)vadjustment_changed, (gpointer)sheet);
@@ -2424,7 +2424,7 @@ gtk_sheet_set_hadjustment (GtkSheet *sheet,
if (sheet->hadjustment)
{
gtk_object_ref (GTK_OBJECT (sheet->hadjustment));
- gtk_object_sink (GTK_OBJECT (sheet->hadjustment));
+ g_object_ref_sink(sheet->hadjustment);

g_signal_connect(sheet->hadjustment, "changed",
(GtkSignalFunc)hadjustment_changed, (gpointer)sheet);
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:21 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_menu_bar_append is
deprecated and should not be used in newly-written code. Use
gtk_menu_shell_append() instead."
---
gschem/src/x_menus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index ac5b0d9..268b888 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -229,7 +229,7 @@ get_main_menu(GschemToplevel *w_current)

gtk_widget_show (root_menu);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu);
- gtk_menu_bar_append (GTK_MENU_BAR (menu_bar), root_menu);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), root_menu);
}
scm_dynwind_end ();
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:24 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_menu_append is deprecated
and should not be used in newly-written code. Use
gtk_menu_shell_append() instead."
---
gschem/src/x_attribedit.c | 6 +++---
gschem/src/x_menus.c | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index 641f939..bc23693 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -423,11 +423,11 @@ void attrib_edit_dialog (GschemToplevel *w_current, OBJECT *attr_obj, int flag)
(GtkAttachOptions) (0), 0, 0);
show_options_menu = gtk_menu_new ();
glade_menuitem = gtk_menu_item_new_with_label (_("Show Value Only"));
- gtk_menu_append (GTK_MENU (show_options_menu), glade_menuitem);
+ gtk_menu_shell_append(GTK_MENU_SHELL(show_options_menu), glade_menuitem);
glade_menuitem = gtk_menu_item_new_with_label (_("Show Name Only"));
- gtk_menu_append (GTK_MENU (show_options_menu), glade_menuitem);
+ gtk_menu_shell_append(GTK_MENU_SHELL(show_options_menu), glade_menuitem);
glade_menuitem = gtk_menu_item_new_with_label (_("Show Name & Value"));
- gtk_menu_append (GTK_MENU (show_options_menu), glade_menuitem);
+ gtk_menu_shell_append(GTK_MENU_SHELL(show_options_menu), glade_menuitem);
gtk_option_menu_set_menu (GTK_OPTION_MENU (show_options), show_options_menu);
gtk_option_menu_set_history (GTK_OPTION_MENU (show_options), 0);

diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index 268b888..96be8ea 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -122,7 +122,7 @@ get_main_menu(GschemToplevel *w_current)
menu = gtk_menu_new();

menu_item = gtk_tearoff_menu_item_new ();
- gtk_menu_append(GTK_MENU(menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
gtk_widget_show(menu_item);

scm_items_len = (int) scm_ilength (scm_items);
@@ -150,7 +150,7 @@ get_main_menu(GschemToplevel *w_current)

if (strcmp(menu_item_name, "SEPARATOR") == 0) {
menu_item = gtk_menu_item_new();
- gtk_menu_append(GTK_MENU(menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
} else {

if(scm_is_false (scm_item_func)) {
@@ -207,7 +207,7 @@ get_main_menu(GschemToplevel *w_current)
w_current);
}

- gtk_menu_append (GTK_MENU (menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
}

gtk_widget_show (menu_item);
@@ -255,7 +255,7 @@ get_main_popup (GschemToplevel *w_current)
if (e.action == NULL) {
menu_item = gtk_menu_item_new();
gtk_widget_show (menu_item);
- gtk_menu_append (GTK_MENU (menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
continue;
}

@@ -278,7 +278,7 @@ get_main_popup (GschemToplevel *w_current)
G_CALLBACK (g_menu_execute), w_current);

menu_item = gtk_action_create_menu_item (GTK_ACTION (action));
- gtk_menu_append (GTK_MENU (menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);

/* Add a handle to the menu object to get access to widget
objects. Horrible horrible hack, but it's the same approach as
--
2.1.0
Riccardo Lucchese
2014-10-14 20:17:33 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_object_get_data is
deprecated and should not be used in newly-written code. Use
g_object_get_data() instead."
---
gschem/src/x_attribedit.c | 31 ++++++++++++-------------------
gschem/src/x_menus.c | 5 +++--
2 files changed, 15 insertions(+), 21 deletions(-)

diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index 266b2df..6ead11a 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -82,13 +82,13 @@ void attrib_edit_dialog_ok(GtkWidget * w, GschemToplevel *w_current)
i_set_state(w_current, SELECT);

value_entry =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow), "value_entry");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "value_entry");
name_entry =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow), "attrib_combo_entry");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "attrib_combo_entry");
visbutton =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow), "visbutton");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "visbutton");
show_options =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow), "show_options");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "show_options");

value = gtk_entry_get_text(value_entry);
label = gtk_entry_get_text(name_entry);
@@ -126,7 +126,7 @@ void attrib_edit_dialog_ok(GtkWidget * w, GschemToplevel *w_current)
}

attribptr =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow), "attrib");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "attrib");
if (!attribptr) {
OBJECT *new = NULL;

@@ -146,20 +146,16 @@ void attrib_edit_dialog_ok(GtkWidget * w, GschemToplevel *w_current)
if (nsel > 1) {

addtoallbutton =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "addtoallbutton");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "addtoallbutton");

addtocompsbutton =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "addtocompsbutton");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "addtocompsbutton");

addtonetsbutton =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "addtonetsbutton");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "addtonetsbutton");

overwritebutton =
- gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "overwritebutton");
+ g_object_get_data(G_OBJECT(w_current->aewindow), "overwritebutton");

if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(overwritebutton))) {
replace = 1;
@@ -219,12 +215,9 @@ void attrib_edit_dialog_ok(GtkWidget * w, GschemToplevel *w_current)
new = o_attrib_add_attrib(w_current, newtext, vis, show, object);

invocation_flag =
- GPOINTER_TO_INT( gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "invocation_flag") );
- wx = GPOINTER_TO_INT( gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "position_wx"));
- wy = GPOINTER_TO_INT( gtk_object_get_data(GTK_OBJECT(w_current->aewindow),
- "position_wy"));
+ GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w_current->aewindow), "invocation_flag"));
+ wx = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w_current->aewindow), "position_wx"));
+ wy = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w_current->aewindow), "position_wy"));

#if DEBUG
printf("invocation flag: %d\n", invocation_flag);
diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c
index 96be8ea..aec4955 100644
--- a/gschem/src/x_menus.c
+++ b/gschem/src/x_menus.c
@@ -324,7 +324,7 @@ void x_menus_sensitivity (GschemToplevel *w_current, const char *buf, int flag)
return;
}

- item = (GtkWidget *) gtk_object_get_data(GTK_OBJECT(w_current->menubar), buf);
+ item = (GtkWidget *) g_object_get_data(G_OBJECT(w_current->menubar), buf);

if (item) {
gtk_widget_set_sensitive(GTK_WIDGET(item), flag);
@@ -412,7 +412,8 @@ void x_menu_attach_recent_files_submenu(GschemToplevel *w_current)
g_signal_connect(GTK_OBJECT(menuitem_file_recent_items), "item-activated",
G_CALLBACK(recent_chooser_item_activated), w_current);

- menuitem_to_append_to = (GtkWidget *) gtk_object_get_data(GTK_OBJECT(w_current->menubar), "_File/Open Recen_t");
+ menuitem_to_append_to = (GtkWidget *) g_object_get_data(G_OBJECT(w_current->menubar),
+ "_File/Open Recen_t");
if(menuitem_to_append_to == NULL)
return;
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem_to_append_to), menuitem_file_recent_items);
--
2.1.0
Riccardo Lucchese
2014-10-14 20:16:59 UTC
Permalink
Verbatim from Gtk+ 2 Reference Manual: "gtk_entry_new_with_max_length
has been deprecated since version 2.0 and should not be used in
newly-written code. Use gtk_entry_set_max_length() instead."
---
gattrib/src/x_dialog.c | 3 ++-
gschem/src/x_dialog.c | 12 ++++++++----
2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/gattrib/src/x_dialog.c b/gattrib/src/x_dialog.c
index c22a24e..cb59bb5 100644
--- a/gattrib/src/x_dialog.c
+++ b/gattrib/src/x_dialog.c
@@ -85,7 +85,8 @@ void x_dialog_newattrib()
FALSE, FALSE, 0);

/* Create the "attrib" text entry area */
- attrib_entry = gtk_entry_new_with_max_length(1024);
+ attrib_entry = gtk_entry_new();
+ gtk_entry_set_max_length(GTK_ENTRY(attrib_entry), 1024);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), attrib_entry, TRUE, TRUE, 5);
gtk_widget_set_size_request (dialog, 260, 140);

diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index a22f703..1f94835 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -295,7 +295,8 @@ void translate_dialog (GschemToplevel *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);
@@ -1028,7 +1029,8 @@ void find_text_dialog(GschemToplevel *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);
@@ -1135,7 +1137,8 @@ void hide_text_dialog(GschemToplevel * 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);
@@ -1236,7 +1239,8 @@ void show_text_dialog(GschemToplevel * 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);
--
2.1.0
Loading...