|
Packit |
1e8aac |
/*
|
|
Packit |
1e8aac |
* Copyright (C) 2013 Tristan Van Berkom.
|
|
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 |
* Authors:
|
|
Packit |
1e8aac |
* Tristan Van Berkom <tvb@gnome.org>
|
|
Packit |
1e8aac |
*/
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
#include <config.h>
|
|
Packit |
1e8aac |
#include <gladeui/glade.h>
|
|
Packit |
1e8aac |
#include <glib/gi18n-lib.h>
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
#include "glade-scale-button-editor.h"
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
static void glade_scale_button_editor_editable_init (GladeEditableIface * iface);
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
struct _GladeScaleButtonEditorPrivate
|
|
Packit |
1e8aac |
{
|
|
Packit |
1e8aac |
GtkWidget *dummy;
|
|
Packit |
1e8aac |
};
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
static GladeEditableIface *parent_editable_iface;
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
G_DEFINE_TYPE_WITH_CODE (GladeScaleButtonEditor, glade_scale_button_editor, GLADE_TYPE_BUTTON_EDITOR,
|
|
Packit |
1e8aac |
G_ADD_PRIVATE (GladeScaleButtonEditor)
|
|
Packit |
1e8aac |
G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE,
|
|
Packit |
1e8aac |
glade_scale_button_editor_editable_init));
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
static void
|
|
Packit |
1e8aac |
glade_scale_button_editor_class_init (GladeScaleButtonEditorClass * klass)
|
|
Packit |
1e8aac |
{
|
|
Packit |
1e8aac |
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladegtk/glade-scale-button-editor.ui");
|
|
Packit |
1e8aac |
}
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
static void
|
|
Packit |
1e8aac |
glade_scale_button_editor_init (GladeScaleButtonEditor * self)
|
|
Packit |
1e8aac |
{
|
|
Packit |
1e8aac |
self->priv = glade_scale_button_editor_get_instance_private (self);
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
gtk_widget_init_template (GTK_WIDGET (self));
|
|
Packit |
1e8aac |
}
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
static void
|
|
Packit |
1e8aac |
glade_scale_button_editor_load (GladeEditable * editable, GladeWidget * widget)
|
|
Packit |
1e8aac |
{
|
|
Packit |
1e8aac |
/* GladeScaleButtonEditor *button_editor = GLADE_SCALE_BUTTON_EDITOR (editable); */
|
|
Packit |
1e8aac |
/* GladeScaleButtonEditorPrivate *priv = button_editor->priv; */
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
/* Chain up to default implementation */
|
|
Packit |
1e8aac |
parent_editable_iface->load (editable, widget);
|
|
Packit |
1e8aac |
}
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
static void
|
|
Packit |
1e8aac |
glade_scale_button_editor_editable_init (GladeEditableIface * iface)
|
|
Packit |
1e8aac |
{
|
|
Packit |
1e8aac |
parent_editable_iface = g_type_interface_peek_parent (iface);
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
iface->load = glade_scale_button_editor_load;
|
|
Packit |
1e8aac |
}
|
|
Packit |
1e8aac |
|
|
Packit |
1e8aac |
GtkWidget *
|
|
Packit |
1e8aac |
glade_scale_button_editor_new (void)
|
|
Packit |
1e8aac |
{
|
|
Packit |
1e8aac |
return g_object_new (GLADE_TYPE_SCALE_BUTTON_EDITOR, NULL);
|
|
Packit |
1e8aac |
}
|