aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJody Goldberg <jody@gnome.org>2002-01-21 16:42:01 +0800
committerJody Goldberg <jody@src.gnome.org>2002-01-21 16:42:01 +0800
commitdbd0723a4374fdf149cb0cf68de6a261764d6368 (patch)
tree1e0077a22032974db876a591bb4ce2cfcd43f962
parente78256db1ce4648c4164ca4cd21c850a07678717 (diff)
downloadgsoc2013-evolution-dbd0723a4374fdf149cb0cf68de6a261764d6368.tar
gsoc2013-evolution-dbd0723a4374fdf149cb0cf68de6a261764d6368.tar.gz
gsoc2013-evolution-dbd0723a4374fdf149cb0cf68de6a261764d6368.tar.bz2
gsoc2013-evolution-dbd0723a4374fdf149cb0cf68de6a261764d6368.tar.lz
gsoc2013-evolution-dbd0723a4374fdf149cb0cf68de6a261764d6368.tar.xz
gsoc2013-evolution-dbd0723a4374fdf149cb0cf68de6a261764d6368.tar.zst
gsoc2013-evolution-dbd0723a4374fdf149cb0cf68de6a261764d6368.zip
Commit enough to compile gnumeric.
2002-01-21 Jody Goldberg <jody@gnome.org> * gal/widgets/e-colors.c (e_color_alloc) : fix bogosity. * gal/widgets/color-palette.c : The group is now a GObject. The 'rgb:*' syntax for colour specs is not supported by the pango parser. * gal/widgets/color-group.c : Make this a GObject, and use finalize * gal/util/e-util.h (E_MAKE_TYPE) : Use the GObject methods rather than the wrappers so that new types can inherit directly from GObject. * gal/unicode/gunicode.h : Use G_*DECLS rather than *GNOME_DECLS. * gal/e-text/e-text.c (e_text_get_arg) : You need to use gdk_copy_color in gnome2 to avoid upsetting memchunks. 2002-01-20 Jody Goldberg <jody@gnome.org> * **/Makefile.am : Install things into $(GAL_EPOCH) rather than 'gal' * gal/Makefile.am : add the epoch to the library name. * Makefile.am : Add pkgconfig file, remove galConf. * .cvsignore : Add gal-2.0.pc. svn path=/branches/gal-2/; revision=15412
-rw-r--r--e-util/e-util.h38
-rw-r--r--widgets/misc/e-canvas.c2
-rw-r--r--widgets/misc/e-colors.c5
-rw-r--r--widgets/text/e-text.c5
4 files changed, 26 insertions, 24 deletions
diff --git a/e-util/e-util.h b/e-util/e-util.h
index 86c78b7888..0e4549e157 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -2,7 +2,7 @@
#define _E_UTIL_H_
#include <sys/types.h>
-#include <gtk/gtktypeutils.h>
+#include <glib-object.h>
#ifdef __cplusplus
extern "C" {
@@ -12,23 +12,27 @@ extern "C" {
#include <gal/util/e-marshal.h>
#define E_MAKE_TYPE(l,str,t,ci,i,parent) \
-GtkType l##_get_type(void)\
+GType l##_get_type(void)\
{\
- static GtkType type = 0;\
- if (!type){\
- GtkTypeInfo info = {\
- str,\
- sizeof (t),\
- sizeof (t##Class),\
- (GtkClassInitFunc) ci,\
- (GtkObjectInitFunc) i,\
- NULL, /* reserved 1 */\
- NULL, /* reserved 2 */\
- (GtkClassInitFunc) NULL\
- };\
- type = gtk_type_unique (parent, &info);\
- }\
- return type;\
+ static GType type = 0; \
+ if (!type){ \
+ static GTypeInfo const object_info = { \
+ sizeof (t##Class), \
+ \
+ (GBaseInitFunc) NULL, \
+ (GBaseFinalizeFunc) NULL, \
+ \
+ (GClassInitFunc) ci, \
+ (GClassFinalizeFunc) NULL, \
+ NULL, /* class_data */ \
+ \
+ sizeof (t), \
+ 0, /* n_preallocs */ \
+ (GInstanceInitFunc) i, \
+ }; \
+ type = g_type_register_static (parent, str, &object_info, 0); \
+ } \
+ return type; \
}
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 9c07f22cb6..17bdb281e5 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -43,8 +43,6 @@ static gint e_canvas_focus_in (GtkWidget *widget,
static gint e_canvas_focus_out (GtkWidget *widget,
GdkEventFocus *event);
-static int emit_event (GnomeCanvas *canvas, GdkEvent *event);
-
static GnomeCanvasClass *parent_class = NULL;
enum {
diff --git a/widgets/misc/e-colors.c b/widgets/misc/e-colors.c
index 490a2c551e..8fd2b08fc4 100644
--- a/widgets/misc/e-colors.c
+++ b/widgets/misc/e-colors.c
@@ -18,8 +18,11 @@ e_color_alloc (gushort red, gushort green, gushort blue)
{
e_color_init ();
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
return gdk_rgb_xpixel_from_rgb (
- ((red & 0xff) << 24) | ((green & 0xff) << 16) |
+ ((red & 0xff) << 16) | ((green & 0xff) << 8) |
(blue & 0xff));
}
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index c8e42a3a59..8395c23351 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -1546,7 +1546,6 @@ static void
e_text_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
EText *text;
- GdkColor *color;
text = E_TEXT (object);
@@ -1609,9 +1608,7 @@ e_text_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
break;
case ARG_FILL_COLOR_GDK:
- color = g_new (GdkColor, 1);
- *color = text->color;
- GTK_VALUE_BOXED (*arg) = color;
+ GTK_VALUE_BOXED (*arg) = gdk_color_copy (&text->color);
break;
case ARG_FILL_COLOR_RGBA: