14 Commits

Author SHA1 Message Date
  Michele Calgaro 66db2c8c4e
Added udisks2 support for unlocking/locking of encrypted disks. 1 month ago
  Michele Calgaro 33a28fdff3
Updated to latest mediamanager dcop interface. 1 month ago
  Michele Calgaro d006d58ed6
Added TQStringVariantMap to dcop known types. 1 month ago
  Michele Calgaro 37383578b1
Adjusted to use new TQStringVariantMap type. 1 month ago
  Michele Calgaro 39f184eb71
Reworked code for eject/mount/unmount operations to support new TDEStorageOpResult return type. 1 month ago
  Michele Calgaro e4ebe2b551
tdehw: code restructuring for tdestoragedevice. 2 months ago
  Michele Calgaro 7fcf24fa4e
Extended kcharset API with new utility function. 1 month ago
  TDE Gitea eb7df4e162 Reset submodule main/tdelibs/cmake to latest HEAD 1 month ago
  Michele Calgaro 79fb6ff464
Added udisks2 support for unlocking/locking of encrypted disks. 1 month ago
  Michele Calgaro 13561ba6a3
Updated to latest mediamanager dcop interface. 1 month ago
  Michele Calgaro 6e2110f6b3
Added TQStringVariantMap to dcop known types. 1 month ago
  Michele Calgaro b559ae3278
Adjusted to use new TQStringVariantMap type. 1 month ago
  Michele Calgaro b1abfc0e7e
Reworked code for eject/mount/unmount operations to support new TDEStorageOpResult return type. 1 month ago
  Michele Calgaro a54c80ddb4
tdehw: code restructuring for tdestoragedevice. 2 months ago
3 changed files with 19 additions and 1 deletions
  1. 1
    1
      cmake
  2. 11
    0
      tdecore/kcharsets.cpp
  3. 7
    0
      tdecore/kcharsets.h

+ 1
- 1
cmake

@@ -1 +1 @@
1
-Subproject commit 74654feb3bd49ba97c57e83ba2dd23c7c3d83c05
1
+Subproject commit 5121b9a41d671dbaf7350c349d246793d8d8a4e2

+ 11
- 0
tdecore/kcharsets.cpp View File

@@ -506,6 +506,17 @@ TQString KCharsets::encodingForName( const TQString &descriptiveName )
506 506
     return name.left(right).stripWhiteSpace();
507 507
 }
508 508
 
509
+TQString KCharsets::descriptiveNameForEncoding( const TQString &encodingName )
510
+{
511
+    for ( const LanguageForEncoding* pos = language_for_encoding; pos->index; ++pos ) {
512
+        if ( encodingName == TQString::fromLatin1( pos->index )) {
513
+            const TQString description = i18n( language_names[ pos->data ] );
514
+            return i18n("Descriptive Encoding Name", "%1 ( %2 )"). arg ( description ). arg( encodingName );
515
+        }
516
+    }
517
+    return TQString::null;
518
+}
519
+
509 520
 TQStringList KCharsets::descriptiveEncodingNames()
510 521
 {
511 522
     // As we are sorting, we can directly read the array language_for_encoding

+ 7
- 0
tdecore/kcharsets.h View File

@@ -135,6 +135,13 @@ public:
135 135
      */
136 136
     TQString encodingForName( const TQString &descriptiveName );
137 137
 
138
+    /**
139
+     * Returns the descriptive encoding name for an encoding name.
140
+     * @param encodingName the name of the encoding
141
+     * @return the descriptive name for the encoding
142
+     */
143
+    TQString descriptiveNameForEncoding( const TQString &encodingName );
144
+
138 145
 private:
139 146
     KCharsetsPrivate *d;
140 147
 };

Loading…
Cancel
Save