Commit c5387f7d authored by Vincent Geddes's avatar Vincent Geddes

install some missing header files. Fixes an Anjuta compilation error.

	* gladeui/Makefile.am: install some missing header files. Fixes an
	  Anjuta compilation error.

        * gladeui/glade-app.c: Update to use g_object_ref_sink ().
        
        * gladeui/glade-palette-expander.c: Correctly handle internal widget.

svn path=/trunk/; revision=1280
parent 27f06c2f
2007-04-26 Vincent Geddes <vincent.geddes@gmail.com>
* gladeui/Makefile.am: install some missing header files. Fixes an
Anjuta compilation error.
* gladeui/glade-app.c: Update to use g_object_ref_sink ().
* gladeui/glade-palette-expander.c: Correctly handle internal widget.
2007-04-26 Vincent Geddes <vincent.geddes@gmail.com>
* gladeui/glade-project.h, gladeui/glade-project.c:
......
......@@ -64,10 +64,6 @@ libgladeui_1_la_SOURCES = \
glade-catalog.h \
glade-marshallers.h \
glade-accumulators.h \
glade-parser.h \
glade-cursor.h \
glade-signal.h \
glade-xml-utils.h \
atk.xpm
libgladeui_1_la_CPPFLAGS = \
......@@ -98,6 +94,7 @@ libgladeuiinclude_HEADERS = \
glade-editor-property.h \
glade-signal-editor.h \
glade-palette.h \
glade-palette-item.h \
glade-design-layout.h \
glade-design-view.h \
glade-widget.h \
......@@ -113,6 +110,10 @@ libgladeuiinclude_HEADERS = \
glade-fixed.h \
glade-binding.h \
glade-base-editor.h \
glade-xml-utils.h \
glade-parser.h \
glade-signal.h \
glade-cursor.h \
fixed_bg.xpm
......
......@@ -102,9 +102,9 @@ G_DEFINE_TYPE (GladeApp, glade_app, G_TYPE_OBJECT);
* GObjectClass *
*****************************************************************/
static GObject *
glade_app_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties)
glade_app_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties)
{
GObject *object;
......@@ -168,7 +168,6 @@ glade_app_finalize (GObject *app)
g_free (bindings_dir);
g_free (pixmaps_dir);
g_free (locale_dir);
#endif
glade_binding_unload_all ();
......@@ -439,17 +438,15 @@ glade_app_init (GladeApp *app)
/* Create palette */
app->priv->palette = (GladePalette *) glade_palette_new (app->priv->catalogs);
g_object_ref (app->priv->palette);
gtk_object_sink (GTK_OBJECT (app->priv->palette));
gtk_widget_show_all (GTK_WIDGET (app->priv->palette));
g_object_ref_sink (app->priv->palette);
g_signal_connect (G_OBJECT (app->priv->palette), "toggled",
G_CALLBACK (on_palette_button_clicked), app);
/* Create Editor */
app->priv->editor = GLADE_EDITOR (glade_editor_new ());
g_object_ref (app->priv->editor);
gtk_object_sink (GTK_OBJECT (app->priv->editor));
gtk_widget_show (GTK_WIDGET (app->priv->editor));
g_object_ref_sink (GTK_OBJECT (app->priv->editor));
glade_editor_refresh (app->priv->editor);
/* Create clipboard */
......
......@@ -75,7 +75,9 @@ static void glade_palette_expander_size_allocate (GtkWidget *widget,
static void glade_palette_expander_map (GtkWidget *widget);
static void glade_palette_expander_unmap (GtkWidget *widget);
static void glade_palette_expander_add (GtkContainer *container,
GtkWidget *widget);
GtkWidget *widget);
static void glade_palette_expander_remove (GtkContainer *container,
GtkWidget *widget);
static void glade_palette_expander_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
......@@ -125,6 +127,7 @@ glade_palette_expander_class_init (GladePaletteExpanderClass *klass)
object_class->get_property = glade_palette_expander_get_property;
container_class->add = glade_palette_expander_add;
container_class->remove = glade_palette_expander_remove;
container_class->forall = glade_palette_expander_forall;
widget_class->size_request = glade_palette_expander_size_request;
......@@ -435,11 +438,33 @@ glade_palette_expander_add (GtkContainer *container,
{
GTK_CONTAINER_CLASS (glade_palette_expander_parent_class)->add (container, widget);
gtk_widget_set_child_visible (widget,
GLADE_PALETTE_EXPANDER (container)->priv->expanded);
gtk_widget_set_child_visible (widget, GLADE_PALETTE_EXPANDER (container)->priv->expanded);
gtk_widget_queue_resize (GTK_WIDGET (container));
}
static void
glade_palette_expander_remove (GtkContainer *container,
GtkWidget *widget)
{
GladePaletteExpander *expander = GLADE_PALETTE_EXPANDER (container);
if (expander->priv->button == widget)
{
gtk_widget_unparent (expander->priv->button);
expander->priv->button = NULL;
if (GTK_WIDGET_VISIBLE (expander))
gtk_widget_queue_resize (GTK_WIDGET (expander));
g_object_notify (G_OBJECT (expander), "label");
}
else
{
GTK_CONTAINER_CLASS (glade_palette_expander_parent_class)->remove (container, widget);
}
}
static void
glade_palette_expander_forall (GtkContainer *container,
gboolean include_internals,
......@@ -452,8 +477,8 @@ glade_palette_expander_forall (GtkContainer *container,
if (bin->child)
(* callback) (bin->child, callback_data);
(* callback) (priv->button, callback_data);
if (priv->button)
(* callback) (priv->button, callback_data);
}
static gboolean
......@@ -480,7 +505,7 @@ button_drag_motion (GtkWidget *widget,
guint time,
GladePaletteExpander *expander)
{
GladePaletteExpanderPrivate *priv = expander->priv;
GladePaletteExpanderPrivate *priv = expander->priv;
if (!priv->expanded && !priv->expand_timer_handle)
{
......@@ -504,7 +529,7 @@ button_drag_leave (GtkWidget *widget,
guint time,
GladePaletteExpander *expander)
{
GladePaletteExpanderPrivate *priv = expander->priv;
GladePaletteExpanderPrivate *priv = expander->priv;
if (priv->expand_timer_handle)
{
......
......@@ -83,3 +83,4 @@ gboolean glade_palette_expander_get_use_markup (GladePaletteExpander *exp
G_END_DECLS
#endif /* __GLADE_PALETTE_EXPANDER_H__ */
......@@ -278,11 +278,9 @@ glade_palette_get_property (GObject *object,
static void
glade_palette_dispose (GObject *object)
{
GladePalette *palette;
GladePalettePrivate *priv;
palette = GLADE_PALETTE (object);
priv = GLADE_PALETTE_GET_PRIVATE (palette);
priv = GLADE_PALETTE_GET_PRIVATE (object);
priv->catalogs = NULL;
......@@ -291,12 +289,16 @@ glade_palette_dispose (GObject *object)
g_object_unref (priv->tray);
priv->tray = NULL;
}
g_object_unref (priv->tooltips);
g_object_unref (priv->static_tooltips);
if (priv->tooltips && priv->static_tooltips)
{
g_object_unref (priv->tooltips);
g_object_unref (priv->static_tooltips);
priv->tooltips = NULL;
priv->static_tooltips = NULL;
}
G_OBJECT_CLASS (glade_palette_parent_class)->dispose (object);
}
static void
......@@ -605,11 +607,9 @@ glade_palette_init (GladePalette *palette)
/* create tooltips */
priv->tooltips = gtk_tooltips_new ();
g_object_ref (priv->tooltips);
gtk_object_sink (GTK_OBJECT (priv->tooltips));
g_object_ref_sink (GTK_OBJECT (priv->tooltips));
priv->static_tooltips = gtk_tooltips_new ();
g_object_ref (priv->static_tooltips);
gtk_object_sink (GTK_OBJECT (priv->static_tooltips));
g_object_ref_sink (GTK_OBJECT (priv->static_tooltips));
gtk_tooltips_set_tip (priv->static_tooltips, priv->selector_button, _("Widget selector"), NULL);
......
......@@ -49,7 +49,7 @@ typedef struct _GladePaletteClass GladePaletteClass;
struct _GladePalette
{
GtkVBox vbox; /* The parent is a vbox */
GtkVBox parent_instance;
GladePalettePrivate *priv;
};
......@@ -62,24 +62,29 @@ struct _GladePaletteClass
};
GType glade_palette_get_type (void) G_GNUC_CONST;
GType glade_palette_get_type (void) G_GNUC_CONST;
GtkWidget *glade_palette_new (const GList *catalogs);
GtkWidget *glade_palette_new (const GList *catalogs);
void glade_palette_deselect_current_item (GladePalette *palette, gboolean sticky_aware);
void glade_palette_deselect_current_item (GladePalette *palette,
gboolean sticky_aware);
GladeWidgetAdaptor *glade_palette_get_current_item (GladePalette *palette);
GladeWidgetAdaptor *glade_palette_get_current_item (GladePalette *palette);
GladeItemAppearance glade_palette_get_item_appearance (GladePalette *palette);
void glade_palette_set_item_appearance (GladePalette *palette, GladeItemAppearance appearance);
GladeItemAppearance glade_palette_get_item_appearance (GladePalette *palette);
void glade_palette_set_item_appearance (GladePalette *palette,
GladeItemAppearance appearance);
gboolean glade_palette_get_use_small_item_icons (GladePalette *palette);
void glade_palette_set_use_small_item_icons (GladePalette *palette, gboolean use_small_item_icons);
void glade_palette_set_show_selector_button (GladePalette *palette, gboolean show_selector_button);
void glade_palette_set_use_small_item_icons (GladePalette *palette,
gboolean use_small_item_icons);
void glade_palette_set_show_selector_button (GladePalette *palette,
gboolean show_selector_button);
G_END_DECLS
#endif /* __GLADE_PALETTE_H__ */
......@@ -42,7 +42,6 @@ typedef struct _GladeProject GladeProject;
#include <gladeui/glade-placeholder.h>
#include <gladeui/glade-utils.h>
#include <gladeui/glade-builtins.h>
#include <gladeui/glade-xml-utils.h>
#include <gladeui/glade-fixed.h>
#endif /* __GLADE_H__ */
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