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

Re: [g-i] fonts: a few thoughts



Attilio Fiandrotti <fiandro@tiscalinet.it> wrote:
Message-ID: <[🔎] 43962203.6080706@tiscalinet.it>

> To test if gtkrc reloading code i did the following
> 
> -Added
> 
> GdkEventClient event;
> event.type = GDK_CLIENT_EVENT;
> event.send_event = TRUE;
> event.window = NULL;
> event.message_type = gdk_atom_intern("_GTK_READ_RCFILES", FALSE);
> event.data_format = 8;
> gdk_event_send_clientmessage_toall((GdkEvent *)&event);
> while (gtk_events_pending ()) gtk_main_iteration ();
> 
> into the body of gtk_go() function, so that theme reloading is forced at 
> every question that is displayed (no performance degradation detected at 
> all).

If we can put the gtkrc reloading code into gtk.so, gtk_rc_reparse_all()
will be enough.  Here are [1][2][3]the screen shots.  For Chinese user,
we embedded 12pt bitmap font to zh.ttf. 

 1. http://hp.debian.or.jp/~tyuyu/debian-installer/ja.jpg
 2. http://hp.debian.or.jp/~tyuyu/debian-installer/ko.jpg
 3. http://hp.debian.or.jp/~tyuyu/debian-installer/zh.jpg

Unfortunately I found that gdk_event_send_clientmessage_toall in
gdk/linux-fb/gdkevents-fb.c is empty.  If we want to instruct cdebconf
to reload rc files from external process,  we can't use
gdk_event_send_clientmessage_toall, so we have to find a different
solution :(
 
Best regards,
--
 Hidetaka Iwai
 tyuyu@debian.or.jp

Index: src/modules/frontend/gtk/gtk.c
===================================================================
--- src/modules/frontend/gtk/gtk.c	(revision 32750)
+++ src/modules/frontend/gtk/gtk.c	(working copy)
@@ -1411,6 +1411,8 @@
 
     if (q == NULL) return DC_OK;
 
+    /* re-read rc files */
+    gtk_rc_reparse_all();
     data->setters = NULL;
 
        questionbox = gtk_vbox_new(FALSE, 0);

Attachment: pgp3cJdw__YK7.pgp
Description: PGP signature


Reply to: