Blame plugins/gtk+/glade-gtk-adjustment.c

Packit 1e8aac
/*
Packit 1e8aac
 * glade-gtk-adjustment.c - GladeWidgetAdaptor for GtkAdjustment
Packit 1e8aac
 *
Packit 1e8aac
 * Copyright (C) 2013 Tristan Van Berkom
Packit 1e8aac
 *
Packit 1e8aac
 * Authors:
Packit 1e8aac
 *      Tristan Van Berkom <tristan.van.berkom@gmail.com>
Packit 1e8aac
 *
Packit 1e8aac
 * This library is free software; you can redistribute it and/or modify it
Packit 1e8aac
 * under the terms of the GNU Lesser General Public License as
Packit 1e8aac
 * published by the Free Software Foundation; either version 2.1 of
Packit 1e8aac
 * the License, or (at your option) any later version.
Packit 1e8aac
 *
Packit 1e8aac
 * This library is distributed in the hope that it will be useful, but
Packit 1e8aac
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 1e8aac
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 1e8aac
 * Lesser General Public License for more details.
Packit 1e8aac
 *
Packit 1e8aac
 * You should have received a copy of the GNU Lesser General Public 
Packit 1e8aac
 * License along with this program; if not, write to the Free Software
Packit 1e8aac
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Packit 1e8aac
 */
Packit 1e8aac
Packit 1e8aac
#include <config.h>
Packit 1e8aac
#include <glib/gi18n-lib.h>
Packit 1e8aac
#include <gladeui/glade.h>
Packit 1e8aac
Packit 1e8aac
void
Packit 1e8aac
glade_gtk_adjustment_write_widget (GladeWidgetAdaptor * adaptor,
Packit 1e8aac
                                   GladeWidget * widget,
Packit 1e8aac
                                   GladeXmlContext * context,
Packit 1e8aac
                                   GladeXmlNode * node)
Packit 1e8aac
{
Packit 1e8aac
  GladeProperty *prop;
Packit 1e8aac
Packit 1e8aac
  if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) ||
Packit 1e8aac
	glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)))
Packit 1e8aac
    return;
Packit 1e8aac
Packit 1e8aac
  /* Ensure proper order of adjustment properties by writing them here. */
Packit 1e8aac
  prop = glade_widget_get_property (widget, "lower");
Packit 1e8aac
  glade_property_write (prop, context, node);
Packit 1e8aac
Packit 1e8aac
  prop = glade_widget_get_property (widget, "upper");
Packit 1e8aac
  glade_property_write (prop, context, node);
Packit 1e8aac
Packit 1e8aac
  prop = glade_widget_get_property (widget, "value");
Packit 1e8aac
  glade_property_write (prop, context, node);
Packit 1e8aac
Packit 1e8aac
  GWA_GET_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
Packit 1e8aac
}