Skip to content

Commit

Permalink
FIXED more uses of functions deprecated in GTK+ 2.24
Browse files Browse the repository at this point in the history
  • Loading branch information
ksterker committed Apr 30, 2011
1 parent f565eb7 commit e72bc48
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
25 changes: 16 additions & 9 deletions src/backend/gtk/screen_gtk.h
Expand Up @@ -68,22 +68,29 @@ class screen_surface_gtk : public gfx::surface_gtk
void set_drawable (GdkDrawable *drawable)
{
clear ();

if (GDK_IS_DRAWABLE (drawable))
{
int l, h;
gdk_drawable_get_size (drawable, &l, &h);
set_length (l);
set_height (h);

g_object_ref (drawable);
Drawable = drawable;
gint l, h;
if (GDK_IS_WINDOW (drawable))
{
l = gdk_window_get_width (GDK_WINDOW (drawable));
h = gdk_window_get_height (GDK_WINDOW (drawable));
}
else if (GDK_IS_PIXMAP (drawable))
{
gdk_pixmap_get_size (GDK_PIXMAP (drawable), &l, &h);
}
else
{
fprintf (stderr, "*** screen::set_drawable: Invalid drawable: %s!\n",
drawable ? G_OBJECT_TYPE_NAME(drawable) : "<null>");
return;
}

set_length(l);
set_height(h);

g_object_ref (drawable);
Drawable = drawable;
}

protected:
Expand Down
4 changes: 2 additions & 2 deletions src/mapedit/gui_entity_dialog.cc
Expand Up @@ -356,7 +356,7 @@ void GuiEntityDialog::applyChanges()
if (EntityType == 'S' || EntityType == 'U')
{
GObject *widget = gtk_builder_get_object (Ui, "entity_id");
id = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget));
id = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (widget));
}

bool result;
Expand Down Expand Up @@ -516,7 +516,7 @@ void GuiEntityDialog::set_page_active (const int & page, const bool & active)
}
else
{
gtk_widget_hide_all (child);
gtk_widget_hide (child);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/mapedit/gui_renderheight.cc
Expand Up @@ -33,7 +33,7 @@ GuiRenderHeight::GuiRenderHeight()
gtk_scale_set_digits (GTK_SCALE(Range), 0);
gtk_scale_set_draw_value (GTK_SCALE(Range), TRUE);
gtk_scale_set_value_pos (GTK_SCALE(Range), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE(Range), GTK_UPDATE_DELAYED);
// gtk_range_set_update_policy (GTK_RANGE(Range), GTK_UPDATE_DELAYED);
gtk_range_set_inverted (GTK_RANGE(Range), TRUE);
gtk_range_set_value (GTK_RANGE(Range), 100);
gtk_widget_show (Range);
Expand Down

0 comments on commit e72bc48

Please sign in to comment.