Pango Attributes not being added to list

2013-01-29 Thread Jeff Hallock
Greetings all,

I am using Cairo/Pango to create pdf files. I wrote a functioning script on my 
desktop that correctly formats my Pango text. When transferring the script to 
my the server where it will be executed, my text is not properly formatting. It 
displays the default text format (times new roman, no decorations, no 
fore-ground color, default font size, etc).

I have tracked the issue down to the fact that my Pango::Attr___ objects 
are not being added to the Pango::AttrList when executed on the server. They 
are being added correctly when executing the script on my desktop computer.

I have attached the script which demonstrates that the attributes are in fact 
not being added to the list.

On my desktop, the script produces:
attributes: Pango::AttrFontDesc=SCALAR(0x299ebb4) 
Pango::AttrForeground=SCALAR(0x299ec34)

On the server, the script produces:
attributes:

On a relevant side-note $layout-set_font_description( $font ) works as 
expected on both desktop and server. How this doesn't allow for changing of 
color, underlining, etc.

Anyone have any ideas on what may be going wrong here? I realize the pango 
library is a bit dated, but I can't change it, and it *seems to me* like 
everything I want to use was supported in the version I have. I am not getting 
any error messages.

I've thought of compiling the latest version into another folder - but at a 
cursory googling I see this may not be trivial. Hoping I may be able to get 
some feedback before I head down that road.

Desktop Environment:
Windows 7
Perl 5.16
Pango (library) 1.29.4
Pango (perl binding) 1.223

Server
Red Hat Enterprise Server 5.3
Perl 5.8.8
Pango (library) 1.14.9
Pango (perl binding) 1.223 (also tried with 1.221 )



Thanks for reading or helping if you can!



-  Jeffrey
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


RE: Pango Attributes not being added to list

2013-01-29 Thread Jeff Hallock
Here is the file I forgot to attach.

From: Jeff Hallock
Sent: Tuesday, January 29, 2013 3:30 PM
To: gtk-perl-list@gnome.org
Subject: Pango Attributes not being added to list

Greetings all,

I am using Cairo/Pango to create pdf files. I wrote a functioning script on my 
desktop that correctly formats my Pango text. When transferring the script to 
my the server where it will be executed, my text is not properly formatting. It 
displays the default text format (times new roman, no decorations, no 
fore-ground color, default font size, etc).

I have tracked the issue down to the fact that my Pango::Attr___ objects 
are not being added to the Pango::AttrList when executed on the server. They 
are being added correctly when executing the script on my desktop computer.

I have attached the script which demonstrates that the attributes are in fact 
not being added to the list.

On my desktop, the script produces:
attributes: Pango::AttrFontDesc=SCALAR(0x299ebb4) 
Pango::AttrForeground=SCALAR(0x299ec34)

On the server, the script produces:
attributes:

On a relevant side-note $layout-set_font_description( $font ) works as 
expected on both desktop and server. How this doesn't allow for changing of 
color, underlining, etc.

Anyone have any ideas on what may be going wrong here? I realize the pango 
library is a bit dated, but I can't change it, and it *seems to me* like 
everything I want to use was supported in the version I have. I am not getting 
any error messages.

I've thought of compiling the latest version into another folder - but at a 
cursory googling I see this may not be trivial. Hoping I may be able to get 
some feedback before I head down that road.

Desktop Environment:
Windows 7
Perl 5.16
Pango (library) 1.29.4
Pango (perl binding) 1.223

Server
Red Hat Enterprise Server 5.3
Perl 5.8.8
Pango (library) 1.14.9
Pango (perl binding) 1.223 (also tried with 1.221 )



Thanks for reading or helping if you can!



-  Jeffrey


pdf_test.t
Description: pdf_test.t
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


RE: Pango Attributes not being added to list

2013-01-29 Thread Jeff Hallock
Ok, thanks for looking into this for me Torsten. I will post back to the list 
if I find the answer to my problem.
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Wrapping Text while editing Gtk2::CellRendererText

2010-10-21 Thread Jeff Hallock
I have a CellRendererText that is editable in a TreeView. The issue that I have 
is that while in edit mode, the text doesn't wrap - it is all displayed on one 
line.

I have set_wrap_mode as 'word' and set_wrap_width at 400. The text wraps fine 
except when editing. Is this possible or do I need to implement a custom cell 
renderer?

Thanks for the help.

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


RE: Wrapping Text while editing Gtk2::CellRendererText

2010-10-21 Thread Jeff Hallock

I have a CellRendererText that is editable in a TreeView. The issue that I 
have is that while in edit mode, the text doesn't wrap - it is all displayed 
on one line.

I have set_wrap_mode as 'word' and set_wrap_width at 400. The text wraps fine 
except when editing. Is this possible or do I need to implement a custom cell 
renderer?

Thanks for the help.

-Jeff

Here is cell renderer I wrote that handles multi-line text
1) The wrap-width of the cell-renderer is automatically adjusted to fill/shrink 
the available space in the cell
2) Editing is done using a TextView widget instead of an Entry widget

It's on cpan

Muppets customrenderer.pl in the examples directory helped


Gtk2-Ex-CellRendererWrappedText-0.02.tar.gz
Description: Gtk2-Ex-CellRendererWrappedText-0.02.tar.gz
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


RE: Wrapping Text while editing Gtk2::CellRendererText

2010-10-21 Thread Jeff Hallock
This one actually...

I have a CellRendererText that is editable in a TreeView. The issue that I 
have is that while in edit mode, the text doesn't wrap - it is all displayed 
on one line.

I have set_wrap_mode as 'word' and set_wrap_width at 400. The text wraps fine 
except when editing. Is this possible or do I need to implement a custom cell 
renderer?

Thanks for the help.

-Jeff

Here is cell renderer I wrote that handles multi-line text
1) The wrap-width of the cell-renderer is automatically adjusted to 
fill/shrink the available space in the cell
2) Editing is done using a TextView widget instead of an Entry widget

It's on cpan

Muppets customrenderer.pl in the examples directory helped


Gtk2-Ex-CellRendererWrappedText-0.02.1.tar.gz
Description: Gtk2-Ex-CellRendererWrappedText-0.02.1.tar.gz
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


RE: fetch and display data in the form of a table

2010-07-29 Thread Jeff Hallock
Take a look at the TreeView and related widgets.

From: gtk-list-boun...@gnome.org [mailto:gtk-list-boun...@gnome.org] On Behalf 
Of love nglory
Sent: Thursday, July 29, 2010 3:05 PM
To: gtk-list@gnome.org
Subject: fetch and display data in the form of a table

Hi everyone,

Is there any way I can display data in the form of a table in gtk.

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


RE: Doubts about creating a new widget

2010-07-12 Thread Jeff Hallock
Hmmm…. I able to find one immediately by googling “gtk expander screenshot”. 
Who’d a thought…

You can also always give it a try yourself…


From: gtk-list-boun...@gnome.org [mailto:gtk-list-boun...@gnome.org] On Behalf 
Of CaStarCo
Sent: Monday, July 12, 2010 2:46 PM
To: gtk-list@gnome.org
Subject: Re: Doubts about creating a new widget

Thanks Nicola :D ,

i haven't found any screenshot of GtkExpander widget, there is any screenshot 
in any place?

2010/7/12 Nicola Fontana n...@entidi.itmailto:n...@entidi.it
Il giorno Mon, 12 Jul 2010 14:19:12 +0200
CaStarCo casta...@gmail.commailto:casta...@gmail.com ha scritto:

 Hello, my name is Andreu and i'm new in this list.

 I have a doubt about if I should create a new widget or if there is a widget
 that could supply my needs.

 I'll describe what I need: I want to make a left column in the window with
 flat toggle buttons (with the 100% of the column width) that, when I press
 one of the buttons then the buttons that are below than it should go down to
 give space to a icon list with a vertical scroll bar.

 I need it to sort the elements in a diagram editor that i'm programming.
From what I understood, I'd use GtkExpander.

--
Nicola



--
- Per la llibertat del coneixement -
- Per la llibertat de la ment...   -
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


RE: Printing/Creating PDf/Postscript

2010-06-04 Thread Jeff Hallock

The issue is that Cairo::PdfSurface and Cairo::PsSurface default to using 
points as the unit, while Gtk2::PrintOperation defaults to using pixels as the 
unit.

The solution is simply  to say

$po-set_unit('points');



From: Jeff Hallock
Sent: Thursday, June 03, 2010 11:22 AM
To: gtk-perl-list@gnome.org
Subject: Printing/Creating PDf/Postscript

I am attempting to create reports using Gtk2/Cairo/Pango.  My reports should be 
able to write to a print operation, or
a cairo surface. This seems simple enough - just pass  in the Cairo context you 
want to write to.  The problem I am running into is when draw text on a context 
from a  print operation - the text appears extremely tiny on the page (look at 
print_op.pdf).

When drawing to a Cairo Surface - the output is as expected (see 
surface.pdf/surface.ps).

surface_po_diff.pl is the script that created these files so you can run it 
yourself.

What is going on here?

How can write this code, so the print_text function prints the same size on the 
print operation and a cairo surface that I create myself.


Thanks in advance for any input!


-  Jeffrey Ray



# prints to print driver - text is tiny
my $window = Gtk2::Window-new;
my $po = Gtk2::PrintOperation-new;
$po-set_n_pages( 1 );

$po-signal_connect('draw-page' = sub {
my ($po, $print_context, $number) = @_;
my $cr = $print_context-get_cairo_context;
print_text($cr);
});
$po-run('print-dialog', $window);



# creates a pdf file, text is large
my $surface = Cairo::PdfSurface-create ( 'surface.pdf', 612, 792);
my $cr = Cairo::Context-create( $surface );
print_text($cr);
$cr-show_page;
$surface-finish;

# creates a ps file, text is large
$surface = Cairo::PdfSurface-create ( 'surface.ps', 612, 792);
$cr = Cairo::Context-create( $surface );
print_text($cr);
$cr-show_page;
$surface-finish;



sub print_text {
my $cr = shift;

my $layout = Pango::Cairo::create_layout( $cr );
$layout-set_markup( 'Foo:Bar' );

my $attrlist = Pango::AttrList-new;
my $font = Pango::AttrFontDesc-new( 
Pango::FontDescription-from_string('calibri,arial 10') );
$attrlist-insert($font);
$layout-set_attributes( $attrlist );

Pango::Cairo::update_layout( $cr, $layout );
Pango::Cairo::show_layout( $cr, $layout );
}

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


RE: How to apply a theme to a perl gtk program

2010-05-20 Thread Jeff Hallock
I use the theme selector available here: 
http://gtk-win.sourceforge.net/home/index.php/Downloads , the file you want is 
gtk2-themes-2009-09-07-ash.exe

Install this into the directory which you have installed Perl (on my system the 
path is C:\camelbox).

I ship my entire perl directory with my application – so the end user will have 
the themes installed. You can then give the user access to the C:\perl 
path\gtk2_prefs.exe where they can change the look and feel of all Gtk2 apps 
on their system - OR – to force your application to load a particular theme, 
use this code early in your program,  replacing “Unity” with whatever theme you 
wish to:

my $mod   = Gtk2::RcStyle-new;
$mod-Gtk2::Rc::parse_string(
qq[
gtk-theme-name = Unity
style user-font
{
font_name=Sans 10
}
widget_class * style user-font
]);




From: gtk-perl-list-boun...@gnome.org [mailto:gtk-perl-list-boun...@gnome.org] 
On Behalf Of Dan
Sent: Monday, April 12, 2010 5:23 AM
To: Xi Yang
Cc: gtk-perl-list@gnome.org
Subject: Re: How to apply a theme to a perl gtk program


On Mon, 12 Apr 2010 02:00:04 +, Xi Yang jianding...@msn.com wrote:
In platforms running in Gnome desktop, a perl Gtk program will have the native 
look, using the theme currently used by Gnome. However, while the script is 
running in windows, the default skin is boring. So, how to let a perl-gtk 
program use some theme other than default one?

I've had problems with this too. The best luck I've had is with Alex Shaduri's 
packages at: http://gtk-win.sourceforge.net/home/index.php/en/Home and 
ActiveState's Perl. Alex's packages have some decent themes and also a theme 
chooser.

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


Gtk2::Assistant and Button Access

2009-11-24 Thread Jeff Hallock
How to remove a button from the assistant:


It took me a while - but I figured it out.

I wanted to remove the 'Last' button from a Gtk2::Assistant - and couldn't 
figure out how to get access to the buttons. I found this

http://old.nabble.com/Gtk2%3A%3AAssistant%3A-Access-to-Buttons-td11415772.html#a11415772

The accessors were added - http://cpansearch.perl.org/src/TSCH/Gtk2-1.180/NEWS

But never documented - 
http://gtk2-perl.sourceforge.net/doc/pod/Gtk2/Assistant.html

Is there someplace else I should be looking?



The accessors are   get_*button-name*_button

So:

$assistant-get_next_button
$assistant-get_last_button
$assistant-get_previous_button
$assistant-get_close_button
...


Hope this helps.

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


RE: Gtk2::MessageDialog title

2009-11-22 Thread Jeff Hallock

 Of course.  Gtk2::MessageDialog isa Gtk2::Dialog isa Gtk2::Window, so just 
 just
 Gtk2::Window::set_title().  See below.

I did actually look at Gtk2::Dialog but didn't see it there either.  Should 
have just kept moving up?/down? the hierarchy.


It is in Gtk2::Window - the parent of Gtk2::Dialog

http://library.gnome.org/devel/gtk/stable/GtkDialog.html#GtkDialog.object-hierarchy




 But beware that the gnome human interface guidelines say that alert windows
 should have no title, as the title would normally just duplicate the text of 
 the
 message...  so, depending on what you're doing, you might actually want to 
 blank
 out the title.

 http://library.gnome.org/devel/hig-book/stable/windows-alert.html.en



Thank you very much for this, will check out the rest of the HIG to make sure 
I'm staying on track.


 For each widget in Gtk2 there is a man page; each man page has a HIERARCHY
 section, which shows the class ancestry for that type. Or you can look at 
 the C
 api reference on gtk.org, which has the same info in a different format.

Wasn't aware I could also refer to the C api reference.  Thanks again.


I prefer using the C api reference - 
http://library.gnome.org/devel/gtk/stable/index.html.
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


RE: Gtk2::TreeModel - foreach

2009-11-20 Thread Jeff Hallock


-Original Message-
From: Martin Schlemmer [mailto:martin.schlem...@nwu.ac.za]
Sent: Friday, November 20, 2009 6:48 AM
To: gtk-perl-list@gnome.org; Martin Schlemmer; Jeff Hallock; Zettai Muri
Subject: Re: Gtk2::TreeModel - foreach

 On 2009/11/20 at 11:41 AM, Zettai Muri zettaim...@ymail.com wrote:
 I was just wondering, is there a return value of some sort or a way to
 get the return TRUE from the search sub, so that it is possible to then
 do something like:

 if ( $model-foreach(\search, 'Bob') )
 {
 print (Welcome back!\n);
 }
 else
 {
 print (Who are you?\n);
 }

 I have tried the above but my output is always:
 FOUND
 Who are you?


Use pass a hash or other reference to the foreach():


Or here is an alternative that doesn't use the foreach method.


sub search {
my ($model, $search_string) = @_;
my $iter  = $model-iter_first;
my $found;

do {
  if ($model-get($iter, 0) ~= /$search_string/) {
 $found = 1;
  } else {
 $iter  = $model-iter_next;
  }
} while (! $found  $iter);

return $found;
}


if ( search($model, 'bob') ) {
print (Welcome back!\n);
} else {
   print (Who are you!\n);
}






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


RE: Gtk2::TreeModel - foreach

2009-11-19 Thread Jeff Hallock


-Original Message-
From: gtk-perl-list-boun...@gnome.org [mailto:gtk-perl-list-boun...@gnome.org] 
On Behalf Of Zettai Muri
Sent: Thursday, November 19, 2009 3:56 PM
To: Martin Schlemmer; gtk-perl-list@gnome.org
Subject: Re: Gtk2::TreeModel - foreach



  Not exactly sure what you want, but attached is an example for a
  Gtk2::ListStore's foreach.

Where does the $user_data (scalar) part of the method come into play?
Is it possible to get an extended example that shows how this is used?

$model-foreach(
sub {
my($model,$path,$iter) = @_;
my($item)  = $model-get($iter, 0);

print $item\n;

# return TRUE to end
return FALSE;
}, $user_data --- ???
);

Is this data within the ListStore or some other data passed to the method?  
How does the method act on this data?

Again thanks for the help.


If you supply $user_data - then you it will be passed in as the last argument 
to the ForEach function.



$model-foreach(
sub {
my($model,$path,$iter,$user_data -) = @_;
my($item)  = $model-get($iter, 0);

print $item\n;

# return TRUE to end
return FALSE;
}, $user_data --- ???
);


Here is an example that searches for a name in model:

sub search {
my($model,$path,$iter,$search_string) = @_;
  my($item) = $model-get($iter, 0);

if ($item =~ /$search_string/) {
  print FOUND\n;
  return TRUE;
  }
  else {
  return FALSE;
  }
}

$model-foreach(\search, 'Bob');
$model-foreach(\search, 'Billy');




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


RE: Multiple menu popups with a single Gtk2::SimpleList

2009-10-27 Thread Jeff Hallock

From: gtk-perl-list-boun...@gnome.org [mailto:gtk-perl-list-boun...@gnome.org] 
On Behalf Of MICHAEL MCGINN
Sent: Monday, October 26, 2009 8:32 PM
To: gtk-perl-list@gnome.org
Subject: Multiple menu popups with a single Gtk2::SimpleList

Hi,

I'm trying to display a popup menu in a Gtk2::SimpleList which can have 
different menu choices depending on the data in the Gtk2::SimpleList.

The menu popup choices are driven by the value selected from a Gtk2::ComboBox. 
There is a signal on the combobox that runs the popup sub below when the value 
changes.

The first time the popup menu is invoked it displays correctly; displaying the 
appropriate popup menu. The next time I select a different value from the 
Gtk2::ComboBox and right click it a row in the Gtk2::SimpleList, it continues 
to show the old popup in addition to the new one.

It's seems the Gtk2::SimpleList won't let go of menus you associate.

Here is a sample code snippet of what's not working.
sub popup {

my $menu;

if ($type eq 'type1') {
   $menu = Gtk2::Menu-new();
   my $menu_item = Gtk2::MenuItem-('Properties');
   $menu_item-signal_connect(activate = sub {
   # do something
   });

   $menu-append($menu_item);

} elsif ($type eq 'type2') {
   $menu = Gtk2::Menu-new();
   my $menu_item = Gtk2::MenuItem-('View');
   $menu_item-signal_connect(activate = sub {
   # do something else
   });

   $menu-append($menu_item);
}

$simple_list =signal_connect('button-press-event' = sub {
   my ($widget, $event) = @_;
   return FALSE unless $event-button eq 3;

 $menu-popup (
   undef,
   undef,
   undef,
   undef,
   $event-button,
   $event-time);
}

$menu-show_all;

}

Correct, every time you call signal_connect, you are adding another callback to 
be executed when the event happens.
You could try creating two menus, the decide which one to show in the callback.

my $menu1 = ...
my $menu2 = ...


$simple_list =signal_connect('button-press-event' = sub {
  my ($widget, $event) = @_;
  return FALSE unless $event-button eq 3;

  if ( some condition ... ) {
   $menu1-popup (
   undef,
   undef,
   undef,
   undef,
   $event-button,
   $event-time
 );
  }
  else {
   $menu2-popup (
   undef,
   undef,
   undef,
   undef,
   $event-button,
   $event-time
 );
  }

}


It's also worth noting you can disconnect signals.

my $handler_id = $simple_list =signal_connect('button-press-event' = sub { 
... });
$simple_list-signal_disconnect($handler_id);
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Gtk2::Ex::DateEntry and Gtk2::Ex::TimeEntry

2009-10-14 Thread Jeff Hallock
Attached are two modules that I have recently finished - one for entering times 
and one for entering dates.

Users can select and modify individual components of the date/time using the 
left, right, up and down keys.  When a user sets the value by typing directly 
into the entry, the text will be parsed and transformed into a valid date/time 
- which enables users to type 2pm and have it result in 02:00 PM in the widget. 
See documentation for more details.

Comments/suggestions/etc... welcome!


Gtk2::Ex::TimeEntry is already available on CPAN.

I just registered Gtk2::Ex::DateEntry - so it should be available in the near 
future.


Hope these can be of use!


Gtk2-Ex-DateEntry-0.01.rar
Description: Gtk2-Ex-DateEntry-0.01.rar


Gtk2-Ex-TimeEntry-0.05.rar
Description: Gtk2-Ex-TimeEntry-0.05.rar
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


RE: Problem installing gtk-perl on windows (XP)

2009-05-21 Thread Jeff Hallock
I suggest installing camelbox - look for it on google. The binaries on that 
site are pretty dated. Camelbox is actively maintained and installation is 
trivial.

Jeffrey Hallock

Data Processing Programmer

WBA Market Research

2191 Defense Highway, Suite 401

Crofton, MD  21114

Phone:  (607) 330-5300 x318

Fax:  (607) 273-0295

 WBA_Logo RGB



This email may contain information that is confidential or privileged.  If you 
are not the intended recipient, any use, disclosure, copying or distribution of 
this message or any attachments is strictly prohibited.  If you have received 
this message in error, please notify the sender and destroy any and all copies. 
 Thank you.


 -Original Message-
 From: gtk-perl-list-boun...@gnome.org [mailto:gtk-perl-list-
 boun...@gnome.org] On Behalf Of Mike Martin
 Sent: Thursday, May 21, 2009 10:44 AM
 To: gtk-perl-list@gnome.org
 Subject: Problem installing gtk-perl on windows (XP)

 Hi I am trying to install packages from http://lostmind.de/gtk2-perl/

 However when I try to install with ppm I

 PPD does not support this platform

 any ideas (Gtk ,glib runtime, and activestate perl installed fine)
 ___
 gtk-perl-list mailing list
 gtk-perl-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-perl-list

 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 8.5.339 / Virus Database: 270.12.36/2126 - Release Date: 05/21/09
 06:22:00
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


RE: gktimageview on windows

2009-03-16 Thread Jeff Hallock
This topic (and solution) was recently discussed on the camelbox mailing list.

Jeffrey Hallock
Data Processing Programmer
WBA Market Research
2191 Defense Highway, Suite 401
Crofton, MD  21114
Phone:  (607) 330-5300 x318
Fax:  (607) 273-0295
[cid:image001.jpg@01C9A63C.8A708BD0]
This email may contain information that is confidential or privileged.  If you 
are not the intended recipient, any use, disclosure, copying or distribution of 
this message or any attachments is strictly prohibited.  If you have received 
this message in error, please notify the sender and destroy any and all copies. 
 Thank you.

From: gtk-perl-list-boun...@gnome.org [mailto:gtk-perl-list-boun...@gnome.org] 
On Behalf Of Jamie Lahowetz
Sent: Friday, March 13, 2009 4:30 PM
To: gtk-perl-list@gnome.org
Subject: gktimageview on windows

How can I gt this on windows so that I can install Gtk2::Imageview?

--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jrl9...@huskers.unl.edumailto:jrl9...@huskers.unl.edu

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.237 / Virus Database: 270.11.13/1999 - Release Date: 03/13/09 
05:59:00
inline: image001.jpg___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


CamelBox Error - Entry Point Not Found

2009-01-09 Thread Jeff Hallock
After installing the latest version of CamelBox and attempting to run 
gyroscope.pl, I get this error:

Entry Point Not Found

The procedure entry point g_bookmark_file_error_quark could not be located in 
the dynamic link library libglib-2.0-0.dll.

I am running XP SP3. Prior to installing Camelbox, I had been using 
distribution for activstate located at http://www.lostmind.de/gtk2-perl/ . 
After initially receiving this error (yes, I was running perl from 
C:/camelbox/bin) I uninstalled that installation and then reinstalled CamelBox 
to see if that would correct the problem. No avail.

I received a similar error when I tried to run this from my home computer, 
which runs Vista Home.

Has anyone else experienced this or have a solution?


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


Combo Box Setup

2008-10-21 Thread Jeff Hallock
I'm hoping that this is possible with the ComboBox widget. What I want is to 
display different text in the drop-down than what is displayed when an entry is 
selected.

Example:

--
|   PROJECT TITLE   | \/ |
--
--
|   PROJECT TITLE|
| Brief Description  |
||
|   PROJECT TITLE|
| Brief Description  |
--

Also, can anyone clue me in on the functionality of the row_span_column and 
columns_span_column - no behavior change was apparent to me.
Jeffrey Hallock
Data Processing Programmer
WBA Market Research
2191 Defense Highway, Suite 401
Crofton, MD  21114
Phone:  (607) 330-5300 x318
Fax:  (607) 273-0295
[cid:image001.jpg@01C9339A.E8511D60]
This email may contain information that is confidential or privileged.  If you 
are not the intended recipient, any use, disclosure, copying or distribution of 
this message or any attachments is strictly prohibited.  If you have received 
this message in error, please notify the sender and destroy any and all copies. 
 Thank you.

inline: image001.jpg___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


RE: Signals for combobox entry

2008-10-07 Thread Jeff Hallock
Here are two examples that will exhibit the behavior you desire:

my $combo = Gtk2::ComboBoxEntry-new;
$combo-signal_connect(changed = \changed);
$combo-signal_connect('focus-out-event' = \focus_out);

sub changed
{
my $combo = shift;
$combo-{changed} = TRUE;
}

sub focus_out
{
my $combo = shift;
# commit to database if $combo-{changed};
$combo-{changed} = FALSE;
}


my $combo = Gtk2::ComboBoxEntry-new;
$combo-signal_connect('focus-in-event'  = \focus_in);
$combo-signal_connect('focus-out-event' = \focus_out);

sub focus_in
{
my $combo = shift;
$combo-{check} = $comb-get_active_text;
}

sub focus_out
{
my $combo = shift;
# commit to database if $combo-{check} ne $comb-get_active_text;
$combo-{check} = '';
}



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Howorth
Sent: Tuesday, October 07, 2008 9:42 AM
To: gtk-perl-list@gnome.org
Subject: Re: Signals for combobox entry

Mike Martin wrote:
 however for the comboboxentry, changed isnt acceptable as it fires on
 every change (runs database query so not good performance)

 No keypress events seem to be generated for CBE so are there any other
 approaches that will fire only when whole field has been updated?

Connect to the changed signal of its Entry child?

Cheers, Dave
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: Subclassing Gtk2::GladeXML

2008-08-21 Thread Jeff Hallock
 I was sub-classing Gtk2::GladeXML (I have a print dialog for a large
 number of reports, each report has its own 'options' dialog it can
 display - which I have all in 1 glade file that I want to keep
 separate from the rest of the program, and want to create some helper
 functions that I want to access through the glade object.

 The issue I ran into (and was able to solve) is that after sub-
 classing Gtk2::GladeXML, I can't say

 $self-get_widget('winReports');

 I get an undefined value returned. However, if say it as so... it works
 just fine.

 Gtk2::GladeXML::get_widget($self, 'winReports');

 Is this a bug or is does this operate this way for a specific reason?

A minimal example that exhibits this problem would go a long way towards the 
answer.  The immediate question i have is are you writing the code in some 
odd way that causes the object to be blessed incorrectly?

Here is the beginning lines of the module.

package GTIMs::GUI::Dialog::Report;
use warnings;
use strict;
use Carp qw/carp cluck/;

use GTIMs;
use Glib qw(TRUE FALSE);
use Gtk2;
use Gtk2::GladeXML;
use Gtk2::Ex::DateEntry;
use base qw(Gtk2::GladeXML);

sub new {
my $class = shift;
my $self = bless Gtk2::GladeXML-new('lib/widgets/dlg_report.glade'), 
$class;
$self-signal_autoconnect_from_package($class);

$self-get_widget('winReports')-{GUI} = $self;
$self-do_winReports_date_widgets_setup;
$self-do_winReports_treeView_setup;
$self-do_winReports_treeView_populate;

return $self;
}

I can get away with this, and get the behavior that I want. The no warnings; 
use warnings; statements because I get a warning that get_widget has been 
redefined...

no warnings;
sub get_widget
{
my ($self, $widget) = @_;
Gtk2::GladeXML::get_widget($self, $widget);
}
use warnings;


Im running windows 32, GTK+/Win32 Runtime Environment 2.8.20-1, ActiveState 
Perl 5.8.8 build 819. (The distribution from lostmind.de/gtk-perl/)
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


RE: Re: Subclassing Gtk2::GladeXML

2008-08-21 Thread Jeff Hallock
I've figured it out. I did have get_widget redefined in the package GTIMs. (It 
was exported).
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Resource for building custom models

2008-06-26 Thread Jeff Hallock
I have a custom TreeView in which I want to implement both a filter and sorting 
functionality. Unfortunately Gtk2::TreeStore does not implement 
Gtk2::TreeModelFilter. Currently, I get around this by overriding the following 
routine in my custom TreeView.

sub set_model
{
my ($self, $model) = @_;

$self-{model} = $model;
$self-{filter_model} = Gtk2::TreeModelFilter-new($model);
$self-{filter_model}-set_visible_func(\_visible_func, $self);
$self-{sort_model} = Gtk2::TreeModelSort-new($self-{filter_model});
$self-Gtk2::TreeView::set_model($self-{sort_model});
}

I would like to create a custom model so I don't need to use this hack. I have 
looked around for information on this - but it is sparse - and that I do find 
is not all that informative. Does anyone know of a resource that I can use to 
learn how to do this?
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Drag Drop Icons Not Displaying (Windows)

2008-05-08 Thread Jeff Hallock
My drag and drop icons appear as black silhouettes of what they actually should 
be.

I'm curious to know if I am doing something wrong, or is this something that 
other windows Gtk2-Perl users have experienced as well, or possible that this 
is a bug that has since been resolved. I am using the installation available 
from http://www.lostmind.de/gtk2-perl/ and running windows XP. I have tested 
this on two machines - however they both used the packages from the site above 
and both run WindowsXP.

Is anyone else using this installation and experiencing/not experiencing this 
problem?

 Here is a snippet of code that generates the issue:

$treeview-drag_source_set(['button1_mask'],['copy','move'],{target = 
'STRING', flags = [], info = 0});
$treeview-signal_connect('drag-data-get', 
\on_winScheduler_treeEmployee_drag_data_get);
$treeview-drag_source_set_icon_stock('gtk-dnd-multiple');



This email may contain information that is confidential or privileged.  If you 
are not the intended recipient, any use, disclosure, copying or distribution of 
this message or any attachments is strictly prohibited.  If you have received 
this message in error, please notify the sender and destroy any and all copies. 
 Thank you.

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


re: Displaying console output

2008-04-22 Thread Jeff Hallock

You can put this line throughout your code or in a loop to update pending 
events (This is also good to use for updating progress bars.)

# Run the main loop as long as events are pending
Gtk2-main_iteration while ( Gtk2-events_pending );


You can also use POE (Perl Object Environment) which allows your program to 
multitask.


Message: 1
Date: Mon, 21 Apr 2008 17:12:51 -0700 (PDT)
From: Thomas Rosario [EMAIL PROTECTED]
Subject: Displaying console output
To: gtk-perl-list@gnome.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii

Hi All,

I'm trying to build a GUI to show console output of an existing application. 
What I've done is 'clicked' signal_connect from Gtk2::Button will execute the 
application and save the output into a Gtk2::TextBuffer which will be displayed 
in Gtk2::TextView.

At the moment, if the button is pressed, the whole GUI will 'freeze' and after 
the application execution is finished, the complete output is displayed. My 
question is, how can it be done so textview will be updated in real time with 
the console output instead of waiting the whole execution to be finished.

Many Thanks!


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


Re: Textview not scrolling in Client

2008-04-18 Thread Jeff Hallock
Just came across this at 
http://live.gnome.org/GTK2-Perl/FrequentlyAskedQuestions#head-ca3eac3d2016b4893bea39bcf1c1b3565ce450ad

This should make sure that every time you add text to the widget,it is scrolled 
to the bottom.

# create a mark at the end of the buffer, with right gravity,
# so that when you insert text, the mark always stays on
# the right (at the end).
my $end_mark = $buffer-create_mark ('end', $buffer-get_end_iter, FALSE);
# every time we insert text, scroll to that mark.
$buffer-signal_connect (insert_text = sub {
$textview-scroll_to_mark ($end_mark, 0.0, TRUE, 0.0, 1.0);
});


On Apr 14, 2008, at 18:41, Jamie Lahowetz wrote:
 I have been struggling with this and I just cant seem to figure what
 the problem is. I have this IRC client that wont scroll far enough
 down to show the full text. Its rather hard to explain but I'll give
 it a try:
 when you get down to the bottom on the textview and you go to enter
 a message such as:
 John(10:00:00) I have to go to the story today and get some fruit.
 And this message is the last one to be entered before the bottom of
 the window therefore causing it to have to scroll down, the program
 only shows the first line:
 John(10:00:00) I have to go to the story
 Forcing the user to scroll down to view the rest:
 today and get some fruit.
 You can see that this would be a problem when users are chatting,
 having to always take your attention off of the session just to
 scroll down and view the whole message. Currently the program uses
 the code $chat_textview-scroll_to_mark where mark is defined as the
 end iter of the buffer. I cant figure how to get this to work and
 show the whole text without the user having to manually scroll down.
 I am wondering if the word wrapping is causing it since this
 behavior is true for a single unwrapped line. I would appreciate any
 help on this since it seems like such a simple thing and I cant
 figure it.

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