[geany/geany-plugins] 758a0c: gproject: use SETPTR() instead of deprecated setptr()

Jiří Techet git-noreply at xxxxx
Wed Oct 15 08:39:37 UTC 2014


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Wed, 15 Oct 2014 08:39:37 UTC
Commit:      758a0c47c73b0bf26eb91488ed1b16a84f8d29fe
             https://github.com/geany/geany-plugins/commit/758a0c47c73b0bf26eb91488ed1b16a84f8d29fe

Log Message:
-----------
gproject: use SETPTR() instead of deprecated setptr()


Modified Paths:
--------------
    gproject/src/gproject-menu.c
    gproject/src/gproject-project.c
    gproject/src/gproject-sidebar.c
    gproject/src/gproject-utils.c

Modified: gproject/src/gproject-menu.c
18 lines changed, 9 insertions(+), 9 deletions(-)
===================================================================
@@ -58,8 +58,8 @@ static gboolean try_swap_header_source(gchar *file_name, gboolean is_header, GSL
 	gboolean found = FALSE;
 
 	name_pattern = g_path_get_basename(file_name);
-	setptr(name_pattern, utils_remove_ext_from_filename(name_pattern));
-	setptr(name_pattern, g_strconcat(name_pattern, ".*", NULL));
+	SETPTR(name_pattern, utils_remove_ext_from_filename(name_pattern));
+	SETPTR(name_pattern, g_strconcat(name_pattern, ".*", NULL));
 	pattern = g_pattern_spec_new(name_pattern);
 	g_free(name_pattern);
 
@@ -140,7 +140,7 @@ static void on_swap_header_source(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_U
 			gchar *doc_dir;
 
 			doc_dir = g_path_get_dirname(doc->file_name);
-			setptr(doc_dir, utils_get_locale_from_utf8(doc_dir));
+			SETPTR(doc_dir, utils_get_locale_from_utf8(doc_dir));
 
 			list = utils_get_file_list(doc_dir, NULL, NULL);
 			for (elem = list; elem != NULL; elem = g_slist_next(elem))
@@ -148,8 +148,8 @@ static void on_swap_header_source(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_U
 				gchar *full_name;
 
 				full_name = g_build_filename(doc_dir, elem->data, NULL);
-				setptr(full_name, utils_get_utf8_from_locale(full_name));
-				setptr(elem->data, full_name);
+				SETPTR(full_name, utils_get_utf8_from_locale(full_name));
+				SETPTR(elem->data, full_name);
 			}
 			swapped = try_swap_header_source(doc->file_name, is_header, list, header_patterns, source_patterns);
 			g_slist_foreach(list, (GFunc) g_free, NULL);
@@ -241,7 +241,7 @@ static void on_open_selected_file(GtkMenuItem *menuitem, gpointer user_data)
 	if (!sel)
 		return;
 
-	setptr(sel, utils_get_locale_from_utf8(sel));
+	SETPTR(sel, utils_get_locale_from_utf8(sel));
 
 	if (g_path_is_absolute(sel))
 	{
@@ -258,7 +258,7 @@ static void on_open_selected_file(GtkMenuItem *menuitem, gpointer user_data)
 		if (doc->file_name)
 		{
 			path = g_path_get_dirname(doc->file_name);
-			setptr(path, utils_get_locale_from_utf8(path));
+			SETPTR(path, utils_get_locale_from_utf8(path));
 		}
 
 		if (!path)
@@ -285,7 +285,7 @@ static void on_open_selected_file(GtkMenuItem *menuitem, gpointer user_data)
 		{
 			if (g_strcmp0(pathv[i], "..") == 0)
 				break;
-			setptr(path, g_build_filename(G_DIR_SEPARATOR_S, pathv[i], path, NULL));
+			SETPTR(path, g_build_filename(G_DIR_SEPARATOR_S, pathv[i], path, NULL));
 		}
 		g_strfreev(pathv);
 
@@ -299,7 +299,7 @@ static void on_open_selected_file(GtkMenuItem *menuitem, gpointer user_data)
 			if (data.found_path)
 			{
 				filename = g_strdup(data.found_path);
-				setptr(filename, utils_get_locale_from_utf8(filename));
+				SETPTR(filename, utils_get_locale_from_utf8(filename));
 				if (!g_file_test(filename, G_FILE_TEST_EXISTS))
 				{
 					g_free(filename);


Modified: gproject/src/gproject-project.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -251,7 +251,7 @@ void gprj_project_rescan(void)
 		path = tm_get_real_path(elem->data);
 		if (path)
 		{
-			setptr(path, utils_get_utf8_from_locale(path));
+			SETPTR(path, utils_get_utf8_from_locale(path));
 			g_hash_table_insert(g_prj->file_tag_table, path, obj);
 		}
 	}


Modified: gproject/src/gproject-sidebar.c
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -184,17 +184,17 @@ static gchar *build_path(GtkTreeIter *iter)
 		if (path == NULL)
 			path = g_strdup(name);
 		else
-			setptr(path, g_build_filename(name, path, NULL));
+			SETPTR(path, g_build_filename(name, path, NULL));
 		g_free(name);
 
 		node = parent;
 	}
 
 	gtk_tree_model_get(model, &node, FILEVIEW_COLUMN_NAME, &name, -1);
-	setptr(path, g_build_filename(name, path, NULL));
+	SETPTR(path, g_build_filename(name, path, NULL));
 	g_free(name);
 
-	setptr(path, g_build_filename(geany_data->app->project->base_path, path, NULL));
+	SETPTR(path, g_build_filename(geany_data->app->project->base_path, path, NULL));
 
 	return path;
 }
@@ -255,7 +255,7 @@ static void find_file_recursive(GtkTreeIter *iter, gboolean case_sensitive, gboo
 			name = g_strdup(name);
 
 		if (!case_sensitive)
-			setptr(name, g_utf8_strdown(name, -1));
+			SETPTR(name, g_utf8_strdown(name, -1));
 
 		if (g_pattern_match_string(pattern, name))
 		{
@@ -286,7 +286,7 @@ static void find_file(GtkTreeIter *iter)
 		GPatternSpec *pattern;
 
 		if (!case_sensitive)
-			setptr(pattern_str, g_utf8_strdown(pattern_str, -1));
+			SETPTR(pattern_str, g_utf8_strdown(pattern_str, -1));
 
 		pattern = g_pattern_spec_new(pattern_str);
 


Modified: gproject/src/gproject-utils.c
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -53,13 +53,13 @@ static gchar *relpath(const gchar *origin_dir, const gchar *dest_dir)
 	ret = g_strdup("");
 
 	for (j = i; originv[j] != NULL; j++)
-		setptr(ret, g_build_filename(ret, "..", NULL));
+		SETPTR(ret, g_build_filename(ret, "..", NULL));
 
 	for (j = i; destv[j] != NULL; j++)
-		setptr(ret, g_build_filename(ret, destv[j], NULL));
+		SETPTR(ret, g_build_filename(ret, destv[j], NULL));
 
 	if (strlen(ret) == 0)
-		setptr(ret, g_strdup("./"));
+		SETPTR(ret, g_strdup("./"));
 
 	g_free(origin);
 	g_free(dest);
@@ -84,11 +84,11 @@ gchar *get_file_relative_path(const gchar *origin_dir, const gchar *dest_file)
 
 		if (g_strcmp0(ret, "./") != 0)
 		{
-			setptr(ret, g_build_filename(ret, dest_basename, NULL));
+			SETPTR(ret, g_build_filename(ret, dest_basename, NULL));
 		}
 		else
 		{
-			setptr(ret, g_strdup(dest_basename));
+			SETPTR(ret, g_strdup(dest_basename));
 		}
 
 		g_free(dest_basename);



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list