2011-09-30 10:45:00 +02:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
|
|
|
*
|
|
|
|
* gimp3migration.c
|
|
|
|
* Copyright (C) 2011 Michael Natterer <mitch@gimp.org>
|
|
|
|
*
|
|
|
|
* This library is free software: you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include "gimpwidgetstypes.h"
|
|
|
|
|
|
|
|
#include "gimp3migration.h"
|
|
|
|
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
gtk_box_new (GtkOrientation orientation,
|
|
|
|
gint spacing)
|
|
|
|
{
|
|
|
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
return gtk_hbox_new (FALSE, spacing);
|
|
|
|
else
|
|
|
|
return gtk_vbox_new (FALSE, spacing);
|
|
|
|
}
|
2011-09-30 15:43:02 +02:00
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
gtk_button_box_new (GtkOrientation orientation)
|
|
|
|
{
|
|
|
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
return gtk_hbutton_box_new ();
|
|
|
|
else
|
|
|
|
return gtk_vbutton_box_new ();
|
|
|
|
}
|
2011-10-02 13:18:10 +02:00
|
|
|
|
2011-10-02 14:09:45 +02:00
|
|
|
GtkWidget *
|
|
|
|
gtk_scale_new (GtkOrientation orientation,
|
|
|
|
GtkAdjustment *adjustment)
|
|
|
|
{
|
|
|
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
return gtk_hscale_new (adjustment);
|
|
|
|
else
|
|
|
|
return gtk_vscale_new (adjustment);
|
|
|
|
}
|
|
|
|
|
2011-10-02 13:18:10 +02:00
|
|
|
GtkWidget *
|
|
|
|
gtk_scrollbar_new (GtkOrientation orientation,
|
|
|
|
GtkAdjustment *adjustment)
|
|
|
|
{
|
|
|
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
|
|
return gtk_hscrollbar_new (adjustment);
|
|
|
|
else
|
|
|
|
return gtk_vscrollbar_new (adjustment);
|
|
|
|
}
|