Re: Problem grabbing motion-notify events.

2006-08-08 Thread cole-anstey
 On Mon, 2006-08-07 at 08:06 +, [EMAIL PROTECTED] wrote:
  Hello,
  
  I'm having a problem with grabbing motion-notify events when reparenting 
  widgets.  Reparenting appears to stop you from receiving all of the events.
  I have written the test application below to highlight the problem.
  
  The application reparents a handle box to a window and then reparents it 
  back to the main application window.
 
 I didn't reviewed the full source code but something that hit my eyes is your 
 re-parenting code. 
 
 You should not take a GtkWidget out of its container without holding a 
 reference to it, as it can be destroyed when you do that.
 
 The steps for re-parenting a widget should be:
 
 g_object_ref()
 gtk_container_remove
 gtk_container_add
 g_object_unref()
 
 But better to try gtk_widget_reparent ().
 
 --
 Iago Rubio

Thank you,

It was just a quick hack.  I'm beginning to think its a problem with the way 
events are filtered in the gtk bowels during a grab.
I've managed to build gtk, gdk and the gtk-demo last night and it appears to 
run o.k, so I'll try debugging it later.
At least now I will be able to turn the GTK_NOTE ouput on.  If it turns out not 
to be a problem, I should at least be able to ascertain the cause.

I'll post my findings here in a few days.


-
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software 
Visit www.ntlworld.com/security for more information

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


g_spawn_async_with_pipes hangs on OSX Tiger

2006-08-08 Thread Jacob Ole Juul Kolding
I'm currently porting a GTK+/SDL app to OSX Tiger. In the app I spawn g++
using g_spawn like this:

 g_spawn_async_with_pipes(path.c_str(), arguments, NULL,G_SPAWN_SEARCH_PATH,
  NULL, NULL, gpid,in, out, err,error);


The code does run and the output file is compiled successfully, but after
the g_spawn call my main program will semi hang. I can open new gtk windows
but they are not rendered, likewise already open windows are non responsive
and I can't close the app.

I got the GTK+ libs and headers from darwinports and besides this problem
GTK+ runs fine.

I have the same code running under Linux and XP so I guess its a OSX port
bug.

If anyone has any info on this I'd really appreciate it.
And if this list is inappropriate I'll post to the darwinports list instead.

Thanks in advance

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


problems with threads in a shared object

2006-08-08 Thread Luka Napotnik
I have a program that imports plugins via dlopen and dlsym(). In those
plugins I use functions like g_mutex_lock to lock a variable, declared in
the main program. But when getting to the mutex function the whole program
crashes.
The .so library is compiled with:

gcc -g -O0 -shared `pkg-config --libs --cflags gtk+-2.0 glib-2.0
gthread-2.0` rr.c -o rr.so

What's wrong?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: problems with threads in a shared object

2006-08-08 Thread Tristan Van Berkom
Luka Napotnik wrote:
 I have a program that imports plugins via dlopen and dlsym(). In those
 plugins I use functions like g_mutex_lock to lock a variable, declared in
 the main program. But when getting to the mutex function the whole program
 crashes.
 The .so library is compiled with:
 
 gcc -g -O0 -shared `pkg-config --libs --cflags gtk+-2.0 glib-2.0
 gthread-2.0` rr.c -o rr.so
 
 What's wrong?

Good question, did you initialize the threading library ? what did the
stack trace clue you into ? what was the state of the mutex variable
when you attempted to lock it ? unlocked, locked... uncreated ?

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


How to copy data between widgets?

2006-08-08 Thread Román Gorojovsky
Hi all, sorry if this is a FAQ, but I've been reading the docs and I
couldn't find the answer.  Not being too fluent in english, I couldn't
find it in the archives, since I don't know what to look for.

The problem is the following.  I have a text entry, a button and a
label.  I want the label to display the text in the entry when you
press the button.

So far I've used g_signal_connect_swapped() connecting the clicked
signal on the button with a callback that takes a pointer to the label
as data.  But I couldn't pass more than that, so I could't pass a
string nor the text entry.

Another idea I had was passing the window in the callback and operate
on the window's children (the widgets), but I didn't find a way to go
from a widget to it's chlidren.

So i'm kind of stuck here.  I'll apreciate any pointer, link and/or
cluestick.  Thanks!!

-- 
Román Gorojovsky Sánchez
___
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 copy data between widgets?

2006-08-08 Thread Lance Dillon

 From: Román Gorojovsky [EMAIL PROTECTED]
 To: gtk-app-devel-list@gnome.org
 Sent: Tuesday, August 8, 2006 10:07:06 AM
 Subject: How to copy data between widgets?

 Hi all, sorry if this is a FAQ, but I've been reading the docs and I
 couldn't find the answer.  Not being too fluent in english, I couldn't
 find it in the archives, since I don't know what to look for.

 The problem is the following.  I have a text entry, a button and a
 label.  I want the label to display the text in the entry when you
 press the button.

 So far I've used g_signal_connect_swapped() connecting the clicked
 signal on the button with a callback that takes a pointer to the label
 as data.  But I couldn't pass more than that, so I could't pass a
 string nor the text entry.

But you can pass any kind of pointer, so make a struct, something like this:

struct my_data {
  GtkLabel *l;
  GtkEntry *e;
};

Then pass a pointer to an instance of your struct.  Now you have both widgets 
available in your callback.




___
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 copy data between widgets?

2006-08-08 Thread Román Gorojovsky
On 8/8/06, Lance Dillon [EMAIL PROTECTED] wrote:

  From: Román Gorojovsky [EMAIL PROTECTED]
  To: gtk-app-devel-list@gnome.org
  Sent: Tuesday, August 8, 2006 10:07:06 AM
  Subject: How to copy data between widgets?

  Hi all, sorry if this is a FAQ, but I've been reading the docs and I
  couldn't find the answer.  Not being too fluent in english, I couldn't
  find it in the archives, since I don't know what to look for.

  The problem is the following.  I have a text entry, a button and a
  label.  I want the label to display the text in the entry when you
  press the button.

  So far I've used g_signal_connect_swapped() connecting the clicked
  signal on the button with a callback that takes a pointer to the label
  as data.  But I couldn't pass more than that, so I could't pass a
  string nor the text entry.

 But you can pass any kind of pointer, so make a struct, something like this:

 struct my_data {
   GtkLabel *l;
   GtkEntry *e;
 };

 Then pass a pointer to an instance of your struct.  Now you have both widgets 
 available in your callback.

Ok, thanks, I'll try that.

In fact I had alredy tried and falied, but that could be a problem in
my C-fu, not in my GTK-fu.

IIRC I did

   GtkWidget *label;
   struct my_data *data;

   /* Initialize label */

   data-l = label;

and got a Segmentation fault there.  But I'll try again I guess





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


-- 
Román
___
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 copy data between widgets?

2006-08-08 Thread Mohammed Sameer
On Tue, Aug 08, 2006 at 11:29:43AM -0300, Román Gorojovsky wrote:
 
 IIRC I did
 
GtkWidget *label;
struct my_data *data;
 
/* Initialize label */
 
data-l = label;
 
 and got a Segmentation fault there.  But I'll try again I guess

data = g_malloc(my_data);
data-l = label;

-- 
GNU/Linux registered user #224950
Proud Egyptian GNU/Linux User Group www.eglug.org Member.
Life powered by Debian, Homepage: www.foolab.org
--
Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
Read http://www.gnu.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT
Thanx for adding this text to Your signature
___
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 copy data between widgets?

2006-08-08 Thread Tristan Van Berkom
Román Gorojovsky wrote:
[...]
 IIRC I did
 
GtkWidget *label;
struct my_data *data;
 
/* Initialize label */
 
data-l = label;
 
 and got a Segmentation fault there.  But I'll try again I guess

my_data is a wild pointer here, you must either allocate it on the heap
and ensure that it is freed at the appropriate time, or declare it on
the stack globally or staticly.

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

Re: problems with threads in a shared object

2006-08-08 Thread Luka Napotnik
gdb:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218409552 (LWP 25125)]
0xb7979e84 in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0

There's a plugin_register() function that initializes g_thread (the main
program also init's it) and the mutex is also allocated before used.


On 8/8/06, Tristan Van Berkom [EMAIL PROTECTED] wrote:

 Luka Napotnik wrote:
  I have a program that imports plugins via dlopen and dlsym(). In those
  plugins I use functions like g_mutex_lock to lock a variable, declared
 in
  the main program. But when getting to the mutex function the whole
 program
  crashes.
  The .so library is compiled with:
 
  gcc -g -O0 -shared `pkg-config --libs --cflags gtk+-2.0 glib-2.0
  gthread-2.0` rr.c -o rr.so
 
  What's wrong?

 Good question, did you initialize the threading library ? what did the
 stack trace clue you into ? what was the state of the mutex variable
 when you attempted to lock it ? unlocked, locked... uncreated ?

 Cheers,
 -Tristan

___
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 copy data between widgets?

2006-08-08 Thread Román Gorojovsky
On 8/8/06, Tristan Van Berkom [EMAIL PROTECTED] wrote:
 Román Gorojovsky wrote:
 [...]
  IIRC I did
 
 GtkWidget *label;
 struct my_data *data;
 
 /* Initialize label */
 
 data-l = label;
 
  and got a Segmentation fault there.  But I'll try again I guess

 my_data is a wild pointer here, you must either allocate it on the heap
 and ensure that it is freed at the appropriate time, or declare it on
 the stack globally or staticly.


As I said before, It's a problem with my C, not my gtk.  A quite
embarrassing mistake, sorry for wasting your time.

Thanks a lot again.

 Cheers,
 -Tristan



-- 
Román
___
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 copy data between widgets?

2006-08-08 Thread Mohammed Sameer
On Tue, Aug 08, 2006 at 05:33:58PM +0300, Mohammed Sameer wrote:
 On Tue, Aug 08, 2006 at 11:29:43AM -0300, Román Gorojovsky wrote:
  
  IIRC I did
  
 GtkWidget *label;
 struct my_data *data;
  
 /* Initialize label */
  
 data-l = label;
  
  and got a Segmentation fault there.  But I'll try again I guess
 
 data = g_malloc(my_data);
 data-l = label;

Oops.
g_new();

-- 
GNU/Linux registered user #224950
Proud Egyptian GNU/Linux User Group www.eglug.org Member.
Life powered by Debian, Homepage: www.foolab.org
--
Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
Read http://www.gnu.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT
Thanx for adding this text to Your signature
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: problems with threads in a shared object

2006-08-08 Thread Luka Napotnik
Ok it works now. Seems there was a problem with the functions.

On 8/8/06, Luka Napotnik [EMAIL PROTECTED] wrote:

 gdb:
 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread -1218409552 (LWP 25125)]
 0xb7979e84 in pthread_mutex_lock () from
 /lib/tls/i686/cmov/libpthread.so.0

 There's a plugin_register() function that initializes g_thread (the main
 program also init's it) and the mutex is also allocated before used.


 On 8/8/06, Tristan Van Berkom  [EMAIL PROTECTED] wrote:
 
  Luka Napotnik wrote:
   I have a program that imports plugins via dlopen and dlsym(). In those
   plugins I use functions like g_mutex_lock to lock a variable, declared
  in
   the main program. But when getting to the mutex function the whole
  program
   crashes.
   The .so library is compiled with:
  
   gcc -g -O0 -shared `pkg-config --libs --cflags gtk+-2.0 glib-2.0
   gthread-2.0` rr.c -o rr.so
  
   What's wrong?
 
  Good question, did you initialize the threading library ? what did the
  stack trace clue you into ? what was the state of the mutex variable
  when you attempted to lock it ? unlocked, locked... uncreated ?
 
  Cheers,
  -Tristan
 


___
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 copy data between widgets?

2006-08-08 Thread Michael L Torrie
On Tue, 2006-08-08 at 11:48 -0300, Román Gorojovsky wrote:
 As I said before, It's a problem with my C, not my gtk.  A quite
 embarrassing mistake, sorry for wasting your time.

Another way to do it is to assign each widget a string name using
g_object_set_data.  Once this is set, then in your callback you can use
the emitting-object's GtkWidget pointer to lookup the parent widget and
then search down the widget hiearchy for the named label widget.  

Glade-generated code (which is of course deprecated but demonstrates
this solution) does this:

#define GLADE_HOOKUP_OBJECT(component,widget,name) \
  g_object_set_data_full (G_OBJECT (component), name, \
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)

#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
  g_object_set_data (G_OBJECT (component), name, widget)



GtkWidget*
lookup_widget  (GtkWidget   *widget,
const gchar *widget_name)
{
  GtkWidget *parent, *found_widget;

  for (;;)
{
  if (GTK_IS_MENU (widget))
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
  else
parent = widget-parent;
  if (!parent)
parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
GladeParentKey);
  if (parent == NULL)
break;
  widget = parent;
}

  found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
 widget_name);
  if (!found_widget)
g_warning (Widget not found: %s, widget_name);
  return found_widget;
}

GtkWidget*
create_window1 (void)
{
  GtkWidget *window1;
  GtkWidget *vbox1;
  GtkWidget *label;
  GtkWidget *entry;
  GtkWidget *button;

  window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window1), _(window1));

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (window1), vbox1);

  label = gtk_label_new (_(label1));
  gtk_widget_show (label);
  gtk_box_pack_start (GTK_BOX (vbox1), label, FALSE, FALSE, 0);

  entry = gtk_entry_new ();
  gtk_widget_show (entry);
  gtk_box_pack_start (GTK_BOX (vbox1), entry, FALSE, FALSE, 0);

  button = gtk_button_new_with_mnemonic (_(button1));
  gtk_widget_show (button);
  gtk_box_pack_start (GTK_BOX (vbox1), button, FALSE, FALSE, 0);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (window1, window1, window1);
  GLADE_HOOKUP_OBJECT (window1, vbox1, vbox1);
  GLADE_HOOKUP_OBJECT (window1, label, label);
  GLADE_HOOKUP_OBJECT (window1, entry, entry);
  GLADE_HOOKUP_OBJECT (window1, button, button);

  return window1;
}


This is somewhat arbitrary, and you could use your own method for doing
the names and searching.  I've found this type of thing to work very
well.

Michael


 
 Thanks a lot again.
 
  Cheers,
  -Tristan
 
 
 

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


Re: where to find a specific part of the gnome code?

2006-08-08 Thread rupert
i think its the gnome-volume-manager, i did a grep in /usr on the message
text and found only one file(gnome-volume-manager.mo) that contains the term
(Passwort-Phrase). Right now i killed the whole gnome-volume-manager and
restarted it, and the password requests pop up, i looked thorugh the sources
in cvs, but havent found any parts that look like what i need, but i will
try further.

On 8/7/06, Tristan Van Berkom [EMAIL PROTECTED] wrote:

 rupert wrote:
  Im at a point with my application where i exactly need the code for the
  function that runs when you have encrypted disks and start gnome.
  I mean the password request for the LUKS devices that pops up when gnome
 is
  starting on my ubuntu/dapper machine.
  i looked though the gnome cvs but thats way to much to handle.
 
  My goal:
  In my code i want to execute a cryptsetup shellcommand which gives you
 an
  password request after starting,
  i found the gnome_password_dialog, but this doesnt seem the right,
 because
  there is no user needed in my request.
  Just for testing I started coding a small gtk_dialog, but at the point
 where
  i have to pass the password to the cryptsetup command I am stuck, so I
 would
  like to take a look at the code from the gnome tree.

 I dont think the component you speak of is really in gnome software...

 You can feed the password to cryptsetup using stdin, and you can also
 use a gtk/gnome dialog to do so, maybe the ubuntu folks wrote up something
 that does this ?

 Cheers,
-Tristan

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


Re: where to find a specific part of the gnome code?

2006-08-08 Thread Tristan Van Berkom
rupert wrote:
 i think its the gnome-volume-manager, i did a grep in /usr on the message
 text and found only one file(gnome-volume-manager.mo) that contains the 
 term
 (Passwort-Phrase). Right now i killed the whole gnome-volume-manager and
 restarted it, and the password requests pop up, i looked thorugh the 
 sources
 in cvs, but havent found any parts that look like what i need, but i will
 try further.

I'm getting a very strange impression,
 do you think you'll find the entire ubuntu distribution source in
gnome cvs ?

I may be mistaken but I'm quite sure that this applet of which you speak
(one that pops up a gtk+ dialog and prompts for a password to feed to
cryptsetup ?) is a fabrication of your GNU distribution and not gnome
(in your case ubuntu right ?).

Cheers,
-Tristan

___
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 copy data between widgets?

2006-08-08 Thread Román Gorojovsky
On 8/8/06, Michael L Torrie [EMAIL PROTECTED] wrote:
 On Tue, 2006-08-08 at 11:48 -0300, Román Gorojovsky wrote:
  As I said before, It's a problem with my C, not my gtk.  A quite
  embarrassing mistake, sorry for wasting your time.

 Another way to do it is to assign each widget a string name using
 g_object_set_data.  Once this is set, then in your callback you can use
 the emitting-object's GtkWidget pointer to lookup the parent widget and
 then search down the widget hiearchy for the named label widget.

Ah! this is another thing that I wanted to know, how to follow the
widget hierarchy.  The example is good enough, thanks.


 Glade-generated code (which is of course deprecated but demonstrates
 this solution) does this:

 #define GLADE_HOOKUP_OBJECT(component,widget,name) \
   g_object_set_data_full (G_OBJECT (component), name, \
 gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)

 #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
   g_object_set_data (G_OBJECT (component), name, widget)



 GtkWidget*
 lookup_widget  (GtkWidget   *widget,
 const gchar *widget_name)
 {
   GtkWidget *parent, *found_widget;

   for (;;)
 {
   if (GTK_IS_MENU (widget))
 parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
   else
 parent = widget-parent;
   if (!parent)
 parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
 GladeParentKey);
   if (parent == NULL)
 break;
   widget = parent;
 }

   found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
  widget_name);
   if (!found_widget)
 g_warning (Widget not found: %s, widget_name);
   return found_widget;
 }

 GtkWidget*
 create_window1 (void)
 {
   GtkWidget *window1;
   GtkWidget *vbox1;
   GtkWidget *label;
   GtkWidget *entry;
   GtkWidget *button;

   window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_window_set_title (GTK_WINDOW (window1), _(window1));

   vbox1 = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox1);
   gtk_container_add (GTK_CONTAINER (window1), vbox1);

   label = gtk_label_new (_(label1));
   gtk_widget_show (label);
   gtk_box_pack_start (GTK_BOX (vbox1), label, FALSE, FALSE, 0);

   entry = gtk_entry_new ();
   gtk_widget_show (entry);
   gtk_box_pack_start (GTK_BOX (vbox1), entry, FALSE, FALSE, 0);

   button = gtk_button_new_with_mnemonic (_(button1));
   gtk_widget_show (button);
   gtk_box_pack_start (GTK_BOX (vbox1), button, FALSE, FALSE, 0);

   /* Store pointers to all widgets, for use by lookup_widget(). */
   GLADE_HOOKUP_OBJECT_NO_REF (window1, window1, window1);
   GLADE_HOOKUP_OBJECT (window1, vbox1, vbox1);
   GLADE_HOOKUP_OBJECT (window1, label, label);
   GLADE_HOOKUP_OBJECT (window1, entry, entry);
   GLADE_HOOKUP_OBJECT (window1, button, button);

   return window1;
 }


 This is somewhat arbitrary, and you could use your own method for doing
 the names and searching.  I've found this type of thing to work very
 well.

 Michael


 
  Thanks a lot again.
 
   Cheers,
   -Tristan
  
 
 




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

About Dialog crash...

2006-08-08 Thread Enrico
Hi at all!

I have a little problem with GtkAboutDialog and this code:

___
void
on_about1_activate (GtkMenuItem *menuitem , gpointer user_data)
{
 GtkWidget *about;

 about = glade_xml_get_widget (xml, aboutdialog);
   
 gtk_widget_show (about);

}
__

If I push the X button of the about_dialog for 2  times the entire 
application crashes...where is the mistake?

Many thanks

Enrico

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


Re: where to find a specific part of the gnome code?

2006-08-08 Thread rupert
On 8/8/06, Tristan Van Berkom [EMAIL PROTECTED] wrote:

 rupert wrote:
  i think its the gnome-volume-manager, i did a grep in /usr on the
 message
  text and found only one file(gnome-volume-manager.mo) that contains the
  term
  (Passwort-Phrase). Right now i killed the whole gnome-volume-manager and
  restarted it, and the password requests pop up, i looked thorugh the
  sources
  in cvs, but havent found any parts that look like what i need, but i
 will
  try further.

 I'm getting a very strange impression,
  do you think you'll find the entire ubuntu distribution source in
 gnome cvs ?


nope sorry, this was a mistake by me, sorry,  i did a apt-get soruce and now
have the ubuntu patches for the gvm, with the lines i need

I may be mistaken but I'm quite sure that this applet of which you speak
 (one that pops up a gtk+ dialog and prompts for a password to feed to
 cryptsetup ?) is a fabrication of your GNU distribution and not gnome
 (in your case ubuntu right ?).


right

Cheers,
 -Tristan


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


Which widget should I use?

2006-08-08 Thread Fernando Apesteguía
Hi list!

I need to represent some data in my application. The data is actually a
trace of functions. The size of the list is not fixed, but it has a limit of
200 elements. When the 200 limit is reached, I clear the older element and
then add the new one.
I have the list in a file (from procfs) and now I need to show it. I thought
about to draw the name of the function inside a rectangle and then an arrow
pointing to the next element. Something like this:

__
|func1|   ---   |func2|
--   

But I don't know what kind of widget I need to use. Maybe this is not the
best way to represent this... should I use a treeview to show the list?
Which are the advantages?

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


Pango Cairo font resolution: shouldn't be specified for both horizontal and vertical?

2006-08-08 Thread Ivan Baldo
Hello.
I am drawing text on a Cairo context with the help of Pang Cairo.
If I use a font with 72 points then an M should be aproximately one 
inch tall (I guess, maybe I am wrong), for this, I get the resolution of 
my monitor and I tell that to Pango, so I got my expected result.
Luckily my monitor has square pixels, so I have 81 dpi both 
horizontally and vertically.
But now I wonder: ¿what happens on a non square pixel monitor or on 
a printer?
My guess is that the fonts would look distorted because the diferent 
resolutions aren't taken into account by Pango.
I looked in the documentation and header files and I didn't found a 
function to specify the resolution separately for vertical and horizontal.
I am a bit lost now, so I appreciate if someone can iluminate my 
route to salvation :).
Thanks for sharing your knowledge!


P.s.: GNOME seems to be using 96 DPI by default although my monitor 
correctly reports 81 dpi to X _and_ to GTK, so actually my fonts aren't 
the size they should be in the real physical world, but I will not bug 
about this until I get more knowledge about fonts, etc..., also, it 
doesn't have the possibility to specify diferent resolutions for 
horizontal and vertical... I wonder how fonts would look in a non square 
pixel monitor though I think those monitors are hard to find today...


-- 
Ivan Baldo - [EMAIL PROTECTED] - http://ibaldo.codigolibre.net/
ICQ 10215364 - Phone/FAX (598) (2) 613 3223.
Caldas 1781, Malvin, Montevideo, Uruguay, South America, planet Earth.
We believe that we are free, but in reality we are not! We wee weee!
Alternatives: [EMAIL PROTECTED] - http://go.to/ibaldo


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


Re: help me catch up on GTK gui tools

2006-08-08 Thread Calum Benson

On 6 Aug 2006, at 18:18, Peter Firefly Lund wrote:

 (btw. why on Earth do you have to use Solaris at all?  Is it Company
 Policy that Cannot be Changed? ZFS and dtrace are cool but isn't that
 about it?)

Umm... no.  But this is hardly the place for a My Kernel's Better  
Than Your Kernel discussion, so let's just all play nice :)

FWIW, to the OP... if you want an easier way to manage your GNOME  
dependencies on Solaris, and don't need support from Sun, you might  
want to investigate the Solaris apt package repository at http:// 
blastwave.org.

If you prefer to build from source, some of the tools that we use to  
build GNOME and various other things for Solaris from RPM spec files  
might be of interest (although they currently work better with the  
SunStudio compiler than with gcc):

http://pkgbuild.sourceforge.net http://www.opensolaris.org/os/ 
community/desktop/communities/jds/building

Some community-contributed spec files, including gtkmm:
http://svn.sourceforge.net/viewvc/pkgbuild/spec-files-extra/trunk/

Cheeri,
Calum.

-- 
CALUM BENSON, Usability Engineer   Sun Microsystems Ireland
mailto:[EMAIL PROTECTED]Java Desktop System Team
http://blogs.sun.com/calum +353 1 819 9771

Any opinions are personal and not necessarily those of Sun Microsystems


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


Re: Which widget should I use?

2006-08-08 Thread Guy Rouillier
Fernando Apesteguía wrote:
 Hi list!
 
 I need to represent some data in my application. The data is actually a
 trace of functions. The size of the list is not fixed, but it has a limit of
 200 elements. When the 200 limit is reached, I clear the older element and
 then add the new one.
 I have the list in a file (from procfs) and now I need to show it. I thought
 about to draw the name of the function inside a rectangle and then an arrow
 pointing to the next element. Something like this:
 
 __
 |func1|   ---   |func2|
 --   
 
 But I don't know what kind of widget I need to use. Maybe this is not the
 best way to represent this... should I use a treeview to show the list?
 Which are the advantages?

Well, unless you have a phenomenally wide screen, 200 boxes pointing to 
each other as you depict above will never fit.  Besides, once you get 
above 5-10 boxes, comprehension begins to plummet.

I'd just put them in a simple list, in whatever order makes sense to 
your audience (first to last or last to first.)  You can do that with a 
tree view backed by a list store.

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


RE: help me catch up on GTK gui tools

2006-08-08 Thread Brett Stottlemyer

Calum, 

Thanks for the links, you've given me a lot of new stuff to look at.  I had
no idea all of that was available; I was disappointed with the selection at
sunfreeware, which is often out of date.

I'm surprised to hear that some of the software compiles better with
sunstudio.  I thought many of the libraries (like gtk) were built with gcc.
I would expect better performance from sunstudio (as the native compiler),
but more trouble compiling.

BTW, I'm interested in GTK for gui development with gtkglext widgets, not
for GNOME.  I believe solaris opengl support within sunstudio is limited to
SPARC workstations, and any testing I would do would be on x86 systems
(although, once again, the final destination would be SPARC).

Again, thanks for the help.  I'm new to a lot of this, so your pointers are
definitely helpful.

Brett


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 5:56 PM
To: Brett Stottlemyer
Cc: gtk-app-devel-list@gnome.org
Subject: Re: help me catch up on GTK gui tools


On 6 Aug 2006, at 18:18, Peter Firefly Lund wrote:

 (btw. why on Earth do you have to use Solaris at all?  Is it Company
 Policy that Cannot be Changed? ZFS and dtrace are cool but isn't that
 about it?)

Umm... no.  But this is hardly the place for a My Kernel's Better  
Than Your Kernel discussion, so let's just all play nice :)

FWIW, to the OP... if you want an easier way to manage your GNOME  
dependencies on Solaris, and don't need support from Sun, you might  
want to investigate the Solaris apt package repository at http:// 
blastwave.org.

If you prefer to build from source, some of the tools that we use to  
build GNOME and various other things for Solaris from RPM spec files  
might be of interest (although they currently work better with the  
SunStudio compiler than with gcc):

http://pkgbuild.sourceforge.net http://www.opensolaris.org/os/ 
community/desktop/communities/jds/building

Some community-contributed spec files, including gtkmm:
http://svn.sourceforge.net/viewvc/pkgbuild/spec-files-extra/trunk/

Cheeri,
Calum.

-- 
CALUM BENSON, Usability Engineer   Sun Microsystems Ireland
mailto:[EMAIL PROTECTED]Java Desktop System Team
http://blogs.sun.com/calum +353 1 819 9771

Any opinions are personal and not necessarily those of Sun Microsystems





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


Pango-1.14.0 released

2006-08-08 Thread Behdad Esfahbod
Pango-1.14.0 is now available for download at:

  http://download.gnome.org/sources/pango/1.14/

39144843f377ec6b60dbbf1a25d2a49a  pango-1.14.0.tar.bz2
65ecb3d29cebcaf97de14e55831ebb7c  pango-1.14.0.tar.gz

This is a stable release providing new functionality as compared
to Pango-1.12, while maintaining source and binary compatibility.
Notable improvements in Pango since version 1.12 include:

  * Update to Unicode 5.0.0 character database

  * Improved Indic rendering [LingNing Zhang]

  * Improved documentation, including list of new symbols added in each
stable version of Pango [Priit Laes]

  * Various bug fixes as usual

  * The OpenType Layout code in Pango has a new home and name now, and
is shared by Qt.  HarfBuzz, is still copied internally in Pango, so no
separate compilation/installation is necessary.

http://www.freedesktop.org/wiki/Software/HarfBuzz


About Pango
===

Pango is a library for layout and rendering of text, with an emphasis
on internationalization. Pango can be used anywhere that text layout
is needed, though most of the work on Pango so far has been done in
the context of the GTK+ widget toolkit. Pango forms the core of text
and font handling for GTK+-2.x.

Pango is designed to be modular; the core Pango layout engine can
be used with different font backends. There are three basic backends,
with multiple options for rendering with each.

 - Client side fonts using the FreeType and fontconfig libraries.
   Rendering can be with with Cairo or Xft libraries, or directly
   to an in-memory buffer with no additional libraries.

 - Native fonts on Microsoft Windows. (Optionally using Uniscribe
   for complex-text handling). Rendering can be done via Cairo
   or directly using the native Win32 API.

 - Native fonts on MacOS X, rendering via Cairo.

The integration of Pango with Cairo (http://cairographics.org)
provides a complete solution with high quality text handling
and graphics rendering.

Dynamically loaded modules then handle text layout for particular
combinations of script and font backend. Pango ships with a wide
selection of modules, including modules for Hebrew, Arabic,
Hangul, Thai, and a number of Indic scripts. Virtually all of the
world's major scripts are supported.

As well as the low level layout rendering routines, Pango includes
PangoLayout, a high level driver for laying out entire blocks of text,
and routines to assist in editing internationalized text.

More information about Pango is available from http://www.pango.org/.
Bugs should be reported to http://bugzilla.gnome.org.

Pango 1.14.0 depends on version 2.10.0 or newer of the GLib
library and version 1.2.2 or newer of the cairo library (if the
cairo backend is desired); more information about GLib and cairo
can be found at http://www.gtk.org/ and http://cairographics.org/
respectively.


08 August 2006
Behdad Esfahbod

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