[Xfce4-commits] <xfce4-mm:master> Removed wrapping functions for string handling routines.
Jens Luedicke
noreply at xfce.org
Mon Jan 17 22:30:02 CET 2011
Updating branch refs/heads/master
to d077d6212cb7e3f86c7373571eb613c5836fc82d (commit)
from 706c0f5bcb084f1d19df5be52fe01573c9f32ccd (commit)
commit d077d6212cb7e3f86c7373571eb613c5836fc82d
Author: Jens Luedicke <perldude at xfce.org>
Date: Mon Jan 17 22:28:09 2011 +0100
Removed wrapping functions for string handling routines.
Rationale: there are better string handling classes/functions in C++ available.
libxfce4util-mm/CMakeLists.txt | 3 +-
libxfce4util-mm/misc-utils.cpp | 15 ----------
libxfce4util-mm/misc-utils.h | 3 --
libxfce4util-mm/utf8-utils.cpp | 61 ----------------------------------------
libxfce4util-mm/utf8-utils.h | 39 -------------------------
5 files changed, 1 insertions(+), 120 deletions(-)
diff --git a/libxfce4util-mm/CMakeLists.txt b/libxfce4util-mm/CMakeLists.txt
index e0d3217..5aab8fc 100644
--- a/libxfce4util-mm/CMakeLists.txt
+++ b/libxfce4util-mm/CMakeLists.txt
@@ -6,7 +6,7 @@ set (libxfce4util-mm_VERSION_MINOR 1)
include_directories(${xfce4-mm_SOURCE_DIR}/libxfce4util-mm)
-add_library(xfce4util-mm SHARED file-utils.cpp kiosk.cpp misc-utils.cpp rc.cpp resource.cpp utf8-utils.cpp)
+add_library(xfce4util-mm SHARED file-utils.cpp kiosk.cpp misc-utils.cpp rc.cpp resource.cpp)
target_link_libraries(xfce4util-mm ${GLIB2MM_LDFLAGS} ${GTK2MM_LDFLAGS} ${LIBXFCE4UTIL_LDFLAGS})
@@ -18,7 +18,6 @@ install (FILES "${libxfce4util-mm_SOURCE_DIR}/misc-utils.h" DESTINATION "include
install (FILES "${libxfce4util-mm_SOURCE_DIR}/rc.h" DESTINATION "include/libxfce4util-mm")
install (FILES "${libxfce4util-mm_SOURCE_DIR}/resource-enum.h" DESTINATION "include/libxfce4util-mm")
install (FILES "${libxfce4util-mm_SOURCE_DIR}/resource.h" DESTINATION "include/libxfce4util-mm")
-install (FILES "${libxfce4util-mm_SOURCE_DIR}/utf8-utils.h" DESTINATION "include/libxfce4util-mm")
configure_file(${libxfce4util-mm_SOURCE_DIR}/libxfce4util-mm-1.0.pc.in ${libxfce4util-mm_BINARY_DIR}/libxfce4util-mm-1.0.pc @ONLY)
install(FILES ${libxfce4util-mm_BINARY_DIR}/libxfce4util-mm-1.0.pc DESTINATION lib/pkgconfig)
diff --git a/libxfce4util-mm/misc-utils.cpp b/libxfce4util-mm/misc-utils.cpp
index 785084c..5ec2eec 100644
--- a/libxfce4util-mm/misc-utils.cpp
+++ b/libxfce4util-mm/misc-utils.cpp
@@ -54,21 +54,6 @@ const Glib::ustring get_hostname()
return Glib::ustring(result);
}
-Glib::ustring strjoin(const Glib::ustring &separator,
- Glib::StringArrayHandle &strings)
-{
- gchar **strs = const_cast<gchar**>(strings.data());
- gint elems = strings.size();
-
- gchar *result = xfce_strjoin(separator.c_str(), strs, elems);
-
- Glib::ustring joined(result);
-
- g_free(result);
-
- return joined;
-}
-
gint putenv(const Glib::ustring &string)
{
return xfce_putenv(string.c_str());
diff --git a/libxfce4util-mm/misc-utils.h b/libxfce4util-mm/misc-utils.h
index f06e3e4..d4472ff 100644
--- a/libxfce4util-mm/misc-utils.h
+++ b/libxfce4util-mm/misc-utils.h
@@ -35,9 +35,6 @@ const Glib::ustring get_homedir();
const Glib::ustring get_userdir();
const Glib::ustring get_hostname();
-Glib::ustring strjoin(const Glib::ustring &separator,
- Glib::StringArrayHandle strings);
-
gint putenv(const Glib::ustring &string);
gint setenv(const Glib::ustring &name,
diff --git a/libxfce4util-mm/utf8-utils.cpp b/libxfce4util-mm/utf8-utils.cpp
deleted file mode 100644
index 4619516..0000000
--- a/libxfce4util-mm/utf8-utils.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/** \file utf8-utils.cpp
- * \author Jens Luedicke <jens.luedicke at gmail.com>
- * \date 2009
- *
- * libxfce4util-mm - C++ wrapper library for libxfce4util.
- *
- * Copyright (c) 2009 Jens Luedicke <jens.luedicke at gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "utf8-utils.h"
-
-#include <libxfce4util/libxfce4util.h>
-
-namespace Xfce4 {
-namespace Util {
-
-Glib::ustring remove_controls(Glib::ustring &str, gssize max_len, const Glib::ustring &end)
-{
- gchar *result = xfce_utf8_remove_controls(const_cast<gchar*>(str.c_str()), max_len, end.c_str());
-
- Glib::ustring new_string;
-
- if (result != 0) {
- new_string = result;
- }
-
- return new_string;
-}
-
-Glib::ustring strndup(const Glib::ustring &src, gssize max_len)
-{
- gchar *result = xfce_utf8_strndup(src.c_str(), max_len);
-
- Glib::ustring new_string(result);
-
- g_free(result);
-
- return new_string;
-}
-
-}
-}
diff --git a/libxfce4util-mm/utf8-utils.h b/libxfce4util-mm/utf8-utils.h
deleted file mode 100644
index b1c7839..0000000
--- a/libxfce4util-mm/utf8-utils.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/** \file utf8-utils.h
- * \author Jens Luedicke <jens.luedicke at gmail.com>
- * \date 2009
- *
- * libxfce4util-mm - C++ wrapper library for libxfce4util.
- *
- * Copyright (c) 2009 Jens Luedicke <jens.luedicke at gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _XFCE_UTF8_UTILS_H_
-#define _XFCE_UTF8_UTILS_H_
-
-#include <glibmm/ustring.h>
-
-namespace Xfce4 {
-namespace Util {
-
-Glib::ustring remove_controls(Glib::ustring &str, gssize max_len, const Glib::ustring &end);
-Glib::ustring strndup(const Glib::ustring &src, gssize max_len);
-
-}
-}
-
-#endif /* _XFCE_UTF8_UTILS_H_ */
More information about the Xfce4-commits
mailing list