Re: GTK Socket implementation for DirectFB.

2007-09-24 Thread Attilio Fiandrotti
mohan soumya wrote:
 Hi,

   Can anyone let me know  whether Directfb support for GTK Socket is 
 implemented ?
   I am using GTK Socket in my application which uses DirectFB.(gtk_socket_new 
 to create socket).
   To get the id of window,the function  _gtk_socket_windowing_get_id  is 
 getting called and it is returing 0 in case of DirectFB.

   Please suggest me how to get proper id using _gtk_socket_windowing_get_id 
 function.

   Thanks,
   Soumya.

Sockets are not implemented yet in directfb (see #469278 in Gnome BTS), 
but IIRC someone said some time ago he had intention to implement it soon.

regards

Attilio

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


Re: gtkfb

2007-09-24 Thread Attilio Fiandrotti
Binary Chen wrote:
 Hi,
 
 Is gtkfb still developed? I want to use it instead of directfb, is this
 idea viable?

IIRC, gtkfb is no longer supported (and broken) from a long time, i 
guess ATM the only GDK backend which allows GTK to operate in Xless 
Linux environments is DFB.

 And is there any window manager based on gtkfb?

Yes, GtkFB has one integrated in it: you must uncomment a define 
somewhere in the backend to have it built.

regards

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


Re: Using Pango or Cairo with GTK on DirectFB

2007-06-05 Thread Attilio Fiandrotti
Hi

could you please provide a working version of this application?

many thanks

Attilio

Dennis Hall ha scritto:
 I'm having trouble with refresh when I used either Pango or Cairo calls with 
 GTK over Direct FB.  I've modified the scribble.c sample so that some test 
 text is drawn using pango when a button pressed or a movement event occurs 
 but I don't see the text unless I press the meta key (or windows key 
 depending on the keyboard) and move the entire region.  It looks like this 
 causes the whole drawing area to be refreshed.
 
 Can anyone explain the concepts or have documentation pointers or better yet 
 a fix for this problem?
 
 gint col_select = 0;
 char *szText = Test String;
 int lenText = 11;
 
 /* Draw a rectangle on the screen */
 static void draw_brush( GtkWidget *widget,
 gdoublex,
 gdoubley)
 {
   GdkRectangle update_rect;
   GdkColor fgColor;
 
   update_rect.x = x - 5;
   update_rect.y = y - 5;
   update_rect.width = RECT_WIDTH;
   update_rect.height = RECT_HEIGHT;
 
   gdk_color_parse(colorStrings[col_select], fgColor);
 
  gint col_select = 0;
  char *szText = Test String; 
  int lenText = 11;
 
 /* Draw a rectangle on the screen */
 static void draw_brush( GtkWidget *widget,
 gdoublex,
 gdoubley)
 {
   GdkRectangle update_rect;
   GdkColor fgColor;
 
   update_rect.x = x - 5;
   update_rect.y = y - 5;
   update_rect.width = RECT_WIDTH;
   update_rect.height = RECT_HEIGHT;
 
   gdk_color_parse(colorStrings[col_select], fgColor);
 
 
 
   GdkWindow* root = gdk_get_default_root_window();
   GdkGC* cg = gdk_gc_new(root);
   
   PangoLayout *pLayout = gtk_widget_create_pango_layout( widget, 0); 
   pango_layout_set_text(pLayout, szText, /* lenText */ -1);
 
   if (!gdk_colormap_alloc_color(
gdk_colormap_get_system (),
fgColor, TRUE, TRUE)
   ) {/*ERROR: NO gdk_colormap_alloc_color*/}
 
   gdk_draw_layout_with_colors( widget-window ,
 cg, 
 x+2, y+2,
 pLayout,
 fgColor /* NULL */,
 NULL
 );
 
   g_object_unref(pLayout);
 
   gdk_draw_rectangle (pixmap,
   widget-style-black_gc,
   TRUE,
   update_rect.x, update_rect.y,
   update_rect.width, update_rect.height);
 
   gtk_widget_queue_draw_area (widget,
   update_rect.x, update_rect.y,
   update_rect.width, update_rect.height);
 
   if (col_select==MAX_COL_STRINGS)
   col_select = 0;
   else
   col_select++;
 
 }
 
 static gboolean button_press_event( GtkWidget  *widget,
 GdkEventButton *event )
 {
   if (event-button == 1  pixmap != NULL)
 draw_brush (widget, event-x, event-y);
 
   return TRUE;
 }
 
 
 ___
 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: comipile gtk-dirctfb failed

2007-02-03 Thread Attilio Fiandrotti
wuxiaotian wrote:
 hello,
 
 I used gtk+-2.10.6 to compile gtk-directfb:
 
 ./configure --prefix=/usr --with-gdktarget=directfb --without-x
 make
 
 then, it failed like this:

snip/

 and then, I used gtk+-2.10.9 to compile, but I get the same error like
 that. Can anyone give me any pointers on how to resolve these errors?

Yes, build from SVN, as explained in gtk/dfb howto page [1].

regards

Attilio

[1] http://www.directfb.org/wiki/index.php/Projects:GTK_on_DirectFB
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Reducing GTK+ footprint

2007-01-24 Thread Attilio Fiandrotti
[EMAIL PROTECTED] wrote:
 Greetings, 
 
  
 
 Can any one tell me or give me some links to know how I can reduce the
 footprint of GTK. 
 
  
 
 Actually I want to remove some widgets (like frame, color selection,
 file selection etc) which I am not using in my application. 
 
  
 
 Also I want to know that if there is any other alternate way to reduce
 the GTK footprint.

not sure if this is what you mean, but in the debian-installer (hich is 
gtk/dfb based) we provide a set of stripped libraries using the mklibs tool.
This allows us to save up vakuable space on installation media.

regards

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


Re: Reducing GTK+ footprint

2007-01-24 Thread Attilio Fiandrotti
Mklibs is, IIRC, a python script that takes care of producing a minimal 
set of required libraries given a binary target application.
mklibs is available as a debian package, but whould be as well avalable 
as sourcecode somewhere.
I also know other similar tools exist.

Attilio

[EMAIL PROTECTED] wrote:
 Hi...
 
 Ya even our requirement is to save the space on installation media.
 
 Can't we get a copy of mklibs tool for FC5 / FC6 as we cant use that
 debian-installer.
 
 Regards,
 
 Richa
 
 
 
 -Original Message-
 From: Attilio Fiandrotti [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, January 24, 2007 5:09 PM
 To: gtk-app-devel-list@gnome.org
 Cc: Richa Mahajan
 Subject: Re: Reducing GTK+ footprint
 
 [EMAIL PROTECTED] wrote:
 
Greetings, 

 

Can any one tell me or give me some links to know how I can reduce the
footprint of GTK. 

 

Actually I want to remove some widgets (like frame, color selection,
file selection etc) which I am not using in my application. 

 

Also I want to know that if there is any other alternate way to reduce
the GTK footprint.
 
 
 not sure if this is what you mean, but in the debian-installer (hich is 
 gtk/dfb based) we provide a set of stripped libraries using the mklibs
 tool.
 This allows us to save up vakuable space on installation media.
 
 regards
 
 Attilio
 

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


Re: GtkWidgets on DirectFB

2006-12-26 Thread Attilio Fiandrotti
And, if you are a debian user, you don't have to compile anything as 
gtk/dfb libraries and development files are already available in 
unstable and exprimental :)

Attilio

Kumar Siddharth wrote:
 Hi,
 
 GTK has already been ported to DirectFB. You just need to compile and link
 to GTKDFB. Code will be same as normal GTK.
 
 http://www.directfb.org/wiki/index.php/Projects:GTK_on_DirectFB
 
 Regards,
 Siddharth
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 [EMAIL PROTECTED]
 Sent: Tuesday, December 26, 2006 6:38 PM
 To: gtk-app-devel-list@gnome.org
 Subject: GtkWidgets on DirectFB
 
 
 Hi;
 
   I want to place a gtkwidget (e.g. a window containing a button) on
 DirectFB. Can someone tell me the related link where I can get the
 sample code to do the same? Or any helps are invited.
 
 
 
 Ashish
 
 ___
 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


Re: GTK-GUI and video display

2006-12-16 Thread Attilio Fiandrotti
[EMAIL PROTECTED] wrote:
 Hi,
 
 I need to run a GTK GUI and display video via DFB. I understand that the
 GTK-GUI would be using layer 0 (primary) and video would use
 Layer 1. However when the GUI comes up then the GUI/video layer is not
 visible. Any inputs on whether any changes are required to GTK-DFB 
 to be able to display GUI and video simultaneously?

uhm.. are you trying to have two different processes rendering on the 
same VT ? in this case i guess you'll have to build dfb with multicore 
option toghether with the fusion module too.
I'm cc'ing directfb-users as this seems more a dfb than gtkdfb issue.

regards

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


Re: Scrolling a Tree View before it's realized

2006-12-05 Thread Attilio Fiandrotti
Attilio Fiandrotti wrote:
 Liam R E Quin wrote:
 
On Sat, 2006-11-11 at 11:51 +0100, Attilio Fiandrotti wrote:
[...]


I eventually managed this by scrolling the treeview from a callback that 
gets fired after the expose event is fired.
In order to have scrolling performed only the first time expose event is 
fired, i use a global flag which i reset from inside the callback the 
first time it's run.


An alternative might be to have the signal handler disconnect the
signal.
 
 
 That's what i did, as suggested by tomas: disconnecting the signal 
 handler from the treeview after it has run one time.
 Now scrolling works perfectly.
 By the way, is it so obvious you should wait for your treeview to be 
 realized before scrolling it?
 IIRC, this is not explicitly mentioned in the documentation.

following up to myself to report a strange issue i ran into today: my 
callback function is like this

void treeview_exposed_callback (GtkWidget *widget, GdkEventExpose 
*event, struct treeview_expose_callback_data *data)
{
 GtkTreePath *path  = gtk_tree_path_new_from_string (data - path);
 gtk_tree_view_set_cursor (GTK_TREE_VIEW (widget), path, NULL, FALSE);
 gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (widget ), path, NULL, 
TRUE, 0.5, 0);
 gtk_tree_path_free (path);
 g_signal_handler_disconnect (G_OBJECT(widget), 
data-callback_function);
 free(data);
}

everything works great, but sometimes i get a crash which can be easily 
avoided by swapping order of gtk_tree_view_set_cursor() and 
gtk_tree_view_scroll_to_cell() calls.

Is there any valid reason for this crash i'm running into?
I'm using DirectFB backend, and unfortunately i have no chance to test 
with X backend in the very same conditions nor attach a debugger to the 
process.
I'd really apreciate any help to make light into this strange crash.

thanks

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


Re: Scrolling a Tree View before it's realized

2006-11-11 Thread Attilio Fiandrotti
[EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Sat, Nov 11, 2006 at 11:51:20AM +0100, Attilio Fiandrotti wrote:
 
Attilio Fiandrotti wrote:

Hi

In an application i add many items to a ListStore and make it scroll on 
the fly to the default option row,  like this
 
 [...]
 
I eventually managed this by scrolling the treeview from a callback that 
gets fired after the expose event is fired.
In order to have scrolling performed only the first time expose event is 
fired, i use a global flag which i reset from inside the callback the 
first time it's run.
I now would like to know if there is a way to run a signal handler only 
once and without using a second signal handler or global flags.
 
 
 You just might want to call g_signal_handler_disconnect from whithin the 
 signal
 handler. You'll have to stash the handler ID you get from
 g_signal_connect() somewhere accessible from the handler (for example in
 the user data struct).
 
 OTOH, g_signal_add_emission_hook()  seems to be the function made for
 you :)
 
 In an emission hook function you just return FALSE if you want the hook
 to be removed. You'll have to check whether your particular signal
 accepts emission hooks, though.

disconnecting the signal handler from within the callback function did 
the trick.

thanks

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


Re: Scrolling a Tree View before it's realized

2006-11-11 Thread Attilio Fiandrotti
Liam R E Quin wrote:
 On Sat, 2006-11-11 at 11:51 +0100, Attilio Fiandrotti wrote:
 [...]
 
I eventually managed this by scrolling the treeview from a callback that 
gets fired after the expose event is fired.
In order to have scrolling performed only the first time expose event is 
fired, i use a global flag which i reset from inside the callback the 
first time it's run.
 
 
 An alternative might be to have the signal handler disconnect the
 signal.

That's what i did, as suggested by tomas: disconnecting the signal 
handler from the treeview after it has run one time.
Now scrolling works perfectly.
By the way, is it so obvious you should wait for your treeview to be 
realized before scrolling it?
IIRC, this is not explicitly mentioned in the documentation.

cheers

Attilio

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


Scrolling a Tree View before it's realized

2006-11-10 Thread Attilio Fiandrotti
Hi

In an application i add many items to a ListStore and make it scroll on 
the fly to the default option row,  like this

for (i = 0; i  NUMBER_OF_ITEMS; i++) {
 gtk_list_store_append (store, iter);
 gtk_list_store_set (store, iter, MY_COLUMN, mystrings[i], -1);
 if (default_option_index == i) {
 path = gtk_tree_model_get_path(model, iter);
 gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW(view), path, NULL, 
FALSE, 0.5, 0);
 gtk_tree_view_set_cursor (GTK_TREE_VIEW(view), path, NULL, FALSE);
 gtk_tree_path_free (path);
 }
}

Later i pack the TreeView into proper box hierarchy and eventually show 
the gtkwindow and within contained widgets.

Now, scrolling works inconsistently, as the row gets indeed selected but 
the scrolling is only partial.
I wonder if this is because i'm attempting to scroll to a row in a 
treeview which has not been realized yet.
In the case, does performing scroll after widget realization, from 
within a proper callback, will solve this issue?

thanks

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


Re: GTK+ 2.10.4 released

2006-09-26 Thread Attilio Fiandrotti
Matthias Clasen wrote:
 On 9/25/06, Attilio Fiandrotti [EMAIL PROTECTED] wrote:
 
 And the DFB backend was indeed found to be broken by the gtk-gnome
 Debian team when they tried to build a DFB flavour of GTK for use in the
 debian-installer.
 Is there a way to check if the DirctFB backend builds correctly before a
 major GTK relase, like (i guess) is done for X and win32 backends?

 
 The rule we have followed in the past is that the X backend has to build
 and work. The win32 releases have generally lagged behind the major
 GTK+ releases for a bit.
 
 The best way to ensure that the directfb or any other backend works
 in released versions of GTK+ is to make sure that it works in cvs...

Indeed, i made daily cvs update and rebuilt GTK from scratch for the 
whole past week, before 2.10.4 was released, but it seems this wasn't 
enough.
As i'm deeply involved in graphical debian-installer development, i have 
  a real reason to test the DFB backend on a regular basis and i don't 
mind spending some time in this task.
If there is something else than simply testing from CVS that i can do, 
please don't hesitate to tell me.

cheers

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


Re: GTK+ 2.10.4 released

2006-09-25 Thread Attilio Fiandrotti
And the DFB backend was indeed found to be broken by the gtk-gnome 
Debian team when they tried to build a DFB flavour of GTK for use in the 
debian-installer.
Is there a way to check if the DirctFB backend builds correctly before a 
major GTK relase, like (i guess) is done for X and win32 backends?

cheers

Attilio

Mike Emmel wrote:
 It looks like this build does not include my changes to allow the OSX
 and directfb
 backends to build.
 
 
 
 On 9/22/06, Matthias Clasen [EMAIL PROTECTED] wrote:
 
GTK+ 2.10.4 is now available for download at:

 http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.10/

gtk+-2.10.4.tar.bz2   md5sum: ecfcbdc0d23eb7a596b1d58b48838b18
gtk+-2.10.4.tar.gzmd5sum: 9721c3d769d6e8a9ef1905c90e3aee85

This is a bug fix release and is source and binary compatible
with 2.10.0.


What is GTK+


GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
suites.

GTK+ has been designed from the ground up to support a range of
languages, not only C/C++. Using GTK+ from languages such as Perl and
Python (especially in combination with the Glade GUI builder) provides
an effective method of rapid application development.

GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties.


Where to get more information about GTK+


Information about GTK+ including links to documentation can be
found at:

http://www.gtk.org/

An installation guide for GTK+ 2.10 is found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html

Common questions:

http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html
http://www.gtk.org/faq/


Overview of Changes from GTK+ 2.10.3 to 2.10.4
==

* GtkFileChooser works better with remote bookmarks

* Windows theme engine improvements

* Bugs fixed:
 116626 Use keyboard map contents to detect RTL groups
 353772 Add doc blurb for GtkWidget::parent-set
 353803 GtkEntry unneccesarily resets im context at commit
 353914 Leak of to_reset list from _gtk_settings_reset_rc_values
 354043 Renew the typeahead search timeout when using scrollwheel
 354687 PLT-reduction stuff not quite working
 354887 GtkFileChooserButton displays unnecessary authentication
dialogs
 355308 gtk_tree_view_set_grid_lines notifies wrong property
 355732 Combobox leaks treeview in list mode
 355134 Type in string
 355961 Typo in documentation for GtkPrintContext
 340201 Enhancement of Wimp theme engine.
 357132 Setting an RGBA colormap using gtk_widget_set_colormap()
on any widget at application start (before other widgets
are used) causes the running app to revert to the stock
icon theme

* Updated translations (bg,bn,bn_IN,de,dz,el,
  en_GB,et,fi,gu,hi,id,ka,lt,lv,mk,nb,nl,nn,or,
  ru,sl,sv,ta,th)


Thanks to all contributors:
Mariano Suárez-Alvarez, Alex Larsson, Chris Wilson,
David Lodge, Nelson Benitez, Behdad Esfahbod,
Hong Jen Yee, Torsten Schoenfeld, Richard Hult,
Dennis Cranston, Behnam Esfahbod, Claudio Saavedra


Matthias Clasen
September 23, 2006


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

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

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


Tree views, check cell renderers and ENTER button problem

2006-07-05 Thread Attilio Fiandrotti
Hi

In my application i have a treeview where each row contains a check cell
renderer and the signal row-activated is sent by the treeview to a
callback function that clicks the OK button that makes the application
to process data.
Now, when a check cell has focus, both SPACEBAR and ENTER keys
toggle the check: i would like to know if it's possible catching an
ENTER key pressure so that it can be managed to simulate click on the
OK button.
I'm already catching key_press_event from the window to catch ESC key
pressure, but of course this doesn't work with the ENTER key.

thanks

Attilio

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


TreeView and default widget

2006-06-04 Thread Attilio Fiandrotti

Hi

In my interface i have a button which grabs default focus like this

GTK_WIDGET_SET_FLAGS (GTK_WIDGET(my_button), GTK_CAN_DEFAULT);
gtk_widget_grab_default (button)

so that it gets activated when the user presses enter key,
and i also have a Treeview which grabs focus like this

gtk_widget_grab_focus(view)

so that the user can scroll the list without tabbing into it.
Obviously, when the treeview is active, the enter key no longer 
activates the button and the user has to tab over it and press space or 
enter to activate it.
Is there a solution for this that doesn't require dealing with 
key_press_event signal?


thanks

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


Re: TreeView and default widget

2006-06-04 Thread Attilio Fiandrotti

David Nečas (Yeti) wrote:

On Sun, Jun 04, 2006 at 12:07:17PM +0200, Attilio Fiandrotti wrote:


In my interface i have a button which grabs default focus like this

GTK_WIDGET_SET_FLAGS (GTK_WIDGET(my_button), GTK_CAN_DEFAULT);
gtk_widget_grab_default (button)

so that it gets activated when the user presses enter key,
and i also have a Treeview which grabs focus like this

gtk_widget_grab_focus(view)

so that the user can scroll the list without tabbing into it.
Obviously, when the treeview is active, the enter key no longer 
activates the button and the user has to tab over it and press space or 
enter to activate it.
Is there a solution for this that doesn't require dealing with 
key_press_event signal?



I suppose the treeview is completely passive when the user
can press Enter and nothing is supposed to happen in the
treeview itself.  Then you can connect to its
row-activated signal and handle it as activation of the
button.


Your supposition is correct, and today i'll test this trick that may 
solve my problem.


thanks

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


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


Gtk terminal widget

2005-11-09 Thread Attilio Fiandrotti

Hi all

i need to deveop a Gtk app that shows up a shell terminal.

I know two GtkWidgets do exists:
ZVT http://developer.gnome.org/doc/API/zvtterm/zvtterm.html
VTE http://developer.gnome.org/doc/API/2.0/vte/index.html

The app will run over DirectFrameBuffer and not X and has to be as small 
as possible (we cannot use gnome-libs for space reasons).
Is this possible to do? what's the best choice if both terminals are 
suitable for such a purpose?


thank you very much

Attilio

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


A couple of questions

2005-11-06 Thread Attilio Fiandrotti

Hi all

i've two questions:

1)About GtkTreeView widgets

Is it correct using the following two calls

gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(view), 
gtk_tree_model_get_path(model, iter), NULL, FALSE, 0.5, 0);
gtk_tree_view_set_cursor (GTK_TREE_VIEW(view), 
gtk_tree_model_get_path(model, iter), NULL, FALSE);


to scroll a gtktreeview to a desired row and then put focus over that 
row  (actually it works, but i'm not sure this is the right way to do it)


2) On key binding
I need to make so that by pressing the ESC key a GtkButton gets 
clicked, what functions should i use?


thanks in advance

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


Re: how to reduce the size of tiny-x

2005-09-15 Thread Attilio Fiandrotti

sadhees kumar wrote:

Dear friends,
 I configured for tiny-x and compiled the X11 source, everything was right 
but finally the size of my tiny-x was 113MB. Since i want to use this in an 
embedded application it must be within 8MB.
 Have anybody experianced this, if so please let me know it will be of great 
help to me.


if you are involved into an embedded- gtk project you can try GTK+ over 
DIrectFrameBuffer.


http://www.directfb.org/index.php?path=Development%2FProjects%2FGTK%2B

ciao

attilio

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


Re: GTK widget to display pie charts

2005-08-23 Thread Attilio Fiandrotti

Jody Goldberg wrote:

On Tue, Aug 23, 2005 at 07:26:40PM +0200, Attilio Fiandrotti wrote:


hi

i was looking for a gtk widget to display simple 2d pie chart, but i 
couldn't find nothing but this


http://mail.gnome.org/archives/gtk-list/1998-August/msg00369.html

does such a widget do exists and has been developed recently?



libgoffice has an actively developed charting engine.
It supports pie charts and numerous other styles.
There is a widget wrapper for the charting, and it can export to
svg, ps/pdf, and all gdk-pixbuf supported image formats.

i've noticed it, but i was looking for something really small and simple 
for an embedded-like usage in the gtk frontend for the debian installer: 
i cannot include big libraries.


ciao

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


A question about correct widget packaging sequence

2005-07-29 Thread Attilio Fiandrotti

hi everyone

we're trying to port the debian-installer gtk frontend from X to Direct
Frame Buffer: in the debian-installer gtk frontend code sequences of
instructions like this are often used


button = gtk_button_new_with_label(Hello world!);
frame = gtk_frame_new(blah blah);
gtk_container_add (GTK_CONTAINER (frame), button);
box = gtk_hbox_new (FALSE, 5);
gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
gtk_container_add(GTK_CONTAINER(window), box);
gtk_widget_show_all (window);
gtk_main ();

is this sequence correct?
If the same actions would be performed in this order

button = gtk_button_new_with_label(Hello world!);
frame = gtk_frame_new(blah blah);
box = gtk_hbox_new (FALSE, 5);
gtk_container_add(GTK_CONTAINER(window), box);
gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
gtk_container_add (GTK_CONTAINER (frame), button);
gtk_widget_show_all (window);
gtk_main ();

would this piece of code still be correct?

I've noticed that under X both sequences work correctly, in a DFB
environement, instead, the second one produces crashes (but DFB is still
buggy, so maybe this doesn't means a thing..)
thanks

attilio

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