"Fossies" - the Fresh Open Source Software Archive

Member "gtkdatabox-1.0.0/glade/gladeui-databox.c" (16 Apr 2021, 2311 Bytes) of package /linux/privat/gtkdatabox-1.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "gladeui-databox.c" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 0.9.3.1_vs_1.0.0.

    1 /* $Id: gladeui-databox.c 4 2008-06-22 09:19:11Z rbock $ */
    2 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
    3 /*
    4  * Copyright (C) 2007 H. Nieuwenhuis
    5  *
    6  * This program is free software; you can redistribute it and/or
    7  * modify it under the terms of the GNU Lesser General Public License
    8  * as published by the Free Software Foundation; either version 2.1
    9  * of the License, or (at your option) any later version.
   10  * 
   11  * This program is distributed in the hope that it will be useful,
   12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   14  * GNU Lesser General Public License for more details.
   15  * 
   16  * You should have received a copy of the GNU General Public License
   17  * along with this program; if not, write to the Free Software
   18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
   19  *
   20  * Authors:
   21  *      H. Nieuwenhuis <vzzbx@xs4all.nl>
   22  */
   23 
   24 #include <config.h>
   25 
   26 
   27 #include <gladeui/glade.h>
   28 #include <gladeui/glade-editor-property.h>
   29 /* #include <gladeui/glade-base-editor.h> */
   30 
   31 
   32 #include <gtk/gtk.h>
   33 #include <string.h>
   34 #include <stdlib.h>
   35 
   36 #include <gtkdatabox.h>
   37 #include <gtkdatabox_scale.h>
   38 #include <gtkdatabox_ruler.h>
   39 
   40 
   41 static void
   42 databox_widget_parent_changed (GtkWidget * widget,
   43                    GParamSpec * pspec,
   44                    GladeWidgetAdaptor * adaptor)
   45 {
   46 }
   47 
   48 void
   49 glade_gtk_databox_ruler_post_create (GladeWidgetAdaptor * adaptor,
   50                       GObject * widget,
   51                       GladeCreateReason reason)
   52 {
   53    GladeWidget *gwidget = glade_widget_get_from_gobject (widget);
   54 
   55    glade_widget_set_action_sensitive (gwidget, "remove_parent", FALSE);
   56 
   57    if (GTK_IS_WINDOW (widget))
   58    {
   59       glade_widget_set_action_sensitive (gwidget, "add_parent", FALSE);
   60    }
   61 
   62    /* Watch parents and set actions sensitive/insensitive */
   63    g_signal_connect (G_OBJECT (widget), "notify::parent",
   64              G_CALLBACK (databox_widget_parent_changed), adaptor);
   65 }
   66 
   67 void
   68 glade_databox_ruler_set_orientation (GtkDataboxRuler * ruler,
   69                                    GtkOrientation orientation) 
   70 {
   71     gtk_databox_ruler_set_orientation (ruler, orientation);
   72 }
   73 
   74 GType
   75 glade_databox_type ()
   76 {
   77     return (gtk_databox_get_type ());
   78 }
   79 
   80 GType
   81 glade_databox_ruler_type ()
   82 {
   83     return (gtk_databox_ruler_get_type ());
   84 }