/soc/2013/ankitkv/gobjectification: 995be3523e7c: Removed unnece...

Ankit Vani a at nevitus.org
Sun Nov 17 05:27:33 EST 2013


Changeset: 995be3523e7c26f273d3776e965c160b74c2cb09
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-11-17 15:27 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/995be3523e7c

Description:

Removed unnecessary static function _set_variant

diffstat:

 pidgin/gtkconv-theme.c |  45 +++++++++++++++++++--------------------------
 1 files changed, 19 insertions(+), 26 deletions(-)

diffs (69 lines):

diff --git a/pidgin/gtkconv-theme.c b/pidgin/gtkconv-theme.c
--- a/pidgin/gtkconv-theme.c
+++ b/pidgin/gtkconv-theme.c
@@ -394,30 +394,6 @@ get_outgoing_next_context_html(PidginCon
 	return priv->outgoing_next_context_html;
 }
 
-static void
-_set_variant(PidginConvTheme *theme, const char *variant)
-{
-	PidginConvThemePrivate *priv;
-	const GValue *val;
-	char *prefname;
-
-	g_return_if_fail(theme != NULL);
-	g_return_if_fail(variant != NULL);
-
-	priv = PIDGIN_CONV_THEME_GET_PRIVATE(theme);
-
-	g_free(priv->variant);
-	priv->variant = g_strdup(variant);
-
-	val = get_key(priv, "CFBundleIdentifier", FALSE);
-	prefname = g_strdup_printf(PIDGIN_PREFS_ROOT "/conversations/themes/%s/variant",
-	                           g_value_get_string(val));
-	purple_prefs_set_string(prefname, variant);
-	g_free(prefname);
-
-	g_object_notify(G_OBJECT(theme), "variant");
-}
-
 /******************************************************************************
  * GObject Stuff
  *****************************************************************************/
@@ -455,7 +431,7 @@ pidgin_conv_theme_set_property(GObject *
 			break;
 
 		case PROP_VARIANT:
-			_set_variant(theme, g_value_get_string(value));
+			pidgin_conversation_theme_set_variant(theme, g_value_get_string(value));
 			break;
 
 		default:
@@ -712,7 +688,24 @@ pidgin_conversation_theme_get_variant(Pi
 void
 pidgin_conversation_theme_set_variant(PidginConvTheme *theme, const char *variant)
 {
-	_set_variant(theme, variant);
+	PidginConvThemePrivate *priv;
+	const GValue *val;
+	char *prefname;
+
+	g_return_if_fail(theme != NULL);
+	g_return_if_fail(variant != NULL);
+
+	priv = PIDGIN_CONV_THEME_GET_PRIVATE(theme);
+
+	g_free(priv->variant);
+	priv->variant = g_strdup(variant);
+
+	val = get_key(priv, "CFBundleIdentifier", FALSE);
+	prefname = g_strdup_printf(PIDGIN_PREFS_ROOT "/conversations/themes/%s/variant",
+	                           g_value_get_string(val));
+	purple_prefs_set_string(prefname, variant);
+	g_free(prefname);
+
 #if GLIB_CHECK_VERSION(2,26,0)
 	g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_VARIANT]);
 #else



More information about the Commits mailing list