Commit 1aa68c0a authored by Vincent Geddes's avatar Vincent Geddes

Rewrote expander widget implementation.

        * gladeui/glade-palette-expander.[ch]: Rewrote expander widget implementation.
        
        * gladeui/glade-palette.c: Update for change in expander widget.

svn path=/trunk/; revision=1226
parent dfdeb5a6
2007-03-22 Vincent Geddes <vincent.geddes@gmail.com>
* gladeui/glade-palette-expander.[ch]: Rewrote expander widget implementation.
* gladeui/glade-palette.c: Update for change in expander widget.
2007-03-20 Bruno Boaventura <brunobol@gnome.org>
* data/glade3.desktop.in.in: Remove incorrect "Application" category
......
This diff is collapsed.
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* glade-palette-expander.h
* glade-palette-expander.h - A container which can hide its child
*
* Copyright (C) 2003 Sun Microsystems, Inc.
* Copyright (C) 2007 Vincent Geddes
*
* Authors:
* Mark McLoughlin <mark@skynet.ie>
* Author: Vincent Geddes <vincent.geddes@gmail.com>
*
* Modified for use in glade-3.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* This program 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
* Library General Public License for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
#ifndef __GLADE_PALETTE_PALETTE_EXPANDER_H__
#define __GLADE_PALETTE_PALETTE_EXPANDER_H__
#ifndef __GLADE_PALETTE_EXPANDER_H__
#define __GLADE_PALETTE_EXPANDER_H__
#include <gtk/gtkbin.h>
G_BEGIN_DECLS
#define GLADE_TYPE_PALETTE_EXPANDER (glade_palette_expander_get_type ())
#define GLADE_PALETTE_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_PALETTE_EXPANDER, GladePaletteExpander))
#define GLADE_PALETTE_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_PALETTE_EXPANDER, GladePaletteExpanderClass))
#define GLADE_IS_PALETTE_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_PALETTE_EXPANDER))
#define GLADE_IS_PALETTE_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PALETTE_EXPANDER))
#define GLADE_PALETTE_EXPANDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_PALETTE_EXPANDER, GladePaletteExpanderClass))
#define GLADE_TYPE_PALETTE_EXPANDER (glade_palette_expander_get_type ())
#define GLADE_PALETTE_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_PALETTE_EXPANDER, GladePaletteExpander))
#define GLADE_PALETTE_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_PALETTE_EXPANDER, GladePaletteExpanderClass))
#define GLADE_IS_PALETTE_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_PALETTE_EXPANDER))
#define GLADE_IS_PALETTE_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PALETTE_EXPANDER))
#define GLADE_PALETTE_EXPANDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_PALETTE_EXPANDER, GladePaletteExpanderClass))
typedef struct _GladePaletteExpander GladePaletteExpander;
typedef struct _GladePaletteExpanderClass GladePaletteExpanderClass;
typedef struct _GladePaletteExpanderPrivate GladePaletteExpanderPrivate;
typedef struct _GladePaletteExpander GladePaletteExpander;
typedef struct _GladePaletteExpanderPrivate GladePaletteExpanderPrivate;
typedef struct _GladePaletteExpanderClass GladePaletteExpanderClass;
struct _GladePaletteExpander
{
GtkBin bin;
/*< private >*/
GtkBin parent_instance;
GladePaletteExpanderPrivate *priv;
GladePaletteExpanderPrivate *priv;
};
struct _GladePaletteExpanderClass
{
GtkBinClass parent_class;
/* Key binding signal; to get notification on the expansion
* state connect to notify:expanded.
*/
void (* activate) (GladePaletteExpander *expander);
GtkBinClass parent_class;
void (* activate) (GladePaletteExpander *expander);
};
GType glade_palette_expander_get_type (void) G_GNUC_CONST;
GtkWidget *glade_palette_expander_new (const gchar *label);
GtkWidget *glade_palette_expander_new_with_mnemonic (const gchar *label);
GType glade_palette_expander_get_type (void) G_GNUC_CONST;
void glade_palette_expander_set_expanded (GladePaletteExpander *expander,
gboolean expanded);
gboolean glade_palette_expander_get_expanded (GladePaletteExpander *expander);
GtkWidget *glade_palette_expander_new (const gchar *label);
void glade_palette_expander_set_spacing (GladePaletteExpander *expander,
gint spacing);
gint glade_palette_expander_get_spacing (GladePaletteExpander *expander);
void glade_palette_expander_set_expanded (GladePaletteExpander *expander,
gboolean expanded);
gboolean glade_palette_expander_get_expanded (GladePaletteExpander *expander);
void glade_palette_expander_set_label (GladePaletteExpander *expander,
const gchar *label);
G_CONST_RETURN gchar *glade_palette_expander_get_label (GladePaletteExpander *expander);
void glade_palette_expander_set_spacing (GladePaletteExpander *expander,
guint spacing);
guint glade_palette_expander_get_spacing (GladePaletteExpander *expander);
void glade_palette_expander_set_use_underline (GladePaletteExpander *expander,
gboolean use_underline);
gboolean glade_palette_expander_get_use_underline (GladePaletteExpander *expander);
void glade_palette_expander_set_label (GladePaletteExpander *expander,
const gchar *label);
const gchar *glade_palette_expander_get_label (GladePaletteExpander *expander);
void glade_palette_expander_set_use_markup (GladePaletteExpander *expander,
gboolean use_markup);
gboolean glade_palette_expander_get_use_markup (GladePaletteExpander *expander);
void glade_palette_expander_set_use_markup (GladePaletteExpander *expander,
gboolean use_markup);
gboolean glade_palette_expander_get_use_markup (GladePaletteExpander *expander);
void glade_palette_expander_set_label_widget (GladePaletteExpander *expander,
GtkWidget *label_widget);
GtkWidget *glade_palette_expander_get_label_widget (GladePaletteExpander *expander);
G_END_DECLS
#endif /* __GLADE_PALETTE_PALETTE_EXPANDER_H__ */
#endif /* __GLADE_PALETTE_EXPANDER_H__ */
......@@ -471,13 +471,13 @@ glade_palette_new_item_group (GladePalette *palette, GladeWidgetGroup *group)
}
title = g_strdup_printf ("<b>%s</b>", glade_widget_group_get_title (group));
title = g_strdup_printf ("%s", glade_widget_group_get_title (group));
/* Put items box in a expander */
expander = glade_palette_expander_new (title);
glade_palette_expander_set_spacing (GLADE_PALETTE_EXPANDER (expander), 2);
glade_palette_expander_set_use_markup (GLADE_PALETTE_EXPANDER (expander), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (expander), 1);
gtk_container_set_border_width (GTK_CONTAINER (expander), 0);
/* set default expanded state */
glade_palette_expander_set_expanded (GLADE_PALETTE_EXPANDER (expander),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment