GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 43efaeba authored by Gustavo Giraldez's avatar Gustavo Giraldez Committed by Gustavo Giráldez

Ported to GtkIconTheme. Use new gobject's class private data

2003-12-26  Gustavo Giraldez  <gustavo@localhost.localdomain>

	* gdl/gdl-icons.h:
	* gdl/gdl-icons.c: Ported to GtkIconTheme.  Use new gobject's
	class private data (g_type_class_add_private, etc.).  Removed
	"icon_zoom" property.
	(gdl_icons_new): Take one parameter instead of two.

	* symbol-browser-control/symbol-browser.c: Ported from symbol
	combo to GtkComboBox.

	* symbol-browser-control/symbol-browser-cobject.h:
	* symbol-browser-control/symbol-browser-cobject.c: Ported from
	BonoboXObject to BonoboObject.

	* configure.in: Added DEPRECATED_FLAGS.  Define DEPRECATED_FLAGS
	and error compiler warnings only in maintainer mode.  Require Gtk+
	2.3.0.

	* gdl/gdl-tools.c (gdl_pixmaps_free): Fix inverted precondition.

	* gdl/gdl-dock.c (gdl_dock_get_property): Replace deprecated
	g_value_set_string_take_ownership with g_value_take_string.

	* symbol-browser-control/test-symbol-browser.c:
	* symbol-browser-control/factory.c:
	* gdl/test-dataview.c:
	* gdl/gdl-dock-item-grip.c:
	* gdl/gdl-data-model-test.c:
	* gdl/gdl-data-frame.c: Fix compiler warnings.
parent 67fad5ff
2003-12-26 Gustavo Giraldez <gustavo@localhost.localdomain>
* gdl/gdl-icons.h:
* gdl/gdl-icons.c: Ported to GtkIconTheme. Use new gobject's
class private data (g_type_class_add_private, etc.). Removed
"icon_zoom" property.
(gdl_icons_new): Take one parameter instead of two.
* symbol-browser-control/symbol-browser.c: Ported from symbol
combo to GtkComboBox.
* symbol-browser-control/symbol-browser-cobject.h:
* symbol-browser-control/symbol-browser-cobject.c: Ported from
BonoboXObject to BonoboObject.
* configure.in: Added DEPRECATED_FLAGS. Define DEPRECATED_FLAGS
and error compiler warnings only in maintainer mode. Require Gtk+
2.3.0.
* gdl/gdl-tools.c (gdl_pixmaps_free): Fix inverted precondition.
* gdl/gdl-dock.c (gdl_dock_get_property): Replace deprecated
g_value_set_string_take_ownership with g_value_take_string.
* symbol-browser-control/test-symbol-browser.c:
* symbol-browser-control/factory.c:
* gdl/test-dataview.c:
* gdl/gdl-dock-item-grip.c:
* gdl/gdl-data-model-test.c:
* gdl/gdl-data-frame.c: Fix compiler warnings.
2003-11-27 Jordi Mallach <jordi@sindominio.net>
* configure.in (ALL_LINGUAS): Added "ca" (Catalan).
......
......@@ -34,7 +34,7 @@ AC_SUBST(GDL_VERSION)
SNAPSHOT=0_`date +%Y%m%d_%H%M%S`_cvs
AC_SUBST(SNAPSHOT)
GTK_REQUIRED=2.2.0
GTK_REQUIRED=2.3.0
GNOME_REQUIRED=2.2.0
BONOBOUI_REQUIRED=2.2.0
XML_REQUIRED=2.2.8
......@@ -255,7 +255,15 @@ AC_STDC_HEADERS
AM_PROG_LIBTOOL
AM_SANITY_CHECK
GNOME_COMPILE_WARNINGS(maximum)
if test x$MAINT = x; then
GNOME_COMPILE_WARNINGS(error)
DEPRECATED_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED"
else
GNOME_COMPILE_WARNINGS(maximum)
DEPRECATED_FLAGS=""
fi
AC_SUBST(DEPRECATED_FLAGS)
dnl ***************
dnl GNOME Libraries
......
INCLUDES = \
-DG_LOG_DOMAIN=\"Gdl\" \
-DGDL_GLADEDIR=\""$(gladedir)"\" \
-DG_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-I$(includedir) -I$(top_srcdir) \
$(WARN_CFLAGS) \
$(WARN_CFLAGS) $(DEPRECATED_FLAGS) \
$(GDL_DEPENDENCIES_CFLAGS) $(XML_CFLAGS)
lib_LTLIBRARIES = libgdl-1.la
......
......@@ -135,12 +135,14 @@ gdl_data_frame_layout (GdlDataFrame *frame)
frame->area.height = frame->priv->frame_r.height + frame->priv->shadow_offset;
}
#if 0 /* not used */
static void
change_layout (GdlDataFrame *frame)
{
char *text = frame->priv->title ? frame->priv->title : "?";
pango_layout_set_text (frame->priv->layout, text, strlen (text));
}
#endif
#define EXPLODE(r) (r).x, (r).y, (r).width, (r).height
......@@ -174,14 +176,14 @@ gdl_data_frame_draw (GdlDataFrame *frame, GdkDrawable *drawable,
frame->priv->layout);
if (gdk_rectangle_intersect (expose_area, &frame->priv->close_r, &inter)) {
gdk_pixbuf_render_to_drawable_alpha (gdl_data_view_get_close_pixbuf (frame->view),
drawable,
inter.x - frame->priv->close_r.x,
inter.y - frame->priv->close_r.y,
EXPLODE (inter),
GDK_PIXBUF_ALPHA_BILEVEL,
127,
GDK_RGB_DITHER_NORMAL, 0, 0);
GdkPixbuf *pixbuf = gdl_data_view_get_close_pixbuf (frame->view);
gdk_draw_pixbuf (drawable, NULL, pixbuf,
0, 0,
inter.x - frame->priv->close_r.x,
inter.y - frame->priv->close_r.y,
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
GDK_RGB_DITHER_NORMAL, 0, 0);
}
if (frame->priv->row) {
......
......@@ -9,6 +9,7 @@
#include <string.h>
#include <gtk/gtkcellrenderertext.h>
#include <gtk/gtkcellrenderertoggle.h>
GObjectClass *parent_class;
......@@ -53,7 +54,7 @@ DataItem data4[] = {
};
DataItem data3[] = {
{ "foo foo", "foo3", "2:0", NULL },
{ "bar3", 1, "2:1", NULL },
{ "bar3", "1", "2:1", NULL },
{ "baz3", "{...}", "2:2", data4 },
{ NULL, NULL, NULL, NULL }
......@@ -108,7 +109,7 @@ get_value (GdlDataModel *dm, GdlDataIter *iter, GValue *value)
g_value_set_string (value, item->value);
} else {
g_value_init (value, G_TYPE_BOOLEAN);
g_value_set_boolean (value, item->value);
g_value_set_boolean (value, !strcmp (item->value, "1"));
}
}
......
......@@ -27,6 +27,7 @@
#include "gdl-dock.h"
#include "gdl-tools.h"
#define A11Y_UNFINISHED
enum {
ACTIVATE,
......@@ -34,8 +35,6 @@ enum {
};
static guint signals [LAST_SIGNAL];
static AtkObjectClass *a11y_parent_class = NULL;
GNOME_CLASS_BOILERPLATE (GdlDockItemGrip, gdl_dock_item_grip,
GtkWidget, GTK_TYPE_WIDGET);
......@@ -82,6 +81,11 @@ gdl_dock_item_grip_expose (GtkWidget *widget,
return FALSE;
}
#ifndef A11Y_UNFINISHED
static AtkObjectClass *a11y_parent_class = NULL;
static void
grip_item_a11y_initialize (AtkObject *accessible, gpointer widget)
{
......@@ -115,7 +119,6 @@ grip_item_a11y_ref_state_set (AtkObject *accessible)
return state_set;
}
#if 0
static GdlDock *
get_dock (GtkWidget *widget)
{
......@@ -208,9 +211,7 @@ gdl_dock_item_grip_get_n_actions (AtkAction *action)
else
return ACTION_LAST;
}
#endif
#if 0
static void
grip_item_a11y_class_init (AtkObjectClass *klass)
{
......@@ -219,12 +220,14 @@ grip_item_a11y_class_init (AtkObjectClass *klass)
klass->initialize = grip_item_a11y_initialize;
klass->ref_state_set = grip_item_a11y_ref_state_set;
}
#endif
#endif /* A11Y_UNFINISHED */
static AtkObject *
gdl_dock_item_grip_get_accessible (GtkWidget *widget)
{
#if 0
#ifndef A11Y_UNFINISHED
AtkObject *accessible;
static GType a11y_type = 0;
......@@ -251,20 +254,20 @@ gdl_dock_item_grip_get_accessible (GtkWidget *widget)
return bonobo_a11y_set_atk_object_ret (
widget, g_object_new (a11y_type, NULL));
#else
#else /* !A11Y_UNFINISHED */
return NULL;
#endif
#endif /* A11Y_UNFINISHED */
}
static void
gdl_dock_item_grip_activate (GdlDockItemGrip *grip)
{
#if 0
#ifndef A11Y_UNFINISHED
if (grip->item->is_floating)
gdl_dock_item_grip_dock (grip);
else
gdl_dock_item_grip_undock (grip);
#endif
#endif /* A11Y_UNFINISHED */
}
static void
......@@ -280,7 +283,7 @@ gdl_dock_item_grip_instance_init (GdlDockItemGrip *grip)
GTK_WIDGET_SET_FLAGS (grip, GTK_NO_WINDOW);
}
#if 0
#ifndef A11Y_UNFINISHED
static BonoboDockBand *
get_dock_band (GtkWidget *widget)
{
......@@ -289,13 +292,13 @@ get_dock_band (GtkWidget *widget)
return (BonoboDockBand *) widget;
}
#endif
#endif /* A11Y_UNFINISHED */
static gint
gdl_dock_item_grip_key_press_event (GtkWidget *widget,
GdkEventKey *event)
{
#if 0
#ifndef A11Y_UNFINISHED
gboolean had_focus = GTK_WIDGET_HAS_FOCUS (widget);
BonoboDockBand *band = get_dock_band (widget);
BonoboDockItemGrip *grip = (BonoboDockItemGrip *) widget;
......@@ -307,7 +310,7 @@ gdl_dock_item_grip_key_press_event (GtkWidget *widget,
gtk_widget_grab_focus (widget);
return TRUE;
}
#endif
#endif /* A11Y_UNFINISHED */
return GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
}
......
......@@ -440,7 +440,7 @@ gdl_dock_get_property (GObject *object,
g_object_get (GDL_DOCK_OBJECT (object)->master,
"default_title", &default_title,
NULL);
g_value_set_string_take_ownership (value, default_title);
g_value_take_string (value, default_title);
}
else
g_value_set_string (value, NULL);
......
......@@ -35,14 +35,16 @@
enum {
PROP_BOGUS,
PROP_ICON_SIZE,
PROP_ICON_ZOOM
};
#define GDL_ICONS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDL_TYPE_ICONS, GdlIconsPrivate))
typedef struct _GdlIconsPrivate GdlIconsPrivate;
struct _GdlIconsPrivate {
int icon_size;
double icon_zoom;
GnomeIconTheme *icon_theme;
GtkIconTheme *icon_theme;
GHashTable *icons;
};
......@@ -54,14 +56,11 @@ gdl_icons_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
GdlIcons *icons = GDL_ICONS (object);
GdlIconsPrivate *priv = GDL_ICONS_GET_PRIVATE (object);
switch (prop_id) {
case PROP_ICON_SIZE:
g_value_set_int (value, icons->priv->icon_size);
break;
case PROP_ICON_ZOOM:
g_value_set_double (value, icons->priv->icon_zoom);
g_value_set_int (value, priv->icon_size);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......@@ -75,22 +74,15 @@ gdl_icons_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
GdlIcons *icons = GDL_ICONS (object);
GdlIconsPrivate *priv = GDL_ICONS_GET_PRIVATE (object);
switch (prop_id) {
case PROP_ICON_SIZE:
icons->priv->icon_size = g_value_get_int (value);
g_hash_table_destroy (icons->priv->icons);
icons->priv->icons = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify)g_free,
(GDestroyNotify)gdk_pixbuf_unref);
break;
case PROP_ICON_ZOOM:
icons->priv->icon_zoom = g_value_get_double (value);
g_hash_table_destroy (icons->priv->icons);
icons->priv->icons = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify)g_free,
(GDestroyNotify)gdk_pixbuf_unref);
priv->icon_size = g_value_get_int (value);
g_hash_table_destroy (priv->icons);
priv->icons = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
(GDestroyNotify) gdk_pixbuf_unref);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......@@ -99,29 +91,30 @@ gdl_icons_set_property (GObject *object,
}
static void
theme_changed_cb (GnomeIconTheme *theme,
theme_changed_cb (GtkIconTheme *theme,
gpointer user_data)
{
GdlIcons *icons = GDL_ICONS (user_data);
GdlIconsPrivate *priv = GDL_ICONS_GET_PRIVATE (user_data);
g_hash_table_destroy (icons->priv->icons);
icons->priv->icons = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify)g_free,
(GDestroyNotify)gdk_pixbuf_unref);
g_hash_table_destroy (priv->icons);
priv->icons = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
(GDestroyNotify) gdk_pixbuf_unref);
}
static void
gdl_icons_dispose (GObject *object)
{
GdlIcons *icons = GDL_ICONS (object);
GdlIconsPrivate *priv = icons->priv;
GdlIconsPrivate *priv = GDL_ICONS_GET_PRIVATE (object);
if (priv) {
if (priv->icon_theme) {
g_object_unref (priv->icon_theme);
priv->icon_theme = NULL;
}
if (priv->icons) {
g_hash_table_destroy (priv->icons);
g_free (priv);
icons->priv = NULL;
priv->icons = NULL;
}
}
......@@ -140,40 +133,32 @@ gdl_icons_class_init (GdlIconsClass *klass)
g_param_spec_int ("icon-size",
_("Icon size"),
_("Icon size"),
12, 192, 24,
12, 256, 24,
G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_ICON_ZOOM,
g_param_spec_double ("icon-zoom",
_("Icon zoom"),
_("Icon zoom"),
1.0, 256.0, 24.0,
G_PARAM_READWRITE));
g_type_class_add_private (object_class, sizeof (GdlIconsPrivate));
}
static void
gdl_icons_instance_init (GdlIcons *icons)
{
GdlIconsPrivate *priv;
priv = g_new0 (GdlIconsPrivate, 1);
icons->priv = priv;
GdlIconsPrivate *priv = GDL_ICONS_GET_PRIVATE (icons);
priv->icon_theme = gnome_icon_theme_new ();
gnome_icon_theme_set_allow_svg (priv->icon_theme, TRUE);
g_signal_connect (G_OBJECT (priv->icon_theme), "changed",
G_CALLBACK (theme_changed_cb), icons);
priv->icon_theme = gtk_icon_theme_get_default ();
/* gtk_icon_theme_get_default() does not ref the returned object */
g_object_ref (priv->icon_theme);
g_signal_connect_object (G_OBJECT (priv->icon_theme), "changed",
G_CALLBACK (theme_changed_cb), icons, 0);
priv->icons = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify)g_free,
(GDestroyNotify)gdk_pixbuf_unref);
(GDestroyNotify) g_free,
(GDestroyNotify) gdk_pixbuf_unref);
}
GdlIcons *
gdl_icons_new (int icon_size,
double icon_zoom)
gdl_icons_new (int icon_size)
{
return GDL_ICONS (g_object_new (GDL_TYPE_ICONS,
"icon-size", icon_size,
"icon-zoom", icon_zoom,
NULL));
}
......@@ -217,13 +202,14 @@ gdl_icons_get_mime_icon (GdlIcons *icons,
{
GdkPixbuf *pixbuf;
char *icon_name;
char *icon_path;
g_return_val_if_fail (icons != NULL, NULL);
g_return_val_if_fail (GDL_IS_ICONS (icons), NULL);
g_return_val_if_fail (mime_type != NULL, NULL);
pixbuf = g_hash_table_lookup (icons->priv->icons, mime_type);
GdlIconsPrivate *priv = GDL_ICONS_GET_PRIVATE (icons);
pixbuf = g_hash_table_lookup (priv->icons, mime_type);
if (pixbuf != NULL) {
g_object_ref (G_OBJECT (pixbuf));
return pixbuf;
......@@ -232,7 +218,7 @@ gdl_icons_get_mime_icon (GdlIcons *icons,
if (!strcmp (mime_type, "application/directory-normal")) {
icon_name = g_strdup ("gnome-fs-directory");
} else {
icon_name = gnome_icon_lookup (icons->priv->icon_theme,
icon_name = gnome_icon_lookup (priv->icon_theme,
NULL,
NULL,
NULL,
......@@ -249,43 +235,21 @@ gdl_icons_get_mime_icon (GdlIcons *icons,
else
return gdl_icons_get_mime_icon (icons, "gnome-fs-regular");
} else {
icon_path = gnome_icon_theme_lookup_icon (icons->priv->icon_theme,
icon_name,
icons->priv->icon_size,
NULL,
NULL);
if (!icon_path) {
if (!gtk_icon_theme_has_icon (priv->icon_theme, icon_name)) {
g_free (icon_name);
if (!strcmp (mime_type, "gnome-fs-regular"))
return NULL;
else
return gdl_icons_get_mime_icon (icons, "gnome-fs-regular");
} else {
pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL);
if (pixbuf != NULL) {
GdkPixbuf *scaled;
int new_w, new_h;
int w, h;
double factor;
w = gdk_pixbuf_get_width (pixbuf);
h = gdk_pixbuf_get_height (pixbuf);
factor = MIN (icons->priv->icon_zoom / w,
icons->priv->icon_zoom / h);
new_w = MAX ((int) (factor * w), 1);
new_h = MAX ((int) (factor * h), 1);
scaled = gdk_pixbuf_scale_simple (pixbuf,
new_w,
new_h,
GDK_INTERP_BILINEAR);
g_object_unref (pixbuf);
pixbuf = scaled;
} else {
g_free (icon_name);
g_free (icon_path);
pixbuf = gtk_icon_theme_load_icon (priv->icon_theme,
icon_name,
priv->icon_size,
0, /* lookup flags */
NULL);
g_free (icon_name);
if (pixbuf == NULL) {
if (!strcmp (mime_type, "gnome-fs-regular"))
return NULL;
else
......@@ -295,11 +259,8 @@ gdl_icons_get_mime_icon (GdlIcons *icons,
}
}
g_hash_table_insert (icons->priv->icons, g_strdup (mime_type), pixbuf);
g_hash_table_insert (priv->icons, g_strdup (mime_type), pixbuf);
g_object_ref (pixbuf);
g_free (icon_path);
g_free (icon_name);
return pixbuf;
}
......@@ -37,13 +37,10 @@ G_BEGIN_DECLS
#define GDL_IS_ICONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GDL_TYPE_ICONS))
typedef struct _GdlIcons GdlIcons;
typedef struct _GdlIconsPrivate GdlIconsPrivate;
typedef struct _GdlIconsClass GdlIconsClass;
struct _GdlIcons {
GObject parent;
GdlIconsPrivate *priv;
};
struct _GdlIconsClass {
......@@ -51,8 +48,7 @@ struct _GdlIconsClass {
};
GType gdl_icons_get_type (void);
GdlIcons *gdl_icons_new (int icon_size,
double icon_zoom);
GdlIcons *gdl_icons_new (int icon_size);
GdkPixbuf *gdl_icons_get_folder_icon (GdlIcons *icons);
GdkPixbuf *gdl_icons_get_uri_icon (GdlIcons *icons,
......
......@@ -36,7 +36,7 @@ gdl_pixmaps_free (gpointer data)
GdlPixmap *pixcache = data;
int i;
g_return_if_fail (g_slist_find (inited_arrays, pixcache) == NULL);
g_return_if_fail (g_slist_find (inited_arrays, pixcache) != NULL);
for (i = 0; pixcache[i].path; i++)
g_free (pixcache[i].pixbuf);
......
......@@ -10,11 +10,8 @@ main (int argc, char *argv[])
{
GtkWidget *win;
GtkWidget *view;
GtkWidget *scrolled;
GdlDataModel *model;
int cx, cy;
GtkWidget *vbox;
GtkWidget *btn;
gtk_init (&argc, &argv);
......@@ -41,4 +38,6 @@ main (int argc, char *argv[])
gtk_widget_grab_focus (GTK_WIDGET (view));
gtk_main ();
return 0;
}
......@@ -7,8 +7,7 @@ INCLUDES = \
-I$(srcdir)/tagmanager/include \
-I$(top_srcdir)/gdl \
-DGNOME_DATADIR=\""$(datadir)"\" \
-DG_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
$(WARN_CFLAGS) $(DEPRECATED_FLAGS) \
-DSYMBOL_BROWSER_SRCDIR=\""$(srcdir)"\" \
$(GDL_DEPENDENCIES_CFLAGS)
......
......@@ -111,7 +111,7 @@ static void
on_control_destroy (GtkObject *control,
GnomeSymbolBrowser *symbol_browser)
{
g_message("Symbol browser control destroyed: Instance count = %d", --instance_count);
g_message("Symbol browser control destroyed: Instance count = %ld", --instance_count);
}
static BonoboObject *
......@@ -163,7 +163,7 @@ control_factory (BonoboGenericFactory *factory,
G_CALLBACK (on_control_destroy),
symbol_browser);
g_message("Symbol browser control created: Instance count = %d", ++instance_count);
g_message("Symbol browser control created: Instance count = %ld", ++instance_count);
return BONOBO_OBJECT (control);
}
......
......@@ -19,10 +19,11 @@
*/
#include <bonobo.h>
#include <string.h>
#include <gdl/gdl.h>
#include "symbol-browser-cobject.h"
static BonoboXObjectClass *parent_class;
static BonoboObjectClass *parent_class;
/* Forward declarations */
static void gnome_symbol_browser_cobject_class_init (GnomeSymbolBrowserCObjectClass *klass);
......@@ -57,7 +58,7 @@ gnome_symbol_browser_cobject_class_init (GnomeSymbolBrowserCObjectClass *klass)
POA_GNOME_Development_SymbolBrowser__epv *epv = &klass->epv;
object_class = G_OBJECT_CLASS (klass);
parent_class = gtk_type_class (BONOBO_X_OBJECT_TYPE);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gnome_symbol_browser_cobject_finalize;
......@@ -107,7 +108,7 @@ impl_set_file (PortableServer_Servant servant,
const CORBA_char *filename,
CORBA_Environment *ev)
{
gchar* file;
const gchar* file;
gchar* file_uri = "file://";
GnomeSymbolBrowserCObject *cobj;
......@@ -179,10 +180,10 @@ impl_save (PortableServer_Servant servant,
}
/* Public functions. */
BONOBO_X_TYPE_FUNC_FULL (GnomeSymbolBrowserCObject,
GNOME_Development_SymbolBrowser,
BONOBO_X_OBJECT_TYPE,
gnome_symbol_browser_cobject);
BONOBO_TYPE_FUNC_FULL (GnomeSymbolBrowserCObject,
GNOME_Development_SymbolBrowser,
BONOBO_TYPE_OBJECT,
gnome_symbol_browser_cobject);
GnomeSymbolBrowserCObject *
gnome_symbol_browser_cobject_new (GnomeSymbolBrowser *symbol_browser)
......
......@@ -21,7 +21,7 @@
#ifndef _SYMBOL_BROWSER_COBJECT_H_
#define _SYMBOL_BROWSER_COBJECT_H_
#include <bonobo/bonobo-xobject.h>
#include <bonobo/bonobo-object.h>
#include "symbol-browser.h"
G_BEGIN_DECLS
......@@ -44,12 +44,12 @@ typedef struct _GnomeSymbolBrowserCObject GnomeSymbolBrowserCObject;
typedef struct _GnomeSymbolBrowserCObjectClass GnomeSymbolBrowserCObjectClass;
struct _GnomeSymbolBrowserCObject {
BonoboXObject parent;
BonoboObject parent;
GtkWidget *symbol_browser;
};
struct _GnomeSymbolBrowserCObjectClass {
BonoboXObjectClass parent_class;
BonoboObjectClass parent_class;
POA_GNOME_Development_SymbolBrowser__epv epv;
};
......
......@@ -28,6 +28,8 @@
#include <gtk/gtktreeview.h>
#include <sys/stat.h>
#include <dirent.h>
#include <ctype.h>
#include <string.h>
#include <tm_project.h>
#include <tm_tagmanager.h>
......@@ -82,6 +84,11 @@ symbol_types[] = {
NULL
};
enum {
SYMBOL_NAME = 0,
COMBO_N_COLUMNS
};
static GtkVBoxClass *parent_class = NULL;
struct _GnomeSymbolBrowserPriv {
......@@ -95,6 +102,7 @@ struct _GnomeSymbolBrowserPriv {
TMWorkObject *tm_file;
GtkTreeModel *tree_model;
GtkListStore *combo_store;
GHashTable *symbol_hash;
BonoboListener *listener;
......@@ -178,7 +186,7 @@ static void
gsb_update_tree (GnomeSymbolBrowser *gsb)
{
GnomeSymbolBrowserPriv *priv;
TMSymbol *sym, *sym1, *symbol_tree;
TMSymbol *symbol_tree;