~ubuntu-branches/ubuntu/saucy/gparted/saucy

« back to all changes in this revision

Viewing changes to compose/ucompose.hpp

  • Committer: Package Import Robot
  • Author(s): Anibal Monsalve Salazar
  • Date: 2011-11-13 09:45:30 UTC
  • mfrom: (6.3.18)
  • Revision ID: package-import@ubuntu.com-20111113094530-bpv6kjk4rwozc1jf
Tags: 0.10.0-1
* New upstream release

  GParted 0.10.0  (2011-11-01)

  * Merge overlapping operations
  * Add ability to resize btrfs file systems
  * Add detection of exfat file systems

  GParted 0.9.1   (2011-09-19)

  * Fix NTFS partition resize fail problem
  * Fix some compiler warnings

  GParted 0.9.0   (2011-07-18)

  * Fix size off by one sector with unrecognized disk label
  * Fix GParted crashes with assertion (head_size <= 63)
    - Requires libparted-2.4 or higher
    - LP: #545911

* Fix out-of-date-standards-version
* Fix debian-rules-missing-recommended-target

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * Uses Glib::ustring instead of std::string which doesn't work with
4
4
 * Gtkmm due to character encoding troubles with stringstreams.
5
5
 *
6
 
 * Version 1.0.4.
 
6
 * Version 1.0.5.
7
7
 *
8
 
 * Copyright (c) 2002, 03, 04 Ole Laursen <olau@hardworking.dk>.
 
8
 * Copyright (c) 2002, 03, 04, 07 Ole Laursen <olau@hardworking.dk>.
9
9
 *
10
10
 * This library is free software; you can redistribute it and/or
11
11
 * modify it under the terms of the GNU Lesser General Public License
28
28
//
29
29
//   String::ucompose("This is a %1x%2 matrix.", rows, cols);
30
30
//
31
 
// See http://www.cs.aau.dk/~olau/compose/ or the included
 
31
// See http://people.iola.dk/olau/compose/ or the included
32
32
// README.compose for more details.
33
33
//
34
34
 
124
124
    os << obj;
125
125
 
126
126
    std::wstring str = os.str();
127
 
   
 
127
    
128
128
    return Glib::convert(std::string(reinterpret_cast<const char *>(str.data()),
129
129
                                     str.size() * sizeof(wchar_t)),
130
130
                         "UTF-8", "WCHAR_T");
151
151
  {
152
152
    return obj;
153
153
  }
 
154
 
 
155
  template <>
 
156
  inline std::string
 
157
  Composition::stringify<char *>(char *obj)
 
158
  {
 
159
    return obj;
 
160
  }
154
161
  
155
162
  // implementation of class Composition
156
163
  template <typename T>
157
164
  inline Composition &Composition::arg(const T &obj)
158
165
  {
159
166
    Glib::ustring rep = stringify(obj);
160
 
  
 
167
    
161
168
    if (!rep.empty()) {         // manipulators don't produce output
162
169
      for (specification_map::const_iterator i = specs.lower_bound(arg_no),
163
170
             end = specs.upper_bound(arg_no); i != end; ++i) {
179
186
    : arg_no(1)
180
187
  {
181
188
#if __GNUC__ >= 3
182
 
          //see #157871
183
 
        //os.imbue(std::locale("")); // use the user's locale for the stream
 
189
    os.imbue(std::locale("")); // use the user's locale for the stream
184
190
#endif
185
191
    std::string::size_type b = 0, i = 0;
186
192