Re: Creating printable reports

2004-07-21 Thread Russell Shaw
Daniel Kasak wrote:
Hi all.
I'm a newbie Perl developer, and I'm part-way through porting our 
database front-ends from Access to Perl / Gtk2 ( running on Linux ).
We need a few printable reports that I have to rebuild. I've started out 
doing them in a Perl CGI script, exporting an HTML 'report' and firing 
up Mozilla to view / print them. This is less than perfect. Mozilla 
doesn't support the @page directive, so controlling pagination and 
headers / footers is a nightmare.

What options do I have with GTK / Gnome?
Requirements are basically headers  footers and pagination, and of 
course Perl bindings, but I'll check this out.
Any takers?
Haven't dealt with text processing for a while but there's a few ways:
- generate the reports directly as TEX or postscript (TEX is hard to learn),
- generate the reports in a word-processor and embed keywords
  in it, and save in TEX or postscript format as a canned file, then
  run sed or C regex lib commands to replace the keywords with your
  own end-user text.
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


changing language for gtk apps. in kde

2004-07-21 Thread sada asd
Hi,

I would like to change the language settings for gtk
based applications. I'm using kde . Is it possible to
change the language without installing gdm ? I would
like to keep the kdm login screen . 

Thanks .

NG. 



__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: changing language for gtk apps. in kde

2004-07-21 Thread Sven Neumann
Hi,

sada asd [EMAIL PROTECTED] writes:

 I would like to change the language settings for gtk
 based applications. I'm using kde . Is it possible to
 change the language without installing gdm ? I would
 like to keep the kdm login screen . 

All you need to do is to change your locale settings (a set of
environment variables described by 'man locale'). I don't see how this
is specific to GTK+, KDE or even your login manager.


Sven
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Creating printable reports

2004-07-21 Thread John Cupitt
On Wed, 21 Jul 2004 08:46:36 +1000, Daniel Kasak
[EMAIL PROTECTED] wrote:
 We need a few printable reports that I have to rebuild. I've started out
 doing them in a Perl CGI script, exporting an HTML 'report' and firing
 up Mozilla to view / print them. This is less than perfect. Mozilla
 doesn't support the @page directive, so controlling pagination and
 headers / footers is a nightmare.
 
 What options do I have with GTK / Gnome?
 Requirements are basically headers  footers and pagination, and of
 course Perl bindings, but I'll check this out.

I do this by generating latex and using pdflatex to render PDF files.
PDF is handy because it gives you good control over paper size and
orientation. In perl it's something like:

print TEXSOURCE LATEX_END;
\\documentclass{article}
\\usepackage{times}
\\usepackage[none]{hyphenat}
\\usepackage[dvips=false,pdftex=false,vtex=false]{geometry}
\\geometry{
paperwidth=${poster_width}cm,
paperheight=${poster_height}cm,
margin=${inner_margin}cm,
noheadfoot
}
\\usepackage[width=${paper_width}cm,height=${paper_height}cm,center,pdftex]{crop}
\\usepackage[pdftex]{graphicx} 
\\pagestyle{empty} 
\\begin{document}
blah blah blah ${mystuff} etc
\\end{document}
LATEX_END
system pdflatex texsource  cp texsource.pdf $output_dir/${file_name}.pdf;

I'm typsetting posters. If you're just generating A4 or US Letter you
can skip a lot of the  pagesize/margin/rotate stuff.

John
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Running GTK in non-default visual

2004-07-21 Thread matthew . dreezer
Title: Running GTK in non-default visual





Hi,


I am on a project that is looking to use the wxWidgets toolkit for cross platform software development. wxWidgets uses GTK2 when running under Linux or HP-UX.

On HP-UX our current application runs in an 8 bit visual. This is mainly because we are using overlay planes but also for performance reasons as well. Therefore if I run a GTK2 application on HP-UX, GTK, by default creates all its windows in the 8 bit visual. This leads to colour clash problems with our current app. Therefore I have hacked around with the code to make GTK apps run in the visual plane I want them to run in (i.e. 24 bit and TrueColor).

If you are interested in how to do this then please drop me a line at I will mail you back the code changes.


Obviously it would be nice if this sort of thing was built into GTK using the GTK resource files.


Matt Dreezer



___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Aligning widgets adjacent to a drawing area...

2004-07-21 Thread Christer Palm
David J. Singer wrote:
I have an hbox divided into two side-by-side sections.  In the left
section I have a vertical list of gtk text entry boxes (serving as 
editable text labels) and in the right section I have a drawing area.

What I'd like to do is to be able to draw waveforms or traces in the
drawing area that line up with the text entry boxes (which form the 
labels for each trace).  

[snip]
What's the correct way to do this sort of thing?
From your description, it sound as that a GtkTable would do the trick 
for you. If a GtkTable doesn't work out for some reason, you should have 
a look at GtkSizeGroup.

--
Christer Palm
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: changing language for gtk apps. in kde

2004-07-21 Thread sada asd
--- Sven Neumann [EMAIL PROTECTED] wrote:
 Hi,
 
 sada asd [EMAIL PROTECTED] writes:
 
  I would like to change the language settings for
 gtk
  based applications. I'm using kde . Is it possible
 to
  change the language without installing gdm ? I
 would
  like to keep the kdm login screen . 
 
 All you need to do is to change your locale settings
 (a set of
 environment variables described by 'man locale'). I
 don't see how this
 is specific to GTK+, KDE or even your login manager.
 
 
 Sven
 


I'm using fedora core 2 and Gnome is not installed.
All the locale variables are set to es_ES. the LANG
variable is set to es_ES. Still gtk applications are
showing in English instead of Spanish .

-NG





__
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: changing language for gtk apps. in kde

2004-07-21 Thread Sven Neumann
Hi,

sada asd [EMAIL PROTECTED] writes:

 I'm using fedora core 2 and Gnome is not installed.
 All the locale variables are set to es_ES. the LANG
 variable is set to es_ES. Still gtk applications are
 showing in English instead of Spanish .

That should do the trick. Are you sure that the application is
translated at all? Do you have locales generated for es_ES? Are there
any warnings when you start a gtk+ app from a terminal window?


Sven
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Trouble Installing Pango

2004-07-21 Thread Marshall Lake

  While trying to install pango 1.5.1 near the (seemingly) end of
  compilation I get the following errors:
 
  /home/mlake/pango-1.5.1/pango/.libs/libpangoft2-1.0.so: undefined reference to 
  `g_type_instance_get_private'
  /home/mlake/pango-1.5.1/pango/.libs/libpangoft2-1.0.so: undefined reference to 
  `g_type_class_add_private'
  /home/mlake/pango-1.5.1/pango/.libs/libpango-1.0.so: undefined reference to 
  `g_unichar_get_mirror_char'

 These are GLib-2.4 things.  You need GLib-2.4.  I'm sure
 Pango README mentions this dependency.

I successfully installed GLib-2.5 and I'm getting the same errors when
trying to install pango 1.5.1.  The GLib version doesn't have to be
exactly 2.4, does it?

What else could be causing the errors?

-- 
Marshall Lake -- [EMAIL PROTECTED] -- http://mlake.net
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Trouble Installing Pango

2004-07-21 Thread Sven Neumann
Hi,

Marshall Lake [EMAIL PROTECTED] writes:

   While trying to install pango 1.5.1 near the (seemingly) end of
   compilation I get the following errors:
  
   /home/mlake/pango-1.5.1/pango/.libs/libpangoft2-1.0.so:
   undefined reference to `g_type_instance_get_private'
   /home/mlake/pango-1.5.1/pango/.libs/libpangoft2-1.0.so:
   undefined reference to `g_type_class_add_private'
   /home/mlake/pango-1.5.1/pango/.libs/libpango-1.0.so: undefined
   reference to `g_unichar_get_mirror_char'
 
  These are GLib-2.4 things.  You need GLib-2.4.  I'm sure
  Pango README mentions this dependency.
 
 I successfully installed GLib-2.5 and I'm getting the same errors when
 trying to install pango 1.5.1.  The GLib version doesn't have to be
 exactly 2.4, does it?
 
 What else could be causing the errors?

You may have glib = 2.4 installed but are you sure that it is also
used by the linker? Your errors seem to indicate that an older version
of glib is being used.


Sven
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Trouble Installing Pango

2004-07-21 Thread Mark Leisher
Marshall Lake wrote:
[undefined references]
On my system (Slackware 9), the undefined references (started with 2.4) were 
due to libtool adding the older versions of the libraries (in /usr/lib) in 
front of the newer versions (in /usr/local/lib) as part of the link command.

I fiddled with ld.so.config and libtool for days with no success, so I ended 
up editing the *.la files by hand to get everything to link to the proper 
libraries.

There is a newer version of libtool out that may or may not fix the problem.
--
---
Mark Leisher  In a time of drastic change it is the
Computing Research Lablearners who inherit the future. The
New Mexico State University   learned usually find themselves equipped
Box 30001, Dept. 3CRL to live in a world that no longer exists.
Las Cruces, NM  88003   --  Eric Hoffer
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: changing language for gtk apps. in kde

2004-07-21 Thread Sven Neumann
Hi,

sada asd [EMAIL PROTECTED] writes:

 I noticed that when i start the application in
 terminal, the gtk applications show in spanish without
 any errors. Only when I start the application from kde
 menu , the gtk apps show in english . Is there any
 settings that I've missed  ? The LANG variable is set
 to es_ES.UTF-8 . 

Obviously the environment your KDE menu runs in doesn't have LANG set
this way then.


Sven
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Trouble installing GTK+

2004-07-21 Thread Ian Allman
I want to develop Graphical User Interfaces on the Linux Framebuffer. I have downloaded GTK+-2.4.4 andthe necessary glib and pango requirements. 
I configure GTK with
./configure --with-gdktarget=linux-fb
However the make command results in the following errors:


gdkwindow-fb.c:1445: conflicting types for `gdk_window_set_background'
../../gdk/gdkwindow.h:435: previous declaration of `gdk_window_set_background'
make[4]: *** [gdkwindow-fb.lo] Error 1
make[4]: Leaving directory `/home/Downloads/gtk+-2.4.4/gdk/linux-fb'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/Downloads/gtk+-2.4.4/gdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/Downloads/gtk+-2.4.4/gdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Downloads/gtk+-2.4.4'
make: *** [all] Error 2

Does anyone know how to overcome this error? I am installing gtk into a directory preserving my current gtk version but don't believe that this is the source of the problem,
Ian
		 ALL-NEW 
Yahoo! Messenger - so many 
all-new ways to express yourself ___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Trouble installing GTK+

2004-07-21 Thread Jose Miguel Goncalves
Ian Allman wrote:
I want to develop Graphical User Interfaces on the Linux Framebuffer. I 
have downloaded GTK+-2.4.4 and the necessary glib and pango requirements.
I configure GTK with
./configure --with-gdktarget=linux-fb
However the make command results in the following errors:
 

gdkwindow-fb.c:1445: conflicting types for `gdk_window_set_background'
../../gdk/gdkwindow.h:435: previous declaration of 
`gdk_window_set_background'

You need this patch:
diff -Naur gtk+-2.4.4.orig/gdk/linux-fb/gdkwindow-fb.c 
gtk+-2.4.4/gdk/linux-fb/gdkwindow-fb.c
--- gtk+-2.4.4.orig/gdk/linux-fb/gdkwindow-fb.c 2004-07-10 05:02:09.0 +0100
+++ gtk+-2.4.4/gdk/linux-fb/gdkwindow-fb.c  2004-07-15 12:14:05.0 +0100
@@ -1440,7 +1440,7 @@
 }
 void
-gdk_window_set_background (const GdkWindow *window,
+gdk_window_set_background (GdkWindow *window,
   const GdkColor  *color)
 {
   GdkWindowObject *private = (GdkWindowObject *)window;
@@ -2342,3 +2342,10 @@
   return (GdkWindow*) (anid);
 }
+
+void
+_gdk_windowing_window_destroy_foreign (GdkWindow *window)
+{
+
+}
+
Best regards,
José Gonçalves
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Aligning widgets adjacent to a drawing area...

2004-07-21 Thread David J. Singer
On Wednesday 21 July 2004 12:22 pm, Christer Palm wrote:

  From your description, it sound as that a GtkTable would do the trick
 for you. If a GtkTable doesn't work out for some reason, you should have
 a look at GtkSizeGroup.

I have the text label elements on the left hand side in a table already.
The sole drawing area on the righthand side is a separate entity though.
The problem is how to relate the positions of the widgets in the 
table to coordinates in the adjacent drawing area.

It's not easy to explain :-)


-- 
David J. Singer
[EMAIL PROTECTED]
Time flies like an arrow, fruit flies like a banana

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Creating printable reports

2004-07-21 Thread Roger Leigh
Russell Shaw [EMAIL PROTECTED] writes:

 Daniel Kasak wrote:
 Hi all.
 I'm a newbie Perl developer, and I'm part-way through porting our
 database front-ends from Access to Perl / Gtk2 ( running on Linux ).
 We need a few printable reports that I have to rebuild. I've started
 out doing them in a Perl CGI script, exporting an HTML 'report' and
 firing up Mozilla to view / print them. This is less than
 perfect. Mozilla doesn't support the @page directive, so controlling
 pagination and headers / footers is a nightmare.
 What options do I have with GTK / Gnome?
 Requirements are basically headers  footers and pagination, and of
 course Perl bindings, but I'll check this out.
 Any takers?

 Haven't dealt with text processing for a while but there's a few ways:

 - generate the reports directly as TEX or postscript (TEX is hard to learn),
 - generate the reports in a word-processor and embed keywords

I would also mention groff.  This has some advantages over TeX, such
as being single pass, though the output isn't of such high quality.
This means you don't need to bother cleaning up temporary files or
running several times to regenerate cross-references and indices.  For
example:

FILE *output = popen(tbl | groff | lpr -P printqueue, w);
/* lots of fprintf()s to output */
int status = pclose(output);

Of course, the GLib equivalents should be used, rather than this plain
C :-)


-- 
Roger Leigh

Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Aligning widgets adjacent to a drawing area...

2004-07-21 Thread Christer Palm
David J. Singer wrote:
I have the text label elements on the left hand side in a table already.
The sole drawing area on the righthand side is a separate entity though.
The problem is how to relate the positions of the widgets in the 
table to coordinates in the adjacent drawing area.

It's not easy to explain :-)
Oh, OK, I see. There's a single DrawingArea... Unless you can split it 
up, I think the best is to let GTK+ lay out the text labels and then 
check the allocation for the text widgets in your DrawingArea exposure 
handler (that is, at the time you actually do the drawing) for whatever 
position and size GTK+ has chosen for them. That way, you'd make sure 
that you don't interfere with font size, possible wrapping and other 
layout decisions taking place in the label column, possibly dynamically.
I'd still put the DrawingArea into the table with a suitable row span.

gtk_widget_translate_coordinates() with values from each of the text 
labels allocation's and the DrawingArea as the destination should do the 
job, I guess.

--
Christer Palm
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Trouble Installing Pango

2004-07-21 Thread Marshall Lake

  [undefined references]

 On my system (Slackware 9), the undefined references (started with 2.4)
 were due to libtool adding the older versions of the libraries (in
 /usr/lib)  in front of the newer versions (in /usr/local/lib) as part of
 the link command.

 I fiddled with ld.so.config and libtool for days with no success, so I
 ended up editing the *.la files by hand to get everything to link to the
 proper libraries.

 There is a newer version of libtool out that may or may not fix the
 problem.

I installed the latest version of libtool and that didn't help.  So, then
I changed the pertinent .la files (actually just copied over the newer
ones) and all's well.  Thanks for the push in the right direction.

-- 
Marshall Lake -- [EMAIL PROTECTED] -- http://mlake.net
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Aligning widgets adjacent to a drawing area...

2004-07-21 Thread David J. Singer
On Wednesday 21 July 2004 7:30 pm, Christer Palm wrote:

 gtk_widget_translate_coordinates() with values from each of the text 
 labels allocation's and the DrawingArea as the destination should do the 
 job, I guess.

Ah. Right Ok. That's not something I've come across before but I think 
I can see how it might work  Don't suppose you know of an example
of this function's usage anywhere...?

-- 
David J. Singer
[EMAIL PROTECTED]
Time flies like an arrow, fruit flies like a banana

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list