summaryrefslogtreecommitdiff
path: root/libpurple/smiley.c
diff options
context:
space:
mode:
authorAnkit Vani <a@nevitus.org>2013-10-11 15:31:04 +0530
committerAnkit Vani <a@nevitus.org>2013-10-11 15:31:04 +0530
commita1199eb22c63902d45dffe190017a6aa3d83f2f7 (patch)
tree921db6c08483dc02f85993a46b2e348f67c18b7b /libpurple/smiley.c
parentc442ba362371e617c0117f4f94085081ed8d5e83 (diff)
downloadpidgin-a1199eb22c63902d45dffe190017a6aa3d83f2f7.tar.gz
Cleaned up properties and added g_object_notify calls for everything else
Diffstat (limited to 'libpurple/smiley.c')
-rw-r--r--libpurple/smiley.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/libpurple/smiley.c b/libpurple/smiley.c
index 1384a73369..55f418d4af 100644
--- a/libpurple/smiley.c
+++ b/libpurple/smiley.c
@@ -285,9 +285,6 @@ enum
PROP_IMGSTORE
};
-#define PROP_SHORTCUT_S "shortcut"
-#define PROP_IMGSTORE_S "image"
-
enum
{
SIG_DESTROY,
@@ -356,7 +353,7 @@ purple_smiley_set_property(GObject *object, guint param_id, const GValue *value,
priv->checksum = NULL;
}
- g_object_notify(object, PROP_IMGSTORE_S);
+ g_object_notify(object, "image");
}
break;
default:
@@ -410,14 +407,14 @@ purple_smiley_class_init(PurpleSmileyClass *klass)
gobj_class->dispose = purple_smiley_dispose;
/* Shortcut */
- pspec = g_param_spec_string(PROP_SHORTCUT_S, _("Shortcut"),
+ pspec = g_param_spec_string("shortcut", _("Shortcut"),
_("The text-shortcut for the smiley"),
NULL,
G_PARAM_READWRITE);
g_object_class_install_property(gobj_class, PROP_SHORTCUT, pspec);
/* Stored Image */
- pspec = g_param_spec_pointer(PROP_IMGSTORE_S, _("Stored Image"),
+ pspec = g_param_spec_pointer("image", _("Stored Image"),
_("Stored Image. (that'll have to do for now)"),
G_PARAM_READWRITE);
g_object_class_install_property(gobj_class, PROP_IMGSTORE, pspec);
@@ -640,7 +637,7 @@ purple_smiley_set_data_impl(PurpleSmiley *smiley, guchar *smiley_data,
new_img = purple_smiley_data_new(smiley_data, smiley_data_len);
- g_object_set(G_OBJECT(smiley), PROP_IMGSTORE_S, new_img, NULL);
+ g_object_set(G_OBJECT(smiley), "image", new_img, NULL);
/* If the old and new image files have different names we need
* to unstore old image file. */
@@ -665,7 +662,7 @@ purple_smiley_create(const char *shortcut)
{
PurpleSmiley *smiley;
- smiley = PURPLE_SMILEY(g_object_new(PURPLE_TYPE_SMILEY, PROP_SHORTCUT_S, shortcut, NULL));
+ smiley = PURPLE_SMILEY(g_object_new(PURPLE_TYPE_SMILEY, "shortcut", shortcut, NULL));
return smiley;
}
@@ -686,7 +683,7 @@ purple_smiley_new(PurpleStoredImage *img, const char *shortcut)
if (!smiley)
return NULL;
- g_object_set(G_OBJECT(smiley), PROP_IMGSTORE_S, img, NULL);
+ g_object_set(G_OBJECT(smiley), "image", img, NULL);
return smiley;
}
@@ -769,7 +766,7 @@ purple_smiley_set_shortcut(PurpleSmiley *smiley, const char *shortcut)
g_free(priv->shortcut);
priv->shortcut = g_strdup(shortcut);
- g_object_notify(G_OBJECT(smiley), PROP_SHORTCUT_S);
+ g_object_notify(G_OBJECT(smiley), "shortcut");
purple_smileys_save();