~ubuntu-branches/ubuntu/natty/java-gnome/natty

« back to all changes in this revision

Viewing changes to src/bindings/org/gnome/glib/Glib.java

  • Committer: Bazaar Package Importer
  • Author(s): Guillaume Mazoyer
  • Date: 2011-02-18 17:46:52 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20110218174652-mk7ajkt790es0jwr
Tags: 4.0.19-0ubuntu1
* New upstream release. (LP: #596252) (Forwarded: Debian: 588943)
* debian/control
  - Update dependencies version according to the upstream configure file.
  - Update Standards-Version to 3.9.1.
  - Sync JNI and JAR packages.
* debian/copyright
  - Update copyright to 2011.
* debian/patches/01_take_screenshots.diff
  - Fix patch to make doc screenshots works.
* debian/patches/02_javadoc_workaround.patch
  - Fix javadoc generation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 * 
38
38
 * @author Andrew Cowie
39
39
 * @author Serkan Kaba
 
40
 * @author Guillaume Mazoyer
40
41
 * @since 4.0.0
41
42
 * 
42
43
 * @see <a
200
201
    public static String[] getSystemConfigDirs() {
201
202
        return GlibMisc.getSystemConfigDirs();
202
203
    }
 
204
 
 
205
    /**
 
206
     * Format a size into a human readable String. This is useful when
 
207
     * representing file sizes and data transfer rates.
 
208
     * 
 
209
     * <p>
 
210
     * Sizes use the nearest prefix (KB, MB, GB). The prefix units are base 2
 
211
     * so 1 MB is 1024 * 1024 bytes.
 
212
     * 
 
213
     * <p>
 
214
     * Note that the returned String depends on the localization. E.g. if the
 
215
     * system is configured to use French, the formatted size will use French
 
216
     * size prefix.
 
217
     * 
 
218
     * @since 4.0.16
 
219
     */
 
220
    public static String formatSizeForDisplay(long size) {
 
221
        return GlibMisc.formatSizeForDisplay(size);
 
222
    }
 
223
 
 
224
    /**
 
225
     * Perform basic escaping on a String so that it can be safely passed to
 
226
     * XML.
 
227
     * 
 
228
     * <p>
 
229
     * This will escape <code>&amp;</code>, <code>&gt;</code>,
 
230
     * <code>&lt;</code>, etc which is necessary when passing arbitrary input
 
231
     * to methods which use Pango Markup such as Labels with markup enabled
 
232
     * via {@link org.gnome.gtk.Label#setUseMarkup(boolean) setUseMarkup()}
 
233
     * and directly with CellRendererText's
 
234
     * {@link org.gnome.gtk.CellRendererText#setMarkup(org.gnome.gtk.DataColumnString)
 
235
     * setMarkup()} or Layout's
 
236
     * {@link org.gnome.pango.Layout#setMarkup(String) setMarkup()}
 
237
     * 
 
238
     * @since 4.0.17
 
239
     */
 
240
    public static String markupEscapeText(String str) {
 
241
        return GlibMisc.markupEscapeText(str, -1);
 
242
    }
203
243
}