Re: Tutorial perl-Gtk3 and Windows/MSys

2021-07-20 Thread Mike Martin via gtk-perl-list
. # got: undef # expected: 'CODE(0x20a7dea97b0)' On Mon, 19 Jul 2021 at 14:25, Mike Martin wrote: > Further info (gcc wasnt installed) > > "C:\msys64\mingw64\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- > Glib.bs blib\arch\auto\Glib\Glib.bs 644 >

Re: Tutorial perl-Gtk3 and Windows/MSys

2021-07-19 Thread Mike Martin
ghal wrote: > On 2021-07-17 at 15:19:25 +0100, Mike Martin via gtk-perl-list wrote: > > Hi I am struggling with this, been trying to install on mingw64 for a > week. > > > > Anyone had any joy recently? > > various issues tried compiling one by one and glib fails wi

Re: Tutorial perl-Gtk3 and Windows/MSys

2021-07-19 Thread Mike Martin
o] Error 1 On Mon, 19 Jul 2021 at 12:36, Mike Martin wrote: > Thanks for this. > I am sill getting an issue, it seems to be an oddity with paths > > from cpanm build.log > > [ CC Glib.c ] > process_begin: CreateProcess(NULL, gcc -c -I. -mms-bitfields > -IC:/msys64/mingw64/i

Re: Tutorial perl-Gtk3 and Windows/MSys

2021-07-19 Thread Mike Martin via gtk-perl-list
o] Error 1 On Mon, 19 Jul 2021 at 12:36, Mike Martin wrote: > Thanks for this. > I am sill getting an issue, it seems to be an oddity with paths > > from cpanm build.log > > [ CC Glib.c ] > process_begin: CreateProcess(NULL, gcc -c -I. -mms-bitfields > -IC:/msys64/mingw64/i

Re: Tutorial perl-Gtk3 and Windows/MSys

2021-07-19 Thread Mike Martin via gtk-perl-list
ghal wrote: > On 2021-07-17 at 15:19:25 +0100, Mike Martin via gtk-perl-list wrote: > > Hi I am struggling with this, been trying to install on mingw64 for a > week. > > > > Anyone had any joy recently? > > various issues tried compiling one by one and glib fails wi

Re: Tutorial perl-Gtk3 and Windows/MSys

2021-07-17 Thread Mike Martin via gtk-perl-list
Hi I am struggling with this, been trying to install on mingw64 for a week. Anyone had any joy recently? various issues tried compiling one by one and glib fails with symbols error (using cpanm) On Thu, 8 Jun 2017 at 12:31, wrote: > Hello everybody, > > I have created a little tutorial about

Using Gtk macros

2019-09-06 Thread Mike Martin via gtk-perl-list
How do I use Gtk macros in perl-gtk? eg in c GTK_IS_CONTAINER(widget) What is the corresponding method in perl-gtk thanks ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Strange issue with cell_data_func and Gtk3::FileSelectionDalog

2019-05-08 Thread Mike Martin via gtk-perl-list
I am getting annoying G_IS_ObJECT warnings when I have a cell_data_function my $cellfunc1=$widgete{controlview}->get_column(1)->get_cells; $widgete{controlview}->get_column(1)->set_cell_data_func ($cellfunc1, sub { my ($column, $cell, $model, $iter,$cellfunc1) = @_; my

Tree view toggle and gtypes

2019-05-01 Thread Mike Martin via gtk-app-devel-list
Are there any gtypes that are compatible with both toggle and text renderers? Thanks ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Using different signals depending on which row of of a treeview

2019-05-01 Thread Mike Martin
/renderer) On Mon, 29 Apr 2019 at 22:57, Reuben Rissler wrote: > > > On 04/29/2019 10:36 AM, Mike Martin via gtk-app-devel-list wrote: > > Has anyone done anything like this? > I haven't, but you are welcom

Re: Using different signals depending on which row of of a treeview

2019-04-30 Thread Mike Martin via gtk-app-devel-list
/renderer) On Mon, 29 Apr 2019 at 22:57, Reuben Rissler wrote: > > > On 04/29/2019 10:36 AM, Mike Martin via gtk-app-devel-list wrote: > > Has anyone done anything like this? > I haven't, but you are welcom

Using different signals depending on which row of of a treeview

2019-04-29 Thread Mike Martin via gtk-app-devel-list
Has anyone done anything like this? Basically the idea is that I push multiple renderers into a treeview column , then depending on the row hide/show the appropriate renderer (text, combo, toggle) Then call the appropriate signal_connect (edited, changed, toggled)

Re: G_IS_OBJECT (object)' failed at /usr/share/perl5/vendor_perl/Gtk3.pm line 546 gtk-perl x

2019-04-24 Thread Mike Martin via gtk-perl-list
When I tried running my program from gdb I got an error about program type, when I attached gdb to a running instance no widgets were responsive On Wed, 17 Apr 2019 at 14:36, Emmanuele Bassi wrote: > On Wed, 17 Apr 2019 at 14:11, Mike Martin via gtk-perl-list < > gtk-perl-list@gnome.o

G_IS_OBJECT (object)' failed at /usr/share/perl5/vendor_perl/Gtk3.pm line 546 gtk-perl x

2019-04-17 Thread Mike Martin via gtk-perl-list
I've now got this dreaded message. Is there any way to find out which line is triggering it? thanks Mike ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Re: TreeView - set border on individual cells

2019-04-05 Thread Mike Martin via gtk-app-devel-list
On Fri, 5 Apr 2019, 12:36 Mike Martin, wrote: > Update, I worked out how to get rid of highlight > > 1 treeview->set selection mode(none) > 2 treeview->signal_connect(row_activated =>sub{ > Treeview->set_cursor_on_cell(path,column,cell,true) > } > ) > &

Re: TreeView - set border on individual cells

2019-04-05 Thread Mike Martin
nd out about borders though On Fri, 5 Apr 2019, 08:03 , wrote: > Am Donnerstag, den 04.04.2019, 23:04 +0100 schrieb Mike Martin via gtk- > app-devel-list: > > Is this possible? > > > > I did originally plan to have certain cells have a background colour > > to >

TreeView - set border on individual cells

2019-04-04 Thread Mike Martin via gtk-app-devel-list
Is this possible? I did originally plan to have certain cells have a background colour to emphasize that there is a value to change. However as soon as the row is selected this is all wiped out by the highlight from selected row So is it possible to set the borders on a cell by cell basis, all I

Re: Problem with grids and items spanning more than one column

2019-04-04 Thread Mike Martin
I resolved it by applying set_halign('start') to only the textview in the layout Looks like some interaction between the textview and the multicolumn liststore On Wed, 3 Apr 2019 at 12:53, Reuben Rissler wrote: > On 04/02/2019 05:09 AM, Mike Martin via gtk-app-devel-list wrote: > > I

Setting attributes per cell in treeview (list store)

2019-04-03 Thread Mike Martin via gtk-app-devel-list
Hi I have a simple tree view based on a list store What is the best way to set attributes per row/column is for a specific cell not for a row or column? Basically it is used to set various options and some cells are not used, so I want them to be non-activatable /selectable to prevent any

Problem with grids and items spanning more than one column

2019-04-02 Thread Mike Martin
I am using an embedded Gtk grid within a grid , which contains numerous widgets However if I have a widget that spans more than one column it messes up the layout of all other widgets , which seem to position themseleves randomly along the width of this widget, causing horribly jagged widget

Problem with grids and items spanning more than one column

2019-04-02 Thread Mike Martin via gtk-app-devel-list
I am using an embedded Gtk grid within a grid , which contains numerous widgets However if I have a widget that spans more than one column it messes up the layout of all other widgets , which seem to position themseleves randomly along the width of this widget, causing horribly jagged widget

Re: Treeview (liststore) CSS question

2019-03-22 Thread Mike Martin
Resolved my issue, turns out I needed some voodoo with properties $widgetpage{file_scroll}->set('propagate_natural_height','1'); $widgetpage{file_scroll}->set_vexpand(0); On Mon, 18 Mar 2019 at 16:01, Mike Martin wrote: > Is it possible to set different background for a

Re: Treeview (liststore) CSS question

2019-03-21 Thread Mike Martin via gtk-app-devel-list
apologies I did resolve my issue , posted as wrong person Resolved my issue, turns out I needed some voodoo with properties $widgetpage{file_scroll}->set('propagate_natural_height','1'); $widgetpage{file_scroll}->set_vexpand(0); On Tue, 19 Mar 2019 at 18:53, wrote: > > Hi Mike, > > Have you

Re: Treeview (liststore) CSS question

2019-03-19 Thread Mike Martin via gtk-app-devel-list
Its not whether the row is empty, its whether it exists On Mon, 18 Mar 2019 at 23:25, Daniel Kasak wrote: > On Tue, Mar 19, 2019 at 3:01 AM Mike Martin via gtk-app-devel-list < > gtk-app-devel-list@gnome.org> wrote: > >> Is it possible to set different backg

Treeview (liststore) CSS question

2019-03-19 Thread Mike Martin
Is it possible to set different background for a treestore, with a liststore, for populated rows v blank area. ie: If I have a dynamic treeview I would like to have one background colour for the rows and another for the treestore where there are no rows The particular example has the following

Re: Treeview (liststore) CSS question

2019-03-19 Thread Mike Martin
Its not whether the row is empty, its whether it exists On Mon, 18 Mar 2019 at 23:25, Daniel Kasak wrote: > On Tue, Mar 19, 2019 at 3:01 AM Mike Martin via gtk-app-devel-list < > gtk-app-devel-list@gnome.org> wrote: > >> Is it possible to set different backg

Treeview (liststore) CSS question

2019-03-18 Thread Mike Martin via gtk-app-devel-list
Is it possible to set different background for a treestore, with a liststore, for populated rows v blank area. ie: If I have a dynamic treeview I would like to have one background colour for the rows and another for the treestore where there are no rows The particular example has the following

Setting background of ToggledButton on pressed

2019-03-13 Thread Mike Martin via gtk-perl-list
After a fairly frustrating day working out how to change the background on togglebutton when pressed, here is my code, if it helps anyone my $display = Gtk3::Gdk::Display::get_default (); my $screen = $d->get_default_screen; my $provider = Gtk3::CssProvider->new; $provider->load_from_data (

Re: Treeview sortingis this a bug

2019-03-06 Thread Mike Martin via gtk-perl-list
Apparently , yes this is a bug in gtk upstream https://gitlab.gnome.org/GNOME/gtk/issues/794 On Tue, 5 Mar 2019 at 23:12, Mike Martin wrote: > I am trying to toggle sorting on a liststore, so I am trying to use > > $list->get_column(0)->set_sort_column_id(-2) > where

Treeview sortingis this a bug

2019-03-05 Thread Mike Martin via gtk-perl-list
I am trying to toggle sorting on a liststore, so I am trying to use $list->get_column(0)->set_sort_column_id(-2) where list is a treeview containing a liststore as per GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID #define GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID (-2) The

Re: liststore issue 1 - iter points to wrong row after sort of column with cellrenderercombo

2019-03-02 Thread Mike Martin via gtk-app-devel-list
er cancel edition) >- editing-canceled > In all cases you only have the path of the edited row, since the > cellrenderer does not "know" the model it is displaying : you have to pass > it through the signal user_data (then you can build the iter and do your > editio

Re: liststore issue 1 - iter points to wrong row after sort of column with cellrenderercombo

2019-02-28 Thread Mike Martin via gtk-app-devel-list
Thanks Though what I don't quite get is the difference in behaviour between editing-started and edited (both using path to get the ITER) On my particular scenario I use editing-started to setup some stuff so I can use the iter created On Thu, 28 Feb 2019, 12:30 Nicolas Soubeiran via

liststore issue 2 - which 'path' comes from signal

2019-02-27 Thread Mike Martin via gtk-app-devel-list
according to the docs the path reference is edited signal = path editing-started = path changed = path_string which I thought meant that path would be a treepath (ie: an object) and path_string would be a reference to the row (an integer in the case of a simple liststore) However in all three

liststore issue 1 - iter points to wrong row after sort of column with cellrenderercombo

2019-02-27 Thread Mike Martin via gtk-app-devel-list
I have come across an issue where the iter points to the wrong row on edited signal after sorting the column (via clicking header). This only happens with edited signal and not editing-started (which is correct) The edited iter is obtained via

Build errors against current Gtk3

2019-02-26 Thread Mike Martin via gtk-perl-list
Trying to build Gtk3-perl and getting the following errors Test Summary Report --- t/overrides.t(Wstat: 65280 Tests: 162 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 233 tests but ran 162. Files=22, Tests=843, 5 wallclock secs (

Issue with iters with cellrenderercombo and sorted columns

2019-02-25 Thread Mike Martin via gtk-perl-list
I have a wierd issue with iters and and a liststore with a combo cellrender and edited signal. If I dont sort the column everything is fine the iter points to the right row. However if I do sort the iter points to a different row Code is setup for column renderers sub tv_cols { my

Force liststore to update when leaving treeview

2019-02-12 Thread Mike Martin via gtk-app-devel-list
Is this possible? I have a (for example) a grid which contains Various action widgets And a Treeview based on a liststore Is there any way to make sure that the changes made to a cell in the liststore are "committed" if I click on one of the other widgets I cant find anything to do this and if

Re: Strange issue with subroutine being called too late

2019-01-18 Thread Mike Martin via gtk-perl-list
Ignore message, found issue, needed a return value of 0 to the sub-routine On Fri, 18 Jan 2019 at 10:47, Mike Martin wrote: > Hi > I have a procedure which should be called on error (if a directory doesn't > exist a window pops up as follows; > > foreach my $filesg (

Strange issue with subroutine being called too late

2019-01-18 Thread Mike Martin via gtk-perl-list
Hi I have a procedure which should be called on error (if a directory doesn't exist a window pops up as follows; foreach my $filesg (keys %{$changes}){ my ($filename,$dirname,$ext)=fileparse($changes->{$filesg}->{newname},qr/\.[^.]*/); unless (-d $dirname){

Liststore and editing cancelled event

2018-11-26 Thread Mike Martin via gtk-app-devel-list
Is there any way to disable the editing-cancelled event on cellrenderertext. Background When I have a liststore contained within a treestore I want the value to be be saved if I click on a button not contained within the treeview, so that it does not just dissapear Focus events dont seem to work

Problems with populating combo box with editing-started signal

2018-11-24 Thread Mike Martin via gtk-perl-list
Hi $datamwidgetw->{keyfieldc}->get_cells->signal_connect('editing-started'=>sub{ print 'editing',"\n"; my ($cell,$combo)=@_; my $model=$combo->get_model; print $model; $model->clear; } ) This doesnt do anything (at all), $datamwidgetw->{keyfieldc} is

Multi page widgets in Gtk

2017-09-03 Thread Mike Martin
Hi For one of my apps I want to setup a multi page widget with next previous navigation. Is this possible? I cant seem to find an appropriate widget? What I want to do is set up a preview widget based on a db query, so that based on the query each entry would be shown ie: $sql = select

Re: Prolems with liststore insert_with valuesv

2017-08-07 Thread Mike Martin
partial answer to my own question if I replace insert_with_valuesv to insert_with_values it works On 7 August 2017 at 17:35, Mike Martin <redt...@gmail.com> wrote: > Hi > I am trying to use insert_with_valuesv to populate a liststore as follws > > my ($resultmodel,$result)=@

Prolems with liststore insert_with valuesv

2017-08-07 Thread Mike Martin
Hi I am trying to use insert_with_valuesv to populate a liststore as follws my ($resultmodel,$result)=@_; no strict 'refs'; #print $resultmodel; my @cols=0 .. scalar @{$result->[0]} -1; foreach my $f (@{$result}){ my $iter=$resultmodel->insert_with_valuesv(-1,\@cols,$f); }

Preferred width/height warning

2017-07-29 Thread Mike Martin
I am trying to eliminate this warning ie: (membership_gui.pl:4729): Gtk-WARNING **: Allocating size to GtkWindow 0x44d4260 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate? (membership_gui.pl:4729): Gtk-WARNING **: Allocating size to GtkWindow

Re: Preferred height/width error message

2017-07-24 Thread Mike Martin
Anyone? On 23 July 2017 at 18:30, Stefan Salewski <m...@ssalewski.de> wrote: > On Sun, 2017-07-23 at 17:46 +0100, Mike Martin wrote: > > Gtk version 3.22 > > I see a similar message for evince pdf viewer whenever I use it since > some months. But I have no idea for

Preferred height/width error message

2017-07-23 Thread Mike Martin
I am trying to eliminate this warning ie: (membership_gui.pl:4729): Gtk-WARNING **: Allocating size to GtkWindow 0x44d4260 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate? (membership_gui.pl:4729): Gtk-WARNING **: Allocating size to GtkWindow

Re: Combobox disable item

2017-06-23 Thread Mike Martin
I am trying to make entries "greyed-out" ie: disabled, rather than hidden eg the Combobox model contains ('Scandvb','DVB module','DVDb5-Scan') There is another comboox with a configuration file chosen I want to be able to make one or more of the entries unselectable if prerequites are not

Combobox disable item

2017-06-22 Thread Mike Martin
Hi Is it possible to disable an item in a combobox? I cant find anything about this, set_sensitive only seems to apply to either cell-renderer or widget thanks Mike ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

How to stop glib main loop mixing up perl loops

2017-03-16 Thread Mike Martin
*I have a weird issue on an application I am developing* *The application is fully tabbed and runs loops to transcode video files, and I would like to be able to run the main transcoding loop fully in parellel, ie: the process running in one tab is totally separate to that running in another tab*

Re: Glib threads in gtk-perl?

2017-03-15 Thread Mike Martin
Suspected as much. Looks like it's back to square one. On 15 Mar 2017 3:08 p.m., "Brian Manning" <c...@xaoc.org> wrote: > On Tue, Mar 14, 2017 at 4:24 AM, Mike Martin <m...@redtux.org.uk> wrote: > > Hi > > It was suggested that I look into using glib thread

Seperating Multiple processes

2017-03-10 Thread Mike Martin
Hi I have a weird issue on an application I am developing The application is fully tabbed and runs loops to transcode video files, and I would like to be able to run the main transcoding loop fully in parrellel, ie: the process running in one tab is totally seperate to that running in another tab

Annoyance with treestore (SimpleList) and remove row

2010-10-25 Thread Mike Martin
Hi when I remove a row in a simplelist I get the following warning Gtk-CRITICAL **: gtk_list_store_get_value: assertion `VALID_ITER (iter, list_store)' failed at /usr/lib/perl5/Gtk2/SimpleList.pm line 248. *** unhandled exception in callback: *** [gperl_sv_from_value] FIXME: unhandled type - 0

CellRenderCombo in SimpleList example and question re: go to position

2010-10-08 Thread Mike Martin
Hi I am working on getting CellRendererCombo working as I want Code ##Setup combo column type## Gtk2::SimpleList-add_column_type( 'combo',type='Glib::Scalar',renderer='Gtk2::CellRendererCombo',attr= sub{ $_[1]-set(text,$_[2]-get($_[3],$_[4])); $_[1]-set(has_entry,TRUE); $_[1]-set(editable,TRUE);

Re: Get Iter/Path from CellRendererCombo

2010-10-02 Thread Mike Martin
annoying - just would be nice to be able to get the path direct from the model On 01/10/2010, Kevin Ryde use...@zip.com.au wrote: Mike Martin redt...@gmail.com writes: if ( $cell-get(model)-get( $combo_iter, 1 ) eq $val ) { If you know what columns are what then that's about

Re: Get Iter/Path from CellRendererCombo

2010-10-02 Thread Mike Martin
On 02/10/2010, Mike Martin redt...@gmail.com wrote: I think we may have crossed as that is more or less what I have done $cat_rend-signal_connect('changed'=sub{ my $rend_iter=$_[2]; # iter of selected item $valid=$cat_rend-get(model)-get_value($rend_iter,0); } ); $cat_rend-signal_connect

Re: Adventures in gtk-perl - tables and windows

2010-09-17 Thread Mike Martin
On 17/09/2010, Kevin Ryde use...@zip.com.au wrote: Mike Martin redt...@gmail.com writes: -{table}-child_get_property($w,'left-attach'); Yes. I cant find any way to get the X11 name from GDK, $win-property_get, but it's a little icky :). I forget what you're supposed to pass

Adventures in gtk-perl - tables and windows

2010-09-16 Thread Mike Martin
Hi After a frustrating couple of days googling I have come up with the follwing bits of code to solve a couple of things which seem to have a lot of questions on google but no answers. Comments apprieciated 1. getting widgets from a table matching co-ordinates (ie: row/column) foreach my $w

Problem with Gtk2::Combobox-new_with_model

2010-09-02 Thread Mike Martin
Hi - getting confused I have a liststore my $dvd_modelx=Gtk2::ListStore-new('Glib::String'); foreach my $list (keys %cds){ my $iter=$dvd_modelx-append(); $dvd_modelx-set($iter, 0,$list ) } my $wid=Gtk2::ComboBox-new_with_model($dvd_modelx);# fails to add to combobox

Re: Question about cancelling sub-routine

2010-08-14 Thread Mike Martin
On 14 August 2010 00:41, muppet sc...@asofyet.org wrote: On Aug 12, 2010, at 11:07 PM, Mike Martin wrote: This works if ($append == 1){ die (main::encode_loop) if $count == 100; # this is a count as a test - the loop goes from 1-150 } but if I try to put it as the action for a cancel

Creating a function to create widgets from a hash - is there a better way?

2010-08-09 Thread Mike Martin
Hi I have this code ## Master hash to define widgets with options ## my %widgets=( 1={name='$open_hbox',type='Gtk2::HBox',action='new',opts=[0,0],wname='open_hbox'}, 2={name='$encode_open_lab',type='Gtk2::Label',action='new',opts=[$sel_opts_open_lab],wname='open_label'},

Test for whether a widget has children

2010-07-23 Thread Mike Martin
Does such a thing exist in Gtk? eg: if I do something like foreach my $widget ($vbox-get_children){ print $widget } It will fail if there are any widgets that dont have children such as a label or a GTkEntry I've googled and searched API docs but cant see anything

Re: Issues with performance of Simple List

2010-03-01 Thread Mike Martin
On 27 February 2010 22:28, Mike Martin redt...@googlemail.com wrote: I am having issues with the performance of simple list in a wierd way Basicaly I have a simple list object embedded into a window which gets data from a sqlite database via user defined criteria If I dont access

Issues with performance of Simple List

2010-02-27 Thread Mike Martin
I am having issues with the performance of simple list in a wierd way Basicaly I have a simple list object embedded into a window which gets data from a sqlite database via user defined criteria If I dont access the simplelist at all changes to the data are nearly instantaeous however if access

Problem installing gtk-perl on windows (XP)

2009-05-21 Thread Mike Martin
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

accessing liststore of Combobox

2008-11-10 Thread Mike Martin
Hi is there a way of accessing (removing) the contents of the underlying liststore of a ComboBox constructed using simple text methods To Explain I have a combobox which depending on selection adds a GtkEntry, GtkComboBox or GtkComoboBoxEntry, or directly runs a query. Everything works fine

Manipulating popup menus

2008-10-15 Thread Mike Martin
Hi Is it possible to edit the contents of stock popup menus eg: the edit menu that is automatically attached to a Gtk::Entry I have worked out how to add add entries using populate -popup signal, but I cant find any way to remove entries thanks ___

Signals for combobox entry

2008-10-07 Thread Mike Martin
Hi I have a drop-down box which adds to the display depending on selection Combobox Comboboxentry Entry However I am having problems with signals with the combobox entry the actions are Combobox = changed Entry = Keypress event (tab/entry/return) however for the comboboxentry, changed isnt

Behaviour of lazy-load

2008-09-16 Thread Mike Martin
Hi Since updating to F9 and so per l5.10 and appropriate gtk-perl packages I keep getting a message about fail to llazy-load widget when there is a problem in my code with usually references to glib.pm or sometimes another module. The message gives go indication of where in the script the error

Creating re from computed values

2008-07-28 Thread Mike Martin
I am trying to create a regular expression for an if statement from computed values passed to the sub-routine as follows sub get_list { my ($black_list,$table,$crit)[EMAIL PROTECTED]; # $crit is a hash reference containing key to search and search expression my $listings; my

Another question about foreach loops and gtk

2008-06-24 Thread Mike Martin
I have a long-running foreach loop which I want to give feedback through the GUI ie: foreach my $keys1 (sort {$a = $b} keys %menu_jpegs){ gd_frame($keys1,$sel_opts_vbox,$menu_file) } which runs sub gd_frame { my ($keys1,$sel_opts_vbox,$menu_file)[EMAIL PROTECTED]; long function my

Question about behaviour of foreach and Glib:IO- add_handler

2008-06-10 Thread Mike Martin
Hi I was always under the impression that a foreach loop iterated over a list sequentially, which in every other case at least seems to happen. However I have the following code sub encode_loop { my ($opts,$prog,$ext,$sel_opts_vbox)[EMAIL PROTECTED]; my $subname='encode'; foreach my

Help with using sub to update hash

2007-03-07 Thread Mike Martin
I have the following code #caller; my %titles; my %dvd_titles; $dvd_act_btn-signal_connect('clicked'=sub{$count++ dvd_setup($vbox2,$count,$sel_opts_vbox,\%titles,\%dvd_titles)}); #sub called sub dvd_setup { my ($vbox2,$count,$sel_opts_vbox,$titles,$dvd_titles)[EMAIL PROTECTED]; my

Question about getting values from nested GTK::Boxes

2007-02-07 Thread Mike Martin
Hi I have the following function which gets the values from nested h/vboxes. sub get_files { my ($sel_opts_vbox)[EMAIL PROTECTED]; my @files; my @add_opts; foreach my $child ($sel_opts_vbox-get_children){ if ($child-get_name eq 'filesel'){ foreach my $child1 ($child-get_children){ foreach my

Simplelist and remove functions

2007-01-31 Thread Mike Martin
I have a Gtk2::Simplelist setup which is working fine except I cant delete any rows ie: this works $add_encode_type_btn-signal_connect('clicked',sub{push (@{$mod_model-{data}},[undef,undef,undef,undef,undef])}); which adds a record but this doesnt

Re: Simplelist and remove functions

2007-01-31 Thread Mike Martin
On 31/01/07, Mike Martin [EMAIL PROTECTED] wrote: I have a Gtk2::Simplelist setup which is working fine except I cant delete any rows ie: this works $add_encode_type_btn-signal_connect('clicked',sub{push (@{$mod_model-{data}},[undef,undef,undef,undef,undef])}); which adds a record

CPU load increasing with IO watch

2007-01-24 Thread Mike Martin
I have the following code using IO watch open($file, -|,$prog $inp1 $opts $newfile 21 ); my $end_mark=$buffer-create_mark('end',$buffer-get_end_iter,0); our $tag= Glib::IO-add_watch ( fileno($file), ['in', 'hup'], sub { my ($fileno, $condition,$tag) = @_; if ($condition eq

Optimising tex-buffer/iter?

2007-01-03 Thread Mike Martin
I have the following code ($prog in this case is customisable ffmpeg commands) else { $pid=open($file, -|,$prog $inp1 $opts $newfile 21 ) or die Failed running perl subprocess\n; $pid1=$pid+1; # not relvant push (@pids,$pid1); # to this issue } our $tag= Glib::IO-add_watch ( fileno($file),

Changing background color for a box widget

2006-06-05 Thread Mike Martin
Is it possible to alter the background color for a box widget. I am not having a lot of luck To explain I have a dynamically created hbox added to a vbox inside a frame. In this hbox I have two widgets a label frame (a file name) and a remove button. I would like the background to be white so

Approaches to implementing su in gtk-perl

2006-05-25 Thread Mike Martin
Does anyone have any ideas of how to go about this. Basically I want to throw up a dialog asking for password and pass this to the main program. However everything I have tried so far throws me back to typing password at shell Any help appreciated.

Showing http links in gtk-perl

2006-05-18 Thread Mike Martin
Is it possibe to show a clickable http link using only gtk-perl? All I have been able to find is something using gnome. ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list

Re: Foreach and add_watch not working as I would expect

2006-05-18 Thread Mike Martin
On 5/13/06, muppet [EMAIL PROTECTED] wrote: On May 12, 2006, at 10:14 AM, Mike Martin wrote: I am having problems with using IO::Watch Gtk2::Helper etc under a foreach loop. For some reason it will only run the last element of the array. Here is example code. [...] All that seems