[POS-commit] r166 - libglade
Johan Dahlin
jdahlin at async.com.br
Tue Mar 22 11:31:51 BRT 2005
Author: jdahlin
Date: 2005-03-22 11:31:51 -0300 (Tue, 22 Mar 2005)
New Revision: 166
Removed:
libglade/glade-private.h
Modified:
libglade/glade-gtk.c
libglade/glade-parser.c
libglade/glade-xml.c
libglade/glade-xml.h
Log:
remove glade-private.h
Modified: libglade/glade-gtk.c
===================================================================
--- libglade/glade-gtk.c 2005-03-22 14:24:19 UTC (rev 165)
+++ libglade/glade-gtk.c 2005-03-22 14:31:51 UTC (rev 166)
@@ -36,7 +36,6 @@
#include <gtk/gtk.h>
#include "glade-build.h"
-#include "glade-private.h"
#include "glade-xml.h"
#define INT(s) (strtol ((s), NULL, 0))
@@ -62,18 +61,21 @@
visible_id = g_quark_from_static_string("Libglade::visible");
if (BOOL(prop_value))
- g_object_set_qdata(G_OBJECT(widget), visible_id,GINT_TO_POINTER(TRUE));
+ g_object_set_qdata(G_OBJECT(widget), visible_id, GINT_TO_POINTER(TRUE));
}
static void
set_tooltip(GladeXML *xml, GtkWidget *widget,
const gchar *prop_name, const gchar *prop_value)
{
+ g_print("XXX: handle tooltips without accessing private parts of GladeXML");
+#if 0
if (GTK_IS_TOOL_ITEM (widget))
gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (widget), xml->priv->tooltips,
prop_value, NULL);
else
gtk_tooltips_set_tip(xml->priv->tooltips, widget, prop_value, NULL);
+#endif
}
static void
@@ -82,17 +84,23 @@
{
if (!GTK_WIDGET_CAN_DEFAULT(widget))
return;
-
+
+ g_print("XXX: handle has-default without accessing private parts of GladeXML");
+#if 0
if (BOOL(prop_value))
xml->priv->default_widget = widget;
+#endif
}
static void
set_has_focus(GladeXML *xml, GtkWidget *widget,
const gchar *prop_name, const gchar *prop_value)
{
+ g_print("XXX: handle focus without accessing private parts of GladeXML");
+#if 0
if (BOOL(prop_value))
xml->priv->focus_widget = widget;
+#endif
}
static void
Modified: libglade/glade-parser.c
===================================================================
--- libglade/glade-parser.c 2005-03-22 14:24:19 UTC (rev 165)
+++ libglade/glade-parser.c 2005-03-22 14:31:51 UTC (rev 166)
@@ -37,7 +37,6 @@
#include <glib/gmarkup.h>
#include "glade-parser.h"
-#include "glade-private.h"
typedef enum {
PARSER_START,
@@ -517,9 +516,11 @@
{
int i;
+#if 0
GLADE_NOTE(PARSER, g_message("<%s> in state %s",
name, state_names[state->state]));
-
+#endif
+
switch (state->state) {
case PARSER_START:
if (!strcmp(name, "glade-interface")) {
@@ -887,9 +888,11 @@
{
GladeProperty prop;
+#if 0
GLADE_NOTE(PARSER, g_message("</%s> in state %s",
name, state_names[state->state]));
-
+#endif
+
switch (state->state) {
case PARSER_START:
g_warning("should not be closing any elements in this state");
Deleted: libglade/glade-private.h
===================================================================
--- libglade/glade-private.h 2005-03-22 14:24:19 UTC (rev 165)
+++ libglade/glade-private.h 2005-03-22 14:31:51 UTC (rev 166)
@@ -1,102 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * libglade - a library for building interfaces from XML files at runtime
- * Copyright (C) 1998-2002 James Henstridge <james at daa.com.au>
- *
- * glade-private.h: private datastructures for the GladeXML object.
- *
- * 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,
- * 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.
- *
- * 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.
- */
-#ifndef GLADE_PRIVATE_H
-#define GLADE_PRIVATE_H
-#include <stdio.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-
-#include "glade-xml.h"
-#include "glade-parser.h"
-
-struct _GladeXMLPrivate {
- GladeInterface *tree; /* the tree for this GladeXML */
-
- GtkTooltips *tooltips; /* if not NULL, holds all tooltip info */
-
- /* hash tables of widgets. The keys are stored as widget data,
- * and get freed with those widgets. */
- GHashTable *name_hash;
-
- /* hash table of signals. The Data is a GList of GladeSignalData
- * structures which get freed when the GladeXML object is
- * destroyed */
- GHashTable *signals;
-
- /* the current toplevel being built */
- GtkWindow *toplevel;
-
- /* the accel group to add accelerators to (not mnemonics) */
- GtkAccelGroup *accel_group;
-
- /* these hold the focus and default widgets for a window until they
- * get packed into the window -- we can't call gtk_widget_grab_focus
- * or grab_default until this occurs */
- GtkWidget *focus_widget;
- GtkWidget *default_widget;
-
- /* list of GtkWidget properties waiting to be set. (they couldn't
- * be set earlier because the value widget hadn't been created
- * yet). */
- GList *deferred_props;
-};
-
-typedef struct _GladeSignalData GladeSignalData;
-struct _GladeSignalData {
- GObject *signal_object;
- char *signal_name;
- char *connect_object; /* or NULL if there is none */
- gboolean signal_after;
-};
-
-typedef struct _GladeDeferredProperty GladeDeferredProperty;
-struct _GladeDeferredProperty {
- const gchar *target_name;
-
- enum { DEFERRED_PROP, DEFERRED_REL } type;
- union {
- struct {
- GObject *object;
- const gchar *prop_name;
- } prop;
- struct {
- AtkRelationSet *relation_set;
- AtkRelationType relation_type;
- } rel;
- } d;
-};
-
-typedef enum {
- GLADE_DEBUG_PARSER = 1 << 0,
- GLADE_DEBUG_BUILD = 1 << 1
-} GladeDebugFlag;
-
-extern guint _glade_debug_flags;
-#ifdef DEBUG
-# define GLADE_NOTE(type, action) G_STMT_START { \
- if (_glade_debug_flags & GLADE_DEBUG_##type) \
- { action; }; } G_STMT_END
-#else
-# define GLADE_NOTE(type, action)
-#endif
-
-#endif
Modified: libglade/glade-xml.c
===================================================================
--- libglade/glade-xml.c 2005-03-22 14:24:19 UTC (rev 165)
+++ libglade/glade-xml.c 2005-03-22 14:31:51 UTC (rev 166)
@@ -39,7 +39,6 @@
#include "glade-xml.h"
#include "glade-build.h"
-#include "glade-private.h"
static const gchar *glade_xml_tree_key = "GladeXML::tree";
static GQuark glade_xml_tree_id = 0;
@@ -48,7 +47,38 @@
static const gchar *glade_xml_tooltips_key = "GladeXML::tooltips";
static GQuark glade_xml_tooltips_id = 0;
+struct _GladeXMLPrivate {
+ GladeInterface *tree; /* the tree for this GladeXML */
+ GtkTooltips *tooltips; /* if not NULL, holds all tooltip info */
+
+ /* hash tables of widgets. The keys are stored as widget data,
+ * and get freed with those widgets. */
+ GHashTable *name_hash;
+
+ /* hash table of signals. The Data is a GList of GladeSignalData
+ * structures which get freed when the GladeXML object is
+ * destroyed */
+ GHashTable *signals;
+
+ /* the current toplevel being built */
+ GtkWindow *toplevel;
+
+ /* the accel group to add accelerators to (not mnemonics) */
+ GtkAccelGroup *accel_group;
+
+ /* these hold the focus and default widgets for a window until they
+ * get packed into the window -- we can't call gtk_widget_grab_focus
+ * or grab_default until this occurs */
+ GtkWidget *focus_widget;
+ GtkWidget *default_widget;
+
+ /* list of GtkWidget properties waiting to be set. (they couldn't
+ * be set earlier because the value widget hadn't been created
+ * yet). */
+ GList *deferred_props;
+};
+
static void _glade_init(void);
static void glade_xml_init(GladeXML *xml);
Modified: libglade/glade-xml.h
===================================================================
--- libglade/glade-xml.h 2005-03-22 14:24:19 UTC (rev 165)
+++ libglade/glade-xml.h 2005-03-22 14:31:51 UTC (rev 166)
@@ -132,9 +132,43 @@
void glade_set_custom_handler(GladeXMLCustomWidgetHandler handler,
gpointer user_data);
-#ifndef LIBGLADE_DISABLE_DEPRECATED
-#define glade_xml_new_with_domain glade_xml_new
-#define glade_xml_new_from_memory glade_xml_new_from_buffer
+typedef struct _GladeSignalData GladeSignalData;
+struct _GladeSignalData {
+ GObject *signal_object;
+ char *signal_name;
+ char *connect_object; /* or NULL if there is none */
+ gboolean signal_after;
+};
+
+typedef struct _GladeDeferredProperty GladeDeferredProperty;
+struct _GladeDeferredProperty {
+ const gchar *target_name;
+
+ enum { DEFERRED_PROP, DEFERRED_REL } type;
+ union {
+ struct {
+ GObject *object;
+ const gchar *prop_name;
+ } prop;
+ struct {
+ AtkRelationSet *relation_set;
+ AtkRelationType relation_type;
+ } rel;
+ } d;
+};
+
+typedef enum {
+ GLADE_DEBUG_PARSER = 1 << 0,
+ GLADE_DEBUG_BUILD = 1 << 1
+} GladeDebugFlag;
+
+extern guint _glade_debug_flags;
+#ifdef DEBUG
+# define GLADE_NOTE(type, action) G_STMT_START { \
+ if (_glade_debug_flags & GLADE_DEBUG_##type) \
+ { action; }; } G_STMT_END
+#else
+# define GLADE_NOTE(type, action)
#endif
G_END_DECLS
More information about the POS-commit
mailing list