Commit a30a47fa authored by claes's avatar claes

Adapted to older gtk version

parent fe661063
/*
* Proview $Id: wb_gtk.cpp,v 1.1 2007-01-04 07:29:02 claes Exp $
* Proview $Id: wb_gtk.cpp,v 1.2 2007-02-06 15:14:08 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -297,7 +297,9 @@ WbGtk::WbGtk( int argc, char *argv[])
strcat( title, login_prv.username);
strcat( title, " on ");
strcat( title, systemname);
#if !(GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 8)
gtk_window_set_icon_name( GTK_WINDOW(toplevel), title);
#endif
gtk_widget_show_all( toplevel);
g_object_set( toplevel, "visible", FALSE, NULL);
......
/*
* Proview $Id: flow_browwidget_gtk.cpp,v 1.3 2007-02-01 07:10:33 claes Exp $
* Proview $Id: flow_browwidget_gtk.cpp,v 1.4 2007-02-06 15:13:34 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -341,8 +341,8 @@ GtkWidget *scrolledbrowwidgetgtk_new(
w->brow_ctx = 0;
w->is_navigator = 0;
w->client_data = client_data;
w->scroll_h = gtk_scrolled_window_get_hscrollbar( GTK_SCROLLED_WINDOW(form));
w->scroll_v = gtk_scrolled_window_get_vscrollbar( GTK_SCROLLED_WINDOW(form));
w->scroll_h = GTK_SCROLLED_WINDOW(form)->hscrollbar;
w->scroll_v = GTK_SCROLLED_WINDOW(form)->vscrollbar;
w->scroll_h_ignore = 0;
w->scroll_v_ignore = 0;
w->scroll_h_value = 0;
......
/*
* Proview $Id: flow_widget_gtk.cpp,v 1.3 2007-02-01 07:10:33 claes Exp $
* Proview $Id: flow_widget_gtk.cpp,v 1.4 2007-02-06 15:13:34 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -330,8 +330,8 @@ GtkWidget *scrolledflowwidgetgtk_new(
w->flow_ctx = 0;
w->is_navigator = 0;
w->client_data = client_data;
w->scroll_h = gtk_scrolled_window_get_hscrollbar( GTK_SCROLLED_WINDOW(form));
w->scroll_v = gtk_scrolled_window_get_vscrollbar( GTK_SCROLLED_WINDOW(form));
w->scroll_h = GTK_SCROLLED_WINDOW(form)->hscrollbar;
w->scroll_v = GTK_SCROLLED_WINDOW(form)->vscrollbar;
w->scroll_h_ignore = 0;
w->scroll_v_ignore = 0;
w->form = form;
......
/*
* Proview $Id: glow_colpalwidget_gtk.cpp,v 1.1 2007-01-04 08:07:43 claes Exp $
* Proview $Id: glow_colpalwidget_gtk.cpp,v 1.2 2007-02-06 15:13:34 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -325,8 +325,8 @@ GtkWidget *scrolledcolpalwidgetgtk_new(
w->colpal_ctx = 0;
w->is_navigator = 0;
w->client_data = client_data;
w->scroll_h = gtk_scrolled_window_get_hscrollbar( GTK_SCROLLED_WINDOW(form));
w->scroll_v = gtk_scrolled_window_get_vscrollbar( GTK_SCROLLED_WINDOW(form));
w->scroll_h = GTK_SCROLLED_WINDOW(form)->hscrollbar;
w->scroll_v = GTK_SCROLLED_WINDOW(form)->vscrollbar;
w->scroll_h_ignore = 0;
w->scroll_v_ignore = 0;
w->form = form;
......
/*
* Proview $Id: glow_curvewidget_gtk.cpp,v 1.2 2007-01-15 13:19:09 claes Exp $
* Proview $Id: glow_curvewidget_gtk.cpp,v 1.3 2007-02-06 15:13:34 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -353,8 +353,8 @@ GtkWidget *scrolledcurvewidgetgtk_new(
w->curve_ctx = 0;
w->is_navigator = 0;
w->client_data = client_data;
w->scroll_h = gtk_scrolled_window_get_hscrollbar( GTK_SCROLLED_WINDOW(form));
w->scroll_v = gtk_scrolled_window_get_vscrollbar( GTK_SCROLLED_WINDOW(form));
w->scroll_h = GTK_SCROLLED_WINDOW(form)->hscrollbar;
w->scroll_v = GTK_SCROLLED_WINDOW(form)->vscrollbar;
w->scroll_h_ignore = 0;
w->scroll_v_ignore = 0;
w->form = form;
......
/*
* Proview $Id: glow_draw_gtk.cpp,v 1.3 2007-01-15 13:19:09 claes Exp $
* Proview $Id: glow_draw_gtk.cpp,v 1.4 2007-02-06 15:13:34 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -2382,7 +2382,7 @@ int GlowDrawGtk::print( char *filename, double x0, double x1, int end)
if ( new_file) {
ps->fp <<
"%!PS-Adobe-2.0 EPSF-1.2" << endl <<
"%%Creator: Proview $Id: glow_draw_gtk.cpp,v 1.3 2007-01-15 13:19:09 claes Exp $ Glow" << endl <<
"%%Creator: Proview $Id: glow_draw_gtk.cpp,v 1.4 2007-02-06 15:13:34 claes Exp $ Glow" << endl <<
"%%EndComments" << endl << endl;
}
else
......@@ -2524,6 +2524,9 @@ unsigned char *GlowDrawGtk::image_get_data( glow_tImImage image)
void GlowDrawGtk::image_rotate( glow_tImImage *image, int to_rotation, int from_rotation)
{
#if GDK_PIXBUF_MAJOR == 2 && GDK_PIXBUF_MINOR < 8
return;
#else
int grot;
int drot = to_rotation - from_rotation;
drot = int( (float(drot) / 360 - floor( float(drot) / 360)) * 360);
......@@ -2543,20 +2546,29 @@ void GlowDrawGtk::image_rotate( glow_tImImage *image, int to_rotation, int from_
GdkPixbuf *im = gdk_pixbuf_rotate_simple( (GdkPixbuf *)*image, (GdkPixbufRotation) grot);
gdk_pixbuf_unref( (GdkPixbuf *)*image);
*image = (glow_tImImage) im;
#endif
}
void GlowDrawGtk::image_flip_vertical( glow_tImImage *image)
{
#if GDK_PIXBUF_MAJOR == 2 && GDK_PIXBUF_MINOR < 8
return;
#else
GdkPixbuf *im = gdk_pixbuf_flip( (GdkPixbuf *)*image, TRUE);
gdk_pixbuf_unref( (GdkPixbuf *)*image);
*image = (glow_tImImage) im;
#endif
}
void GlowDrawGtk::image_flip_horizontal( glow_tImImage *image)
{
#if GDK_PIXBUF_MAJOR == 2 && GDK_PIXBUF_MINOR < 8
return;
#else
GdkPixbuf *im = gdk_pixbuf_flip( (GdkPixbuf *)*image, FALSE);
gdk_pixbuf_unref( (GdkPixbuf *)*image);
*image = (glow_tImImage) im;
#endif
}
void GlowDrawGtk::image_scale( int width, int height, glow_tImImage orig_im, glow_tImImage *im,
......
/*
* Proview $Id: glow_growwidget_gtk.cpp,v 1.3 2007-02-01 07:10:33 claes Exp $
* Proview $Id: glow_growwidget_gtk.cpp,v 1.4 2007-02-06 15:13:34 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -355,8 +355,8 @@ GtkWidget *scrolledgrowwidgetgtk_new(
w->grow_ctx = 0;
w->is_navigator = 0;
w->client_data = client_data;
w->scroll_h = gtk_scrolled_window_get_hscrollbar( GTK_SCROLLED_WINDOW(form));
w->scroll_v = gtk_scrolled_window_get_vscrollbar( GTK_SCROLLED_WINDOW(form));
w->scroll_h = GTK_SCROLLED_WINDOW(form)->hscrollbar;
w->scroll_v = GTK_SCROLLED_WINDOW(form)->vscrollbar;
w->scroll_h_ignore = 0;
w->scroll_v_ignore = 0;
w->form = form;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment