Package: im-config

Forwarding https://launchpad.net/bugs/1450147

The attached patch, which moves the code before the "sanity check",
fixes it.

-- 
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj
--- a/im-config	2015-03-21 17:10:09.000000000 +0100
+++ b/im-config	2015-04-29 22:44:50.514407629 +0200
@@ -101,6 +101,22 @@
     shift
 done
 #############################################################
+# Check number of installed input methods (10-89)
+IM_CONFIG_NUMBER=0
+IM_CONFIG_AVAIL=""
+for IM_CONFIG_PATH in $IM_CONFIG_DATA/[12345678][0123456789]_*.rc ; do
+    IM_CONFIG_NAME=$(name_im $IM_CONFIG_PATH)
+    if ( $IM_CONFIG_ALL || avail_menu $IM_CONFIG_NAME ) && [ $IM_CONFIG_NAME != "none" ]; then
+        IM_CONFIG_NUMBER="$(($IM_CONFIG_NUMBER + 1))"
+        IM_CONFIG_AVAIL="$IM_CONFIG_AVAIL $IM_CONFIG_NAME"
+    fi
+done
+#############################################################
+if $IM_CONFIG_LIST ; then
+echo "$IM_CONFIG_AVAIL"
+exit
+fi
+#############################################################
 # Sanity check
 #############################################################
 if [ $IM_CONFIG_DIALOG = "X" ]; then
@@ -127,22 +143,6 @@
     fi
 fi
 #############################################################
-# Check number of installed input methods (10-89)
-IM_CONFIG_NUMBER=0
-IM_CONFIG_AVAIL=""
-for IM_CONFIG_PATH in $IM_CONFIG_DATA/[12345678][0123456789]_*.rc ; do
-    IM_CONFIG_NAME=$(name_im $IM_CONFIG_PATH)
-    if ( $IM_CONFIG_ALL || avail_menu $IM_CONFIG_NAME ) && [ $IM_CONFIG_NAME != "none" ]; then
-        IM_CONFIG_NUMBER="$(($IM_CONFIG_NUMBER + 1))"
-        IM_CONFIG_AVAIL="$IM_CONFIG_AVAIL $IM_CONFIG_NAME"
-    fi
-done
-#############################################################
-if $IM_CONFIG_LIST ; then
-echo "$IM_CONFIG_AVAIL"
-exit
-fi
-#############################################################
 # Do not run im-config if "$IM_CONFIG_ACTIVE" = "custom"
 #############################################################
 if [ "$IM_CONFIG_ACTIVE" = "custom" ]; then

Reply via email to