[geany/geany-plugins] 6fce8d: Addons: Replace NZV-makro with EMPTY-makro

Frank Lanitz git-noreply at xxxxx
Sun Mar 23 10:24:10 UTC 2014


Branch:      refs/heads/master
Author:      Frank Lanitz <frank at frank.uvena.de>
Committer:   Frank Lanitz <frank at frank.uvena.de>
Date:        Sun, 23 Mar 2014 10:24:10 UTC
Commit:      6fce8d81fc9e18f0ddda1acf96409362956dbc71
             https://github.com/geany/geany-plugins/commit/6fce8d81fc9e18f0ddda1acf96409362956dbc71

Log Message:
-----------
Addons: Replace NZV-makro with EMPTY-makro


Modified Paths:
--------------
    addons/src/addons.c
    addons/src/ao_bookmarklist.c
    addons/src/ao_openuri.c
    addons/src/ao_tasks.c
    addons/src/ao_xmltagging.c

Modified: addons/src/addons.c
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -504,7 +504,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
 		_("Whether to show the tasks of all open documents in the list or only those of the current document."));
 
 	entry_tasks_tokens = gtk_entry_new();
-	if (NZV(ao_info->tasks_token_list))
+	if (!EMPTY(ao_info->tasks_token_list))
 		gtk_entry_set_text(GTK_ENTRY(entry_tasks_tokens), ao_info->tasks_token_list);
 	ui_entry_add_clear_icon(GTK_ENTRY(entry_tasks_tokens));
 	ui_widget_set_tooltip_text(entry_tasks_tokens,


Modified: addons/src/ao_bookmarklist.c
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -178,7 +178,7 @@ static void add_line(AoBookmarkList *bm, ScintillaObject *sci, gint line_nr)
 	AoBookmarkListPrivate *priv = AO_BOOKMARK_LIST_GET_PRIVATE(bm);
 
 	line = g_strstrip(sci_get_line(sci, line_nr));
-	if (! NZV(line))
+	if (EMPTY(line))
 		line = g_strdup(_("(Empty Line)"));
 	tooltip = g_markup_escape_text(line, -1);
 


Modified: addons/src/ao_openuri.c
4 files changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -129,7 +129,7 @@ static void ao_menu_open_activate_cb(GtkMenuItem *item, AoOpenUri *self)
 {
 	AoOpenUriPrivate *priv = AO_OPEN_URI_GET_PRIVATE(self);
 
-	if (NZV(priv->uri))
+	if (!EMPTY(priv->uri))
 		utils_open_browser(priv->uri);
 
 }
@@ -139,7 +139,7 @@ static void ao_menu_copy_activate_cb(GtkMenuItem *item, AoOpenUri *self)
 {
 	AoOpenUriPrivate *priv = AO_OPEN_URI_GET_PRIVATE(self);
 
-	if (NZV(priv->uri))
+	if (!EMPTY(priv->uri))
 		gtk_clipboard_set_text(gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE)), priv->uri, -1);
 }
 


Modified: addons/src/ao_tasks.c
6 files changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -127,7 +127,7 @@ static void ao_tasks_set_property(GObject *object, guint prop_id,
 		case PROP_TOKENS:
 		{
 			const gchar *t = g_value_get_string(value);
-			if (! NZV(t))
+			if (EMPTY(t))
 				t = "TODO;FIXME"; /* fallback */
 			g_strfreev(priv->tokens);
 			priv->tokens = g_strsplit(t, ";", -1);
@@ -573,14 +573,14 @@ static void update_tasks_for_doc(AoTasks *t, GeanyDocument *doc)
 			token = priv->tokens;
 			while (*token != NULL)
 			{
-				if (NZV(*token) && (task_start = strstr(line_buf, *token)) != NULL)
+				if (!EMPTY(*token) && (task_start = strstr(line_buf, *token)) != NULL)
 				{
 					/* skip the token and additional whitespace */
 					task_start += strlen(*token);
 					while (*task_start == ' ' || *task_start == ':')
 						task_start++;
 					/* reset task_start in case there is no text following */
-					if (! NZV(task_start))
+					if (EMPTY(task_start))
 						task_start = line_buf;
 					/* create the task */
 					create_task(t, doc, line, *token, line_buf, task_start, display_name);


Modified: addons/src/ao_xmltagging.c
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -93,7 +93,7 @@ void ao_xmltagging(void)
 			/* Getting the tag */
 			tag = g_string_new(gtk_entry_get_text(GTK_ENTRY(textbox)));
 
-			if (tag->len > 0)
+			if (!EMPTY(tag) && tag->len > 0)
 			{
 				gsize end = 0;
 				gchar *end_tag;



--------------
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