Mail Archives: geda-user/2014/10/14/16:18:15
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
- Raw text -