Help on GTK font settings

2005-12-10 Thread Attilio Fiandrotti

Hi

As announced [1] by Frans Pop, the debian-installer is soon going to go 
be graphical: it makes use of GTK for the user interface and the 
DirectFB GDK backend insead of X.
Since the debian-installer supports more than 60 different languages we 
need to take glyphs from different fonts [2]: FreeSans is the default 
font for latin alphabets, while for different languages we make use of 
specialized fonts (Sazanami Gothic for Japanese etc..).
Now, one annoying issue is that, since FreeSans contains some glyphs 
from some non-latin languages too (Japanese, Chinese, ...), those are 
always used instead of the corresponding glyphs from specialized fonts.
It was proposed [3] that, every time the user decides to use a different 
language, an appropriate entry has to be set into the gtkrc to instruct 
the GTK installer to use a specific font overriding libfontconfig 
preferences.

To support this, we introduced this portion of code

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);
gtk_rc_reparse_all();
while (gtk_events_pending ()) gtk_main_iteration ();

(note that the GDK-DFB implementation of 
gdk_event_send_clientmessage_toall() is an emoty dummy function )


into the main function of the GTK frontend of the debian installer, that 
is called every time something has to be displayed to the user.
Unfortunately this has no effects on fonts-choosing: FreeSans font is 
still used, no matter wha is specified into gtkrc.
Does the idea of forcing a GTK app to use a special fonts setting up an 
appropriate entry into gtkrc is a good idea? and, if it is, is this 
portion  of code enough to make it work?


thanks

Attilio

[1] http://lists.debian.org/debian-devel-announce/2005/11/msg00021.html
[2] http://wiki.debian.org/DebianInstallerGUIFonts
[3] http://lists.debian.org/debian-boot/2005/12/msg00324.html
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: howto mix gtk and network

2005-12-10 Thread Alexander Nagel
Am Fri, 09 Dec 2005 15:24:12 +0100 schrieb Vivien Malerba:
 
 I use the GNet library and it works fine and integrates easily in the main 
 loop
 http://www.gnetlibrary.org/
 
 Vivien
Thanks you very much. That's what i need.
Even with md5 and sha.
Alex


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


some questions, please help

2005-12-10 Thread Luka Napotnik
Hi. I have two questions:

1. How can I determine a treeview column which will GTK+'s search
feature (that box that appears when starting to type) search for.

2. In the treeview tutorial
(http://scentric.net/tutorial/sec-treeview-col-whole-row.html), there's
a way to color a row by making a column connection to the 'foreground'
property. I don't understand how to connect that signal to a column?

Please help.

Greets,
Luka

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Spreedsheet

2005-12-10 Thread Adrian Feiguin

Check out gtksheet. It's part of gtkextra : http://gtkextra.sourceforge.net
Enjoy,
ADRIAN

Stefano Esposito wrote:


Hi all,

in my app i need to implement a spreedsheet-like widget (i.e. a GtkTreeView 
with a GtkListStore which shows a number of empty lines to be filled by the 
user). Any hints?

 




___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list
 





--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.13.13/195 - Release Date: 12/8/2005

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: some questions, please help

2005-12-10 Thread Luka Napotnik
Another question.

Does GTK+ have functions to get the file type via MIME? If not, how can
I get that?


Greets,
Luka

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


How disable entire gnome desktop

2005-12-10 Thread Arx Henrique
Hi all, i need disable all gnome-desktop

when gnome-session initialize, i'll throw my program, and i need
disable all gnome-desktop until the user close my app.

anyone know how i could do this?

cheers
--
A fé remove montanhas, mas eu prefiro a dinamite
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: swap images on click event.

2005-12-10 Thread Craig Harding
Sorry for the delay on this, but I'm still in exams. :) When I add both GtkImages to the applet, and 
run the program I get the following:

--
(xmms-applet:17352): Gtk-WARNING **: Attempting to add a widget with type GtkImage to a GtkEventBox, 
but as a GtkBin subclass a GtkEventBox can only contain one widget at a time; it already contains a 
widget of type GtkImage

-
When the gtk_widget_hide and gtk_widget_show functions are called, the button is hidden, but when 
the other button is supposed to show, it doesn't.


Craig.

Yury Aliaev wrote:

Craig Harding scripsit:

Ok, how can I show/hide the images? This is a breakdown of the code 
I'm working on:


--

play_button = gtk_image_new_from_file (/usr/local/pixmaps/play.png);
pause_button = gtk_image_new_from_file(/usr/local/pixmaps/pause3.png);
hbox = gtk_hbox_new(FALSE,0);
play_event_box = gtk_event_box_new ();
gtk_container_add (GTK_CONTAINER (play_event_box), play_button);
gtk_container_add (GTK_CONTAINER (play_event_box), pause_button);
gtk_box_pack_start(hbox, play_event_box, FALSE, FALSE, 2);
gtk_container_add (GTK_CONTAINER (applet), hbox);

gtk_widget_show_all (GTK_WIDGET (applet));



/* This should be added here otherwise all images will be shown 
simultaneously. */


gtk_widget_hide (pause_button); // or play_button



g_signal_connect (G_OBJECT (play_event_box), button_release_event, 
G_CALLBACK (on_play_button_press), pause_button);
g_signal_connect (G_OBJECT (play_event_box), button_release_event, 
G_CALLBACK (on_play_button_press), play_button);


static gboolean on_play_button_press (GtkWidget 
*event_box,GdkEventButton *event,gpointer data) {


// do show/hide stuff here? how do I do it?



Just use gtk_widget_hide()/gtk_widget_show() functions with appropriate 
arguments.




}



Regards,
Yury.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: swap images on click event.

2005-12-10 Thread Craig Harding
Got it working. I made an event box for each button and hid and showed each one when needed. Thanks 
for your help earlier.


craig.

Craig Harding wrote:
Sorry for the delay on this, but I'm still in exams. :) When I add both 
GtkImages to the applet, and run the program I get the following:

--
(xmms-applet:17352): Gtk-WARNING **: Attempting to add a widget with 
type GtkImage to a GtkEventBox, but as a GtkBin subclass a GtkEventBox 
can only contain one widget at a time; it already contains a widget of 
type GtkImage

-
When the gtk_widget_hide and gtk_widget_show functions are called, the 
button is hidden, but when the other button is supposed to show, it 
doesn't.


Craig.

Yury Aliaev wrote:


Craig Harding scripsit:

Ok, how can I show/hide the images? This is a breakdown of the code 
I'm working on:


--

play_button = gtk_image_new_from_file (/usr/local/pixmaps/play.png);
pause_button = gtk_image_new_from_file(/usr/local/pixmaps/pause3.png);
hbox = gtk_hbox_new(FALSE,0);
play_event_box = gtk_event_box_new ();
gtk_container_add (GTK_CONTAINER (play_event_box), play_button);
gtk_container_add (GTK_CONTAINER (play_event_box), pause_button);
gtk_box_pack_start(hbox, play_event_box, FALSE, FALSE, 2);
gtk_container_add (GTK_CONTAINER (applet), hbox);

gtk_widget_show_all (GTK_WIDGET (applet));




/* This should be added here otherwise all images will be shown 
simultaneously. */


gtk_widget_hide (pause_button); // or play_button



g_signal_connect (G_OBJECT (play_event_box), button_release_event, 
G_CALLBACK (on_play_button_press), pause_button);
g_signal_connect (G_OBJECT (play_event_box), button_release_event, 
G_CALLBACK (on_play_button_press), play_button);


static gboolean on_play_button_press (GtkWidget 
*event_box,GdkEventButton *event,gpointer data) {


// do show/hide stuff here? how do I do it?




Just use gtk_widget_hide()/gtk_widget_show() functions with 
appropriate arguments.




}




Regards,
Yury.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list