soc.2008.themes: 333b9356: fixed some gobject stuff
ffdragon at soc.pidgin.im
ffdragon at soc.pidgin.im
Sat Jun 21 19:46:51 EDT 2008
-----------------------------------------------------------------
Revision: 333b935659c04f8e1232ea5508036d1f9e38fe0d
Ancestor: f81d3858f10a98eb117b79b4a96ba721f529ad57
Author: ffdragon at soc.pidgin.im
Date: 2008-06-21T23:42:57
Branch: im.pidgin.soc.2008.themes
URL: http://d.pidgin.im/viewmtn/revision/info/333b935659c04f8e1232ea5508036d1f9e38fe0d
Modified files:
libpurple/sound-loader.c libpurple/sound-theme.c
libpurple/sound-theme.h libpurple/theme-loader.c
libpurple/theme-manager.c libpurple/theme.c
ChangeLog:
fixed some gobject stuff
-------------- next part --------------
============================================================
--- libpurple/sound-loader.c 75d580be025723cd5017937265f90547bf42b855
+++ libpurple/sound-loader.c cc6520f079a60e7c3d39469fe683acf6ca28269d
@@ -70,14 +70,14 @@ purple_sound_loader_build(const gchar *d
/* Parse the tree */
theme = g_object_new(PURPLE_TYPE_SOUND_THEME, "type", "sound", NULL);
- purple_theme_set_name(theme->parent, xmlnode_get_attrib(root_node, THEME_NAME));
- purple_theme_set_author(theme->parent, xmlnode_get_attrib(root_node, THEME_AUTHOR));
+ purple_theme_set_name(PURPLE_THEME(theme), xmlnode_get_attrib(root_node, THEME_NAME));
+ purple_theme_set_author(PURPLE_THEME(theme), xmlnode_get_attrib(root_node, THEME_AUTHOR));
image = g_build_filename(dir, xmlnode_get_attrib(root_node, THEME_IMAGE), NULL);
sub_node = xmlnode_get_child(root_node, THEME_DESCRIPTION);
data = xmlnode_get_data(sub_node);
- purple_theme_set_description(theme->parent, data);
+ purple_theme_set_description(PURPLE_THEME(theme), data);
xmlnode_free(sub_node);
while ((sub_node = xmlnode_get_child(root_node, THEME_SOUND_EVENT)) != NULL){
@@ -127,7 +127,7 @@ purple_sound_theme_loader_get_type (void
NULL, /* value table */
};
type = g_type_register_static (G_TYPE_OBJECT,
- "PurpleSoundThemeLoaderType",
+ "PurpleSoundThemeLoader",
&info, 0);
}
return type;
============================================================
--- libpurple/sound-theme.c 5576ef51c07bcee3d538640f5261142f75498e60
+++ libpurple/sound-theme.c 81485a6031117d364f34c667712a6c1a72149e1d
@@ -103,8 +103,8 @@ purple_sound_theme_get_type (void)
purple_sound_theme_init, /* instance_init */
NULL, /* value table */
};
- type = g_type_register_static (G_TYPE_OBJECT,
- "PurpleSoundThemeType",
+ type = g_type_register_static (PURPLE_TYPE_THEME,
+ "PurpleSoundTheme",
&info, 0);
}
return type;
@@ -136,9 +136,9 @@ purple_sound_theme_get_file_full(PurpleS
g_return_val_if_fail(PURPLE_IS_SOUND_THEME(theme), NULL);
- dir = purple_theme_get_dir(theme->parent);
+ dir = purple_theme_get_dir(PURPLE_THEME(theme));
fname = purple_sound_theme_get_file(theme, event);
- full = g_strconcat (dir, '/',fname, NULL);
+ full = g_build_filename(dir, fname, NULL);
g_free(dir);
g_free(fname);
============================================================
--- libpurple/sound-theme.h 7af14da6d4d31f7e639e4df3cf5013e65f0c62d4
+++ libpurple/sound-theme.h 855355263c84f20baa9fe02dc76e74b279dccbce
@@ -50,7 +50,7 @@ struct _PurpleSoundTheme
struct _PurpleSoundTheme
{
- PurpleTheme *parent;
+ PurpleTheme parent;
gpointer priv;
};
============================================================
--- libpurple/theme-loader.c ad0bd55a5ba654124c30adbe62d673d1776d8088
+++ libpurple/theme-loader.c a1b5e2074d219508fa707fba70b7b8adbf5d1c69
@@ -43,7 +43,6 @@ static GObjectClass *parent_class = NULL
/******************************************************************************
* Enums
*****************************************************************************/
-#define PROP_TYPE_S "type"
enum {
PROP_ZERO = 0,
@@ -109,10 +108,10 @@ purple_theme_loader_class_init (PurpleTh
obj_class->finalize = purple_theme_loader_finalize;
/* TYPE STRING (read only) */
- pspec = g_param_spec_string(PROP_TYPE_S, "Type",
+ pspec = g_param_spec_string("type", "Type",
"The string represtenting the type of the theme",
NULL,
- G_PARAM_READABLE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(obj_class, PROP_TYPE, pspec);
}
============================================================
--- libpurple/theme-manager.c a1391bda4f10ed883af0d0294270c10fcf2ce289
+++ libpurple/theme-manager.c c7a7cb58dec46f981510096fc9dec88781fa0a3e
@@ -52,7 +52,7 @@ purple_theme_manager_get_type (void)
NULL, /* Value Table */
};
type = g_type_register_static (G_TYPE_OBJECT,
- "PurpleThemeManagerType",
+ "PurpleThemeManager",
&info, 0);
}
return type;
============================================================
--- libpurple/theme.c 06760718fb8528591a89d785b5b4572301b2c3b4
+++ libpurple/theme.c 8a6f8248a782485c81adf47df79431c573be9b3a
@@ -194,7 +194,7 @@ purple_theme_class_init (PurpleThemeClas
/* PREVIEW IMAGE */
pspec = g_param_spec_pointer(PROP_IMAGE_S, "Image",
"A preview image of the theme",
- G_PARAM_READABLE);
+ G_PARAM_READWRITE);
g_object_class_install_property(obj_class, PROP_IMAGE, pspec);
}
@@ -217,7 +217,7 @@ purple_theme_get_type (void)
NULL, /* value table */
};
type = g_type_register_static (G_TYPE_OBJECT,
- "PurpleThemeType",
+ "PurpleTheme",
&info, G_TYPE_FLAG_ABSTRACT);
}
return type;
More information about the Commits
mailing list