[gnome-control-center] Remove GTK+ deprecated symbols
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Remove GTK+ deprecated symbols
- Date: Tue, 13 Apr 2010 18:08:24 +0000 (UTC)
commit 825434bbcd53285cc2f6101309fad3869b041b12
Author: Javier Jardón <jjardon gnome org>
Date: Tue Apr 13 19:34:04 2010 +0200
Remove GTK+ deprecated symbols
https://bugzilla.gnome.org/show_bug.cgi?id=572325
capplets/common/theme-thumbnail.c | 2 +-
capplets/display/scrollarea.c | 28 ++++++++++++-------
capplets/display/xrandr-capplet.c | 4 +-
.../keyboard/gnome-keyboard-properties-xkbltadd.c | 2 +-
configure.ac | 2 +-
font-viewer/font-view.c | 2 +-
typing-break/drw-break-window.c | 4 +-
7 files changed, 26 insertions(+), 18 deletions(-)
---
diff --git a/capplets/common/theme-thumbnail.c b/capplets/common/theme-thumbnail.c
index 094cb8e..401a111 100644
--- a/capplets/common/theme-thumbnail.c
+++ b/capplets/common/theme-thumbnail.c
@@ -118,7 +118,7 @@ static void
hbox_foreach (GtkWidget *widget,
gpointer data)
{
- if (GTK_WIDGET_VISIBLE (widget)) {
+ if (gtk_widget_get_visible (widget)) {
gtk_widget_realize (widget);
gtk_widget_map (widget);
gtk_widget_ensure_style (widget);
diff --git a/capplets/display/scrollarea.c b/capplets/display/scrollarea.c
index 666b70c..5b1ba5b 100644
--- a/capplets/display/scrollarea.c
+++ b/capplets/display/scrollarea.c
@@ -258,9 +258,12 @@ new_adjustment (void)
static void
foo_scroll_area_init (FooScrollArea *scroll_area)
{
- GTK_WIDGET_SET_FLAGS (scroll_area, GTK_NO_WINDOW);
-
- gtk_widget_set_redraw_on_allocate (GTK_WIDGET (scroll_area), FALSE);
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (scroll_area);
+
+ gtk_widget_set_has_window (widget, FALSE);
+ gtk_widget_set_redraw_on_allocate (widget, FALSE);
scroll_area->priv = g_new0 (FooScrollAreaPrivate, 1);
scroll_area->priv->width = 0;
@@ -276,7 +279,7 @@ foo_scroll_area_init (FooScrollArea *scroll_area)
scroll_area->priv->pixmap = NULL;
scroll_area->priv->update_region = gdk_region_new ();
- gtk_widget_set_double_buffered (GTK_WIDGET (scroll_area), FALSE);
+ gtk_widget_set_double_buffered (widget, FALSE);
}
static void
@@ -720,8 +723,8 @@ foo_scroll_area_realize (GtkWidget *widget)
FooScrollArea *area = FOO_SCROLL_AREA (widget);
GdkWindowAttr attributes;
gint attributes_mask;
-
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
@@ -1260,7 +1263,7 @@ foo_scrollbar_adjustment_changed (GtkAdjustment *adj,
g_assert_not_reached ();
}
- if (GTK_WIDGET_REALIZED (widget))
+ if (gtk_widget_get_realized (widget))
{
foo_scroll_area_scroll (scroll_area, -dx, -dy);
@@ -1461,15 +1464,20 @@ void
foo_scroll_area_invalidate_region (FooScrollArea *area,
GdkRegion *region)
{
+ GtkWidget *widget;
+
g_return_if_fail (FOO_IS_SCROLL_AREA (area));
-
+
+ widget = GTK_WIDGET (area);
+
gdk_region_union (area->priv->update_region, region);
- if (GTK_WIDGET_REALIZED (area))
+ if (gtk_widget_get_realized (widget))
{
canvas_to_window (area, region);
- gdk_window_invalidate_region (GTK_WIDGET (area)->window, region, TRUE);
+ gdk_window_invalidate_region (gtk_widget_get_window (widget),
+ region, TRUE);
window_to_canvas (area, region);
}
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
index 9047177..7d81ca0 100644
--- a/capplets/display/xrandr-capplet.c
+++ b/capplets/display/xrandr-capplet.c
@@ -527,7 +527,7 @@ rebuild_current_monitor_label (App *app)
* theme's colors, since the label is always shown against a light
* pastel background. See bgo#556050
*/
- gtk_widget_modify_fg (app->current_monitor_label, GTK_WIDGET_STATE (app->current_monitor_label), &black);
+ gtk_widget_modify_fg (app->current_monitor_label, gtk_widget_get_state (app->current_monitor_label), &black);
}
else
{
@@ -2251,7 +2251,7 @@ get_output_for_window (GnomeRRConfig *configuration, GdkWindow *window)
static void
select_current_output_from_dialog_position (App *app)
{
- if (GTK_WIDGET_REALIZED (app->dialog))
+ if (gtk_widget_get_realized (app->dialog))
app->current_output = get_output_for_window (app->current_configuration, app->dialog->window);
else
app->current_output = NULL;
diff --git a/capplets/keyboard/gnome-keyboard-properties-xkbltadd.c b/capplets/keyboard/gnome-keyboard-properties-xkbltadd.c
index c8bacea..82296fd 100644
--- a/capplets/keyboard/gnome-keyboard-properties-xkbltadd.c
+++ b/capplets/keyboard/gnome-keyboard-properties-xkbltadd.c
@@ -549,7 +549,7 @@ xkb_layout_choose (GtkBuilder * dialog)
chooser_dialog);
toplevel = gtk_widget_get_toplevel (chooser);
- if (GTK_WIDGET_TOPLEVEL (toplevel)) {
+ if (gtk_widget_is_toplevel (toplevel)) {
GdkRectangle *rect = gkbd_preview_load_position ();
if (rect != NULL) {
gtk_window_move (GTK_WINDOW (toplevel),
diff --git a/configure.ac b/configure.ac
index 1dbe2db..7893fa4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,7 +90,7 @@ dnl ==============================================
dnl Check that we meet the dependencies
dnl ==============================================
-COMMON_MODULES="gtk+-2.0 >= 2.18.0 dnl
+COMMON_MODULES="gtk+-2.0 >= 2.20.0 dnl
glib-2.0 >= 2.17.4 dnl
gthread-2.0 dnl
gio-2.0 dnl
diff --git a/font-viewer/font-view.c b/font-viewer/font-view.c
index f12cdff..9299f20 100644
--- a/font-viewer/font-view.c
+++ b/font-viewer/font-view.c
@@ -373,7 +373,7 @@ static gboolean
expose_event(GtkWidget *widget, GdkEventExpose *event, GdkPixmap *pixmap)
{
gdk_draw_drawable(widget->window,
- widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+ widget->style->fg_gc[gtk_widget_get_state (widget)],
pixmap,
event->area.x, event->area.y,
event->area.x, event->area.y,
diff --git a/typing-break/drw-break-window.c b/typing-break/drw-break-window.c
index 8ab0f03..dda759d 100644
--- a/typing-break/drw-break-window.c
+++ b/typing-break/drw-break-window.c
@@ -518,7 +518,7 @@ postpone_clicked_cb (GtkWidget *button,
return;
}
- if (GTK_WIDGET_VISIBLE (priv->postpone_entry)) {
+ if (gtk_widget_get_visible (priv->postpone_entry)) {
gtk_widget_activate (priv->postpone_entry);
return;
}
@@ -611,7 +611,7 @@ label_expose_event_cb (GtkLabel *label,
gtk_paint_layout (widget->style,
widget->window,
- GTK_WIDGET_STATE (widget),
+ gtk_widget_get_state (widget),
FALSE,
&event->area,
widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]