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

Packit 1e8aac
/*
Packit 1e8aac
 * glade-gtk-switch.c
Packit 1e8aac
 *
Packit 1e8aac
 * Copyright (C) 2011 Juan Pablo Ugarte.
Packit 1e8aac
 *
Packit 1e8aac
 * Author:
Packit 1e8aac
 *   Juan Pablo Ugarte <juanpablougarte@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
Packit 1e8aac
#include <config.h>
Packit 1e8aac
#include "glade-activatable-editor.h"
Packit 1e8aac
Packit 1e8aac
GladeEditable *
Packit 1e8aac
glade_gtk_switch_create_editable (GladeWidgetAdaptor *adaptor,
Packit 1e8aac
                                  GladeEditorPageType type)
Packit 1e8aac
{
Packit 1e8aac
  if (type == GLADE_PAGE_GENERAL)
Packit 1e8aac
    return (GladeEditable *) glade_activatable_editor_new (adaptor, NULL);
Packit 1e8aac
Packit 1e8aac
  return GWA_GET_CLASS (GTK_TYPE_WIDGET)->create_editable (adaptor, type);
Packit 1e8aac
}
Packit 1e8aac
Packit 1e8aac
void
Packit 1e8aac
glade_gtk_switch_post_create (GladeWidgetAdaptor *adaptor,
Packit 1e8aac
                              GObject *widget,
Packit 1e8aac
                              GladeCreateReason reason)
Packit 1e8aac
{
Packit 1e8aac
  GladeWidget *gwidget;
Packit 1e8aac
  
Packit 1e8aac
  if (reason != GLADE_CREATE_LOAD) return;
Packit 1e8aac
Packit 1e8aac
  g_return_if_fail (GTK_IS_SWITCH (widget));
Packit 1e8aac
  gwidget = glade_widget_get_from_gobject (widget);
Packit 1e8aac
  g_return_if_fail (GLADE_IS_WIDGET (gwidget));
Packit 1e8aac
}