org.guifications.plugins.autoprofile_merge: 954b1a1924b06e5496ad2b054a9f6ef16a08d7d4
rekkanoryo at guifications.org
rekkanoryo at guifications.org
Sun Mar 23 21:30:14 CDT 2008
-----------------------------------------------------------------
Revision: 954b1a1924b06e5496ad2b054a9f6ef16a08d7d4
Ancestor: 868552d51959ea524aa6ede690f9cdc0aeaa21bf
Author: rekkanoryo at guifications.org
Date: 2008-03-24T01:35:19
Branch: org.guifications.plugins.autoprofile_merge
Modified files:
autoprofile/widget.c
ChangeLog:
Hopefully kill the last of the warnings I'm sure about being able to kill.
-----------------------------------------------------------------
This revision's diffstat output:
widget.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
-------------- next part --------------
============================================================
--- autoprofile/widget.c e9ed146c62d1a99f3461466ea447bd7ca9f70b34
+++ autoprofile/widget.c 99bbc7096a743d535329fc1f89822904acb1d1bd
@@ -21,9 +21,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
*--------------------------------------------------------------------------*/
+#include "../common/pp_internal.h"
+
#include "widget.h"
#include "utility.h"
+#include <string.h>
+
static GStaticMutex widget_mutex = G_STATIC_MUTEX_INIT;
static GList *widgets = NULL;
static GHashTable *identifiers = NULL;
@@ -52,7 +56,7 @@ void ap_widget_init () {
ap_widget_init_default_statuses ();
- node = g_list_append (NULL, strdup ("42"));
+ node = g_list_append (NULL, g_strdup ("42"));
purple_prefs_add_string_list (widget_pref, node);
free_string_list (node);
}
@@ -66,7 +70,7 @@ static gchar *strip_whitespace (const gc
}
end = NULL;
- search = result = strdup (text);
+ search = result = g_strdup (text);
while (*search) {
if (end == NULL && isspace (*search)) {
@@ -191,8 +195,8 @@ void ap_widget_start () {
}
w = (struct widget *) malloc (sizeof (struct widget));
- w->alias = strdup (identifier);
- w->wid = strdup ((gchar *) widget_identifiers->data);
+ w->alias = g_strdup (identifier);
+ w->wid = g_strdup ((gchar *) widget_identifiers->data);
w->component = comp;
w->data = g_hash_table_new (NULL, NULL);
@@ -307,13 +311,13 @@ struct widget *ap_widget_create (struct
alias = NULL; // Stupid compiler
if (w == NULL) {
- alias = strdup (comp->identifier);
+ alias = g_strdup (comp->identifier);
} else {
for (i = 1; i < 10000; i++) {
g_string_printf (s, "%s%d", comp->identifier, i);
w = ap_widget_find_internal (s->str);
if (w == NULL) {
- alias = strdup (s->str);
+ alias = g_strdup (s->str);
break;
}
}
@@ -343,7 +347,7 @@ struct widget *ap_widget_create (struct
}
if (node == NULL) {
- identifier = strdup (s->str);
+ identifier = g_strdup (s->str);
break;
}
}
@@ -453,7 +457,7 @@ gboolean ap_widget_rename (struct widget
}
orig_alias = orig->alias;
- orig->alias = strdup (new_alias);
+ orig->alias = g_strdup (new_alias);
s = g_string_new ("");
More information about the Plugins-commits
mailing list