[Goodies-commits] r3232 - in xfce4-places-plugin/trunk: . panel-plugin
Diego Ongaro
ongardie at xfce.org
Sat Sep 15 01:12:10 CEST 2007
Author: ongardie
Date: 2007-09-14 23:12:10 +0000 (Fri, 14 Sep 2007)
New Revision: 3232
Modified:
xfce4-places-plugin/trunk/ChangeLog
xfce4-places-plugin/trunk/panel-plugin/cfg.c
xfce4-places-plugin/trunk/panel-plugin/places.c
xfce4-places-plugin/trunk/panel-plugin/view.c
Log:
2007-09-14 Diego Ongaro <ongardie at gmail.com>
* {cfg,view,places}.c: Replace strlen with checks against '\0'
Modified: xfce4-places-plugin/trunk/ChangeLog
===================================================================
--- xfce4-places-plugin/trunk/ChangeLog 2007-09-14 14:43:27 UTC (rev 3231)
+++ xfce4-places-plugin/trunk/ChangeLog 2007-09-14 23:12:10 UTC (rev 3232)
@@ -1,3 +1,7 @@
+2007-09-14 Diego Ongaro <ongardie at gmail.com>
+
+ * {cfg,view,places}.c: Replace strlen with checks against '\0'
+
2007-09-12 Diego Ongaro <ongardie at gmail.com>
* cfg.h: Don't define recent documents settings if compiled w/o.
Modified: xfce4-places-plugin/trunk/panel-plugin/cfg.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/cfg.c 2007-09-14 14:43:27 UTC (rev 3231)
+++ xfce4-places-plugin/trunk/panel-plugin/cfg.c 2007-09-14 23:12:10 UTC (rev 3232)
@@ -128,7 +128,7 @@
g_free(cfg->label);
cfg->label = (gchar*) xfce_rc_read_entry(rcfile, "label", NULL);
- if(cfg->label == NULL || strlen(cfg->label) == 0)
+ if(cfg->label == NULL || *cfg->label == '\0')
cfg->label = _("Places");
cfg->label = g_strdup(cfg->label);
@@ -217,7 +217,7 @@
entry_text = gtk_entry_get_text(GTK_ENTRY(label_entry));
new_text = g_strstrip(g_strdup(entry_text));
- if(old_text == NULL || (strcmp(old_text, new_text) && strlen(new_text))){
+ if(old_text == NULL || (strcmp(old_text, new_text) && *new_text != '\0')){
cfg->label = new_text;
if(old_text != NULL)
@@ -230,7 +230,7 @@
if(old_text == NULL)
cfg->label = g_strdup(_("Places"));
- if(old_text == NULL || !strlen(new_text)){
+ if(old_text == NULL || *new_text == '\0'){
gtk_entry_set_text(GTK_ENTRY(label_entry), cfg->label);
places_view_cfg_iface_update_button(cfg->view_iface);
}
Modified: xfce4-places-plugin/trunk/panel-plugin/places.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/places.c 2007-09-14 14:43:27 UTC (rev 3231)
+++ xfce4-places-plugin/trunk/panel-plugin/places.c 2007-09-14 23:12:10 UTC (rev 3232)
@@ -140,7 +140,7 @@
void
places_load_file(const gchar *path)
{
- if(path != NULL && strlen(path))
+ if(path != NULL && *path != '\0')
exo_url_show(path, NULL, NULL);
}
@@ -152,7 +152,7 @@
void
places_gui_exec(const gchar *cmd)
{
- if(cmd != NULL && strlen(cmd))
+ if(cmd != NULL && *cmd != '\0')
xfce_exec(cmd, FALSE, TRUE, NULL);
}
Modified: xfce4-places-plugin/trunk/panel-plugin/view.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/view.c 2007-09-14 14:43:27 UTC (rev 3231)
+++ xfce4-places-plugin/trunk/panel-plugin/view.c 2007-09-14 23:12:10 UTC (rev 3232)
@@ -627,15 +627,15 @@
/* Recent Documents */
#if USE_RECENT_DOCUMENTS
- if(pd->cfg->show_recent || (pd->cfg->search_cmd != NULL && strlen(pd->cfg->search_cmd))){
+ if(pd->cfg->show_recent || (pd->cfg->search_cmd != NULL && *pd->cfg->search_cmd != '\0')){
#else
- if(pd->cfg->search_cmd != NULL && strlen(pd->cfg->search_cmd)){
+ if(pd->cfg->search_cmd != NULL && *pd->cfg->search_cmd != '\0'){
#endif
gtk_menu_shell_append(GTK_MENU_SHELL(pd->menu),
gtk_separator_menu_item_new());
}
- if(pd->cfg->search_cmd != NULL && strlen(pd->cfg->search_cmd)){
+ if(pd->cfg->search_cmd != NULL && *pd->cfg->search_cmd != '\0'){
GtkWidget *search_item = gtk_image_menu_item_new_with_mnemonic(_("Search for Files"));
if(pd->cfg->show_icons){
GtkWidget *search_image = gtk_image_new_from_icon_name("system-search", GTK_ICON_SIZE_MENU);
More information about the Goodies-commits
mailing list