[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#327892: marked as done (cdebconf-gtk-udeb: improved bidi support)



Your message dated Thu, 15 Sep 2005 14:24:51 +0200
with message-id <43296813.9010904@tiscalinet.it>
and subject line Bug#327892: cdebconf-gtk-udeb: improved bidi support
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 12 Sep 2005 19:41:02 +0000
>From eugen@univ.kiev.ua Mon Sep 12 12:41:02 2005
Return-path: <eugen@univ.kiev.ua>
Received: from univ-gw.univ.kiev.ua (relay.univ.kiev.ua) [193.125.78.100] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1EEuAo-00088t-00; Mon, 12 Sep 2005 12:41:02 -0700
Received: from [10.25.0.243] (helo=intel4.icc.univ.kiev.ua)
	by relay.univ.kiev.ua with esmtp (Exim 4.41 (FreeBSD))
	id 1EEuCx-000KlK-H4; Mon, 12 Sep 2005 22:43:15 +0300
Received: from eugen by intel4.icc.univ.kiev.ua with local (Exim 4.52)
	id 1EEuAb-0000m4-Bg; Mon, 12 Sep 2005 22:40:49 +0300
Content-Type: multipart/mixed; boundary="===============1038286160=="
MIME-Version: 1.0
From: Eugeniy Meshcheryakov <eugen@univ.kiev.ua>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: cdebconf-gtk-udeb: improved bidi support
X-Mailer: reportbug 3.17
Date: Mon, 12 Sep 2005 22:40:49 +0300
Message-Id: <[🔎] E1EEuAb-0000m4-Bg@intel4.icc.univ.kiev.ua>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

This is a multi-part MIME message sent by reportbug.

--===============1038286160==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: cdebconf-gtk-udeb
Severity: normal
Tags: patch l10n

Attached patch allows to change default text direction depending on
current language (without patch it is only possible in installed system and
not in d-i because of use of gettext). Thi patch adds one more template
to translate (debconf/text-direction). It should be translated to RTL or
LTR depending on default text direction for language (translations are
not included in this patch).

Here is a screenshot for Hebrew that shows effect of this patch:
http://www.cluster.kiev.ua/eugen/cdebconf-gtk/hebrew-gtk+rtl.png

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13
Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8)

--===============1038286160==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cdebconf-gtk+bidi.diff"

Index: debian/cdebconf-gtk-udeb.templates
===================================================================
--- debian/cdebconf-gtk-udeb.templates	(revision 30510)
+++ debian/cdebconf-gtk-udeb.templates	(working copy)
@@ -13,3 +13,9 @@
 Template: debconf/button-no
 Type: text
 _Description: No
+
+Template: debconf/text-direction
+Type: text
+# This should be translated to RTL or LTR depending of default text
+# direction of given language
+_Description: LTR
Index: src/modules/frontend/gtk/gtk.c
===================================================================
--- src/modules/frontend/gtk/gtk.c	(revision 30510)
+++ src/modules/frontend/gtk/gtk.c	(working copy)
@@ -574,15 +574,21 @@
 return TRUE;
 }
 
-#if 0 /* currently unused */
 static const char *
 get_text(struct frontend *obj, const char *template, const char *fallback )
 {
     struct question *q = obj->qdb->methods.get(obj->qdb, template);
     return q ? q_get_description(q) : fallback;
 }
-#endif
 
+static GtkTextDirection get_text_direction(struct frontend *obj)
+{
+	const char *dirstr = get_text(obj, "debconf/text-direction", "LTR - default text direction");
+	if (dirstr[0] == 'R')
+		return GTK_TEXT_DIR_RTL;
+	return GTK_TEXT_DIR_LTR;
+}
+
 gboolean need_continue_button(struct frontend *obj)
 {
     if (obj->questions->next == NULL)
@@ -1490,7 +1496,9 @@
         gtk_widget_set_sensitive (data->button_prev, FALSE);
 
     gtk_widget_set_sensitive(GTK_WIDGET(data->button_next), TRUE);
-     
+    
+    gtk_widget_set_default_direction(get_text_direction(obj));
+
     gtk_widget_show_all(data->window);    
    
     gtk_main();

--===============1038286160==--

---------------------------------------
Received: (at 327892-done) by bugs.debian.org; 15 Sep 2005 12:20:19 +0000
>From fiandro@tiscalinet.it Thu Sep 15 05:20:19 2005
Return-path: <fiandro@tiscalinet.it>
Received: from ms002msg.fastwebnet.it [213.140.2.52] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1EFsix-0000ty-00; Thu, 15 Sep 2005 05:20:19 -0700
Received: from [41.255.136.50] (41.255.136.50) by ms002msg.fastwebnet.it (7.2.060.2)
        id 42F94AFC0020982E; Thu, 15 Sep 2005 14:19:35 +0200
Message-ID: <43296813.9010904@tiscalinet.it>
Date: Thu, 15 Sep 2005 14:24:51 +0200
From: Attilio Fiandrotti <fiandro@tiscalinet.it>
Reply-To: fiandro@tiscalinet.it
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050420 Debian/1.7.7-2
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Eugeniy Meshcheryakov <eugen@univ.kiev.ua>, 
 327892-done@bugs.debian.org
Subject: Re: Bug#327892: cdebconf-gtk-udeb: improved bidi support
References: <[🔎] E1EEuAb-0000m4-Bg@intel4.icc.univ.kiev.ua>
In-Reply-To: <[🔎] E1EEuAb-0000m4-Bg@intel4.icc.univ.kiev.ua>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Delivered-To: 327892-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
	HAS_PACKAGE autolearn=ham version=2.60-bugs.debian.org_2005_01_02

Package: cdebconf-gtk-udeb
Version: 0.84

Applied Eugeniy's patch to both debian/cdebconf-gtk-udeb.templates and 
src/modules/frontend/gtk/gtk.c in the SVN repo.

Attilio

Eugeniy Meshcheryakov wrote:
> Package: cdebconf-gtk-udeb
> Severity: normal
> Tags: patch l10n
> 
> Attached patch allows to change default text direction depending on
> current language (without patch it is only possible in installed system and
> not in d-i because of use of gettext). Thi patch adds one more template
> to translate (debconf/text-direction). It should be translated to RTL or
> LTR depending on default text direction for language (translations are
> not included in this patch).
> 
> Here is a screenshot for Hebrew that shows effect of this patch:
> http://www.cluster.kiev.ua/eugen/cdebconf-gtk/hebrew-gtk+rtl.png
> 
> -- System Information:
> Debian Release: testing/unstable
>   APT prefers unstable
>   APT policy: (990, 'unstable')
> Architecture: i386 (i686)
> Shell:  /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.13
> Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8)
> 
> 
> ------------------------------------------------------------------------
> 
> Index: debian/cdebconf-gtk-udeb.templates
> ===================================================================
> --- debian/cdebconf-gtk-udeb.templates	(revision 30510)
> +++ debian/cdebconf-gtk-udeb.templates	(working copy)
> @@ -13,3 +13,9 @@
>  Template: debconf/button-no
>  Type: text
>  _Description: No
> +
> +Template: debconf/text-direction
> +Type: text
> +# This should be translated to RTL or LTR depending of default text
> +# direction of given language
> +_Description: LTR
> Index: src/modules/frontend/gtk/gtk.c
> ===================================================================
> --- src/modules/frontend/gtk/gtk.c	(revision 30510)
> +++ src/modules/frontend/gtk/gtk.c	(working copy)
> @@ -574,15 +574,21 @@
>  return TRUE;
>  }
>  
> -#if 0 /* currently unused */
>  static const char *
>  get_text(struct frontend *obj, const char *template, const char *fallback )
>  {
>      struct question *q = obj->qdb->methods.get(obj->qdb, template);
>      return q ? q_get_description(q) : fallback;
>  }
> -#endif
>  
> +static GtkTextDirection get_text_direction(struct frontend *obj)
> +{
> +	const char *dirstr = get_text(obj, "debconf/text-direction", "LTR - default text direction");
> +	if (dirstr[0] == 'R')
> +		return GTK_TEXT_DIR_RTL;
> +	return GTK_TEXT_DIR_LTR;
> +}
> +
>  gboolean need_continue_button(struct frontend *obj)
>  {
>      if (obj->questions->next == NULL)
> @@ -1490,7 +1496,9 @@
>          gtk_widget_set_sensitive (data->button_prev, FALSE);
>  
>      gtk_widget_set_sensitive(GTK_WIDGET(data->button_next), TRUE);
> -     
> +    
> +    gtk_widget_set_default_direction(get_text_direction(obj));
> +
>      gtk_widget_show_all(data->window);    
>     
>      gtk_main();



Reply to: