[gnome-commander] Get rid of a bunch of g_strdup_printf("%s%s") in favor of g_strconcat()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Get rid of a bunch of g_strdup_printf("%s%s") in favor of g_strconcat()
- Date: Mon, 7 Mar 2011 21:59:32 +0000 (UTC)
commit e13ed329f31cdab07223f402d71b925e511d6f6c
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Mon Mar 7 22:58:39 2011 +0100
Get rid of a bunch of g_strdup_printf("%s%s") in favor of g_strconcat()
src/gnome-cmd-data.cc | 4 ++--
src/gnome-cmd-dir-indicator.cc | 2 +-
src/gnome-cmd-file-list.cc | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 0eb96da..522e791 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -1006,8 +1006,8 @@ void GnomeCmdData::load()
{
gchar *xml_cfg_path = config_dir ? g_build_filename (config_dir, PACKAGE ".xml", NULL) : g_build_filename (g_get_home_dir (), "." PACKAGE, PACKAGE ".xml", NULL);
- gchar *document_icon_dir = g_strdup_printf ("%s/share/pixmaps/document-icons/", GNOME_PREFIX);
- gchar *theme_icon_dir = g_strdup_printf ("%s/mime-icons", PIXMAPS_DIR);
+ gchar *document_icon_dir = g_strconcat (GNOME_PREFIX, "/share/pixmaps/document-icons/", NULL);
+ gchar *theme_icon_dir = g_strconcat (PIXMAPS_DIR, "/mime-icons", NULL);
priv = g_new0 (Private, 1);
diff --git a/src/gnome-cmd-dir-indicator.cc b/src/gnome-cmd-dir-indicator.cc
index c267a0a..9680e5c 100644
--- a/src/gnome-cmd-dir-indicator.cc
+++ b/src/gnome-cmd-dir-indicator.cc
@@ -138,7 +138,7 @@ inline void update_markup (GnomeCmdDirIndicator *indicator, gint i)
gchar *mt = get_mono_text (t);
gchar *ms = get_bold_mono_text (s);
- m = g_strdup_printf ("%s%s", ms, mt);
+ m = g_strconcat (ms, mt, NULL);
g_free (t);
g_free (mt);
g_free (ms);
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index eed5551..7611db6 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -700,7 +700,7 @@ static char *build_selected_file_list (GnomeCmdFileList *fl, int *file_list_len)
if (!fn)
fn = f->get_uri_str();
- uri_str = g_strdup_printf ("%s\r\n", fn);
+ uri_str = g_strconcat (fn, "\r\n", NULL);
uri_str_list = g_list_append (uri_str_list, uri_str);
total_len += strlen (uri_str);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]