[gnome-games] iagno: Fix GSEAL issues
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games] iagno: Fix GSEAL issues
- Date: Tue, 29 Sep 2009 21:38:13 +0000 (UTC)
commit 7465caa02a1f3dbdcb55860d5a96eadaaa09ac0a
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date: Tue Sep 29 23:37:23 2009 +0200
iagno: Fix GSEAL issues
iagno/gnothello.c | 26 +++++++++++++-------------
iagno/properties.c | 23 +++++++++++++----------
2 files changed, 26 insertions(+), 23 deletions(-)
---
diff --git a/iagno/gnothello.c b/iagno/gnothello.c
index 3f1838c..6bcaae5 100644
--- a/iagno/gnothello.c
+++ b/iagno/gnothello.c
@@ -283,8 +283,8 @@ properties_cb (GtkWidget * widget, gpointer data)
gint
expose_event (GtkWidget * widget, GdkEventExpose * event)
{
- gdk_draw_drawable (widget->window,
- widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+ gdk_draw_drawable (gtk_widget_get_window (widget),
+ gtk_widget_get_style (widget)->fg_gc[gtk_widget_get_state (widget)],
buffer_pixmap,
event->area.x, event->area.y,
event->area.x, event->area.y,
@@ -354,7 +354,7 @@ button_press_event (GtkWidget * widget, GdkEventButton * event)
void
gui_draw_pixmap (gint which, gint x, gint y)
{
- gdk_draw_drawable (drawing_area->window, gridGC[0], tiles_pixmap,
+ gdk_draw_drawable (gtk_widget_get_window (drawing_area), gridGC[0], tiles_pixmap,
(which % 8) * TILEWIDTH, (which / 8) * TILEHEIGHT,
x * (TILEWIDTH + GRIDWIDTH),
y * (TILEHEIGHT + GRIDWIDTH), TILEWIDTH, TILEHEIGHT);
@@ -387,8 +387,8 @@ gui_draw_grid (void)
BOARDWIDTH, i * BOARDHEIGHT / 8 - 1);
}
- gdk_draw_drawable (drawing_area->window, gridGC[0], buffer_pixmap,
- 0, 0, 0, 0, BOARDWIDTH, BOARDHEIGHT);
+ gdk_draw_drawable (gtk_widget_get_window (drawing_area), gridGC[0],
+ buffer_pixmap, 0, 0, 0, 0, BOARDWIDTH, BOARDHEIGHT);
}
void
@@ -737,17 +737,17 @@ set_bg_color (void)
tmpimage = gdk_drawable_get_image (tiles_pixmap, 0, 0, 1, 1);
bgcolor.pixel = gdk_image_get_pixel (tmpimage, 0, 0);
- gdk_window_set_background (drawing_area->window, &bgcolor);
+ gdk_window_set_background (gtk_widget_get_window (drawing_area), &bgcolor);
if (gridGC[0])
g_object_unref (gridGC[0]);
- gridGC[0] = gdk_gc_new (drawing_area->window);
+ gridGC[0] = gdk_gc_new (gtk_widget_get_window (drawing_area));
if (gridGC[1])
g_object_unref (gridGC[1]);
- gridGC[1] = gdk_gc_new (drawing_area->window);
+ gridGC[1] = gdk_gc_new (gtk_widget_get_window (drawing_area));
- gdk_gc_copy (gridGC[0], drawing_area->style->bg_gc[0]);
- gdk_gc_copy (gridGC[1], drawing_area->style->bg_gc[0]);
+ gdk_gc_copy (gridGC[0], gtk_widget_get_style (drawing_area)->bg_gc[0]);
+ gdk_gc_copy (gridGC[1], gtk_widget_get_style (drawing_area)->bg_gc[0]);
gdk_gc_set_background (gridGC[0], &bgcolor);
gdk_gc_set_foreground (gridGC[0], &bgcolor);
@@ -774,7 +774,7 @@ save_state_cb (EggSMClient *client,
gint argc;
gint xpos, ypos;
- gdk_window_get_origin (window->window, &xpos, &ypos);
+ gdk_window_get_origin (gtk_widget_get_window (window), &xpos, &ypos);
argc = 0;
argv[argc++] = g_get_prgname ();
@@ -1029,7 +1029,7 @@ main (int argc, char **argv)
create_window ();
gtk_widget_show (window);
- buffer_pixmap = gdk_pixmap_new (drawing_area->window,
+ buffer_pixmap = gdk_pixmap_new (gtk_widget_get_window (drawing_area),
BOARDWIDTH, BOARDHEIGHT, -1);
load_properties ();
@@ -1041,7 +1041,7 @@ main (int argc, char **argv)
#endif /* GGZ_CLIENT */
if (session_xpos >= 0 && session_ypos >= 0) {
- gdk_window_move (window->window, session_xpos, session_ypos);
+ gdk_window_move (gtk_widget_get_window (window), session_xpos, session_ypos);
}
set_bg_color ();
diff --git a/iagno/properties.c b/iagno/properties.c
index fea7af0..85c8aa9 100644
--- a/iagno/properties.c
+++ b/iagno/properties.c
@@ -167,7 +167,7 @@ static void
black_computer_level_select (GtkWidget * widget, gpointer data)
{
if ((GPOINTER_TO_INT (data) != t_black_computer_level)
- && (GTK_TOGGLE_BUTTON (widget)->active)) {
+ && (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))) {
t_black_computer_level = GPOINTER_TO_INT (data);
apply_changes ();
}
@@ -177,7 +177,7 @@ static void
white_computer_level_select (GtkWidget * widget, gpointer data)
{
if ((GPOINTER_TO_INT (data) != t_white_computer_level)
- && (GTK_TOGGLE_BUTTON (widget)->active)) {
+ && (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))) {
t_white_computer_level = GPOINTER_TO_INT (data);
apply_changes ();
}
@@ -186,14 +186,14 @@ white_computer_level_select (GtkWidget * widget, gpointer data)
static void
sound_select (GtkWidget * widget, gpointer data)
{
- sound = GTK_TOGGLE_BUTTON (widget)->active;
+ sound = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
apply_changes ();
}
static void
quick_moves_select (GtkWidget * widget, gpointer data)
{
- if (GTK_TOGGLE_BUTTON (widget)->active)
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
t_quick_moves = 1;
else
t_quick_moves = 0;
@@ -203,7 +203,7 @@ quick_moves_select (GtkWidget * widget, gpointer data)
static void
flip_final_select (GtkWidget * widget, gpointer data)
{
- if (GTK_TOGGLE_BUTTON (widget)->active)
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
t_flip_final = 1;
else
t_flip_final = 0;
@@ -213,7 +213,7 @@ flip_final_select (GtkWidget * widget, gpointer data)
static void
animate_stagger_select (GtkWidget * widget, gpointer data)
{
- if (GTK_TOGGLE_BUTTON (widget)->active)
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
t_animate_stagger = 1;
else
t_animate_stagger = 0;
@@ -223,7 +223,7 @@ animate_stagger_select (GtkWidget * widget, gpointer data)
static void
grid_select (GtkWidget * widget, gpointer data)
{
- if (GTK_TOGGLE_BUTTON (widget)->active)
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
t_grid = 1;
else
t_grid = 0;
@@ -233,7 +233,7 @@ grid_select (GtkWidget * widget, gpointer data)
static void
animate_select (GtkWidget * widget, gpointer data)
{
- if (GTK_TOGGLE_BUTTON (widget)->active) {
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
t_animate = GPOINTER_TO_INT (data);
}
apply_changes ();
@@ -407,11 +407,14 @@ show_properties_dialog (void)
gtk_dialog_set_has_separator (GTK_DIALOG (propbox), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (propbox), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (propbox)->vbox), 2);
+ gtk_box_set_spacing
+ (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (propbox))), 2);
gtk_window_set_resizable (GTK_WINDOW (propbox), FALSE);
notebook = gtk_notebook_new ();
gtk_container_set_border_width (GTK_CONTAINER (notebook), 5);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (propbox)->vbox), notebook);
+ gtk_container_add
+ (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (propbox))),
+ notebook);
label = gtk_label_new (_("Game"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]