Re: How to scroll to a specific line

2018-07-28 Thread John Coppens
On Sat, 28 Jul 2018 07:42:16 -0400
Reuben Rissler  wrote:

> > Thanks for the suggestion. Believe it or not, I had just arrived at
> > that same solution! I first tried to use GLib.timeout_add(), and
> > that worked too, if the time was larger than 300 - 400 ms, which is
> > on the verge of annoying. I then tried idle_add(), and I guess that
> > makes the 300-400ms 'built-in'.
> >
> How many lines of text do you have? With 500 - 700 lines of text, my 
> scrolling is instantaneous. The scroll feature itself has a 'soft'
> stop, but that is quite acceptable for me, as it is easier to adjust
> my eyes to the change.

Reuben,

The code I'm using to test is short (about 250 lines). I'm using the system
to single step program execution, so I will do many steps. The problem at 
the moment is when loading the program, and scrolling to the start of
the program (the 'reset' position), but I see that the slowing down delay
is quite visible even when scrolling just one line with the arrow keys.

I have some Gtk-2 programs where the delay is not apparent. Maybe this
is configurable?

John

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


Re: Can you specify the No. of chars before SourceView Completion window is displayed?

2018-07-28 Thread John Coppens
On Sat, 28 Jul 2018 03:35:02 -0500
"David C. Rankin"  wrote:

> All,
> 
>   I have implemented word completion with GtkSourceView, but I cannot
> find a simple way to prevent the provider and proposals from popping
> up until 3 (or more) characters are typed? Is there an easier way to
> adjust this rather than counting chars with an iter from every
> begins_word and blocking the display of the completion window until
> the desired number of characters have been typed?
> 

David, is 'set_minimum_key_length' what you are looking for?

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


Re: How to scroll to a specific line

2018-07-27 Thread John Coppens
On Fri, 27 Jul 2018 07:32:13 -0400
Reuben Rissler  wrote:

> I have also seen place_cursor_onscreen() work well. Now the thing is, 
> none of this will work until the Gtk.SourceView has properly been 
> rendered. This means doing something like:
> 
>          self.source_buffer.set_text("my text")
>          GLib.idle_add(self.scroll_function)
> 
>      def scroll_function (self):
>          # your scroll code here, like you use already
> 
> So you see, the scroll part is not the problem, but rather the 
> calculations of iters fails, because these iters are not yet, or are 
> invalidated when the buffer/view changes.

Hello Reuben.

Thanks for the suggestion. Believe it or not, I had just arrived at that
same solution! I first tried to use GLib.timeout_add(), and that worked too,
if the time was larger than 300 - 400 ms, which is on the verge of annoying.
I then tried idle_add(), and I guess that makes the 300-400ms 'built-in'.

Now, can this visible delay be eliminated? Maybe disabling the scroll
animation alltogether? (it's really visually a scrolling issue) I haven't seen
this problem in Geany (which I believe uses scintilla).

I did a more complete description of the issue on Stackoverflow, because, at
first, I didn't see my question appearing on the mailing list here:

https://stackoverflow.com/questions/51558047/how-to-select-and-scroll-a-specific-line-in-gtksource

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


How to scroll to a specific line

2018-07-27 Thread John Coppens
Hi all...

I've been looking at many posts and articles from all over Google, didn't find
any solution that works.

I'm using Gtk-3, introspection, and Python 3. I've tried many combinations of

get_iter_at_line, place_cursor, place_cursor_onscreen, and others. Even tried to
more or less calculate the scroll position and manipulate the vadjustments.

An example:
itr = self.tbff.get_iter_at_line(linenr)
self.tbff.place_cursor(itr)
self.tview.place_cursor_onscreen()

I suspect that the problem may come from the fact that the widget has not
been rendered yet. I also tried to defer the actual scroll to GLib.idle_add,
but that didn't work out either.

Can anyone point me in the right direction?

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


Buttons is Gtk.Dialog can't be separated?

2017-07-27 Thread John Coppens
Hi all.

I mad a small function using Gtk.MessageDialog, and add the requisite
Ok and Cancel buttons. But, on the result shown the buttons are glued
together and expand to occupy the entire width of the dialog. Using
style_get_property, I get reply '4', but this spacing is not visible.
Also, probably generating the 4 just mentioned, I found a parameters in
the CSS file defining the spacing at 4.

get_action_area() is flagged as deprecated but does work - I can set
the button spacing as wanted.

In short: How can I set the button spacing (and other props) if:
- apparently the CSS spacing isn't taken into account
- the button_spacing style property is set to 4 but not used
- I shouldn't use get_action_area() to set the spacing?

I'm using Gtk 3.22 at the moment, and via introspection, Python 3.6. To
be sure this wasn't a result of the loaded theme, I also tried with
Adwaita and others.

Attached are a small test program, and a screenshot of a dialog.

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


Removing overlay scrollbars. export GTK_OVERLAY_SCROLLING=0 fails

2016-04-22 Thread John Coppens
Several programs (such as Geeqie) have the overlay scrollbars enabled,
but this causes serious problem when selecting images from the list.
The last item of the list is nearly invisible - only 1 pixels shows
above the scrollbar, making it difficult to hit with the cursor. Even
more so because there is no visual feedback.

export GTK_OVERLAY_SCROLLING=0  actually works, but now the labels in
the directory treeview are invisible (i.e., the small triangle to 
fold/unfold directories are present and work, but the text to the right 
is missing. How is this related to the scrollbars?

I have GTK 3.16.3 installed.

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


Re: Gtk+3 application Internationalization

2016-04-14 Thread John Coppens
On Thu, 14 Apr 2016 09:30:10 +0200
Ondrej Tuma  wrote:

> Where is benefits of this, sorry, stupid decision. When i use Stock
> Items, i have my application base translated to all languages which Gtk
> have. How can i do that without Stock Items ? I hope, that I had missed
> something. Please tell me what.

I might be wrong, but there are still standard items (they're not
called Stock Items anymore). They're not called by their Stock name,
but still get translated automatically. They are not in a box called
Stock Items, but instead come from Icon Themes:

This is the old and new way compared:

Old:
button = gtk_button_new_from_stock (GTK_STOCK_SAVE);

New:
button = gtk_button_new_with_mnemonic (_(“_Save”));

Have a look at the announcement of the 'new' way:

https://docs.google.com/document/d/1KCVPoYQBqMbDP11tHPpjW6uaEHrvLUmcDPqKAppCY8o/pub

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

Re: argv

2016-04-14 Thread John Coppens
On Sat, 9 Apr 2016 18:39:49 -0700
"Andrew Robinson"  wrote:

> The problem is that [ebp + 12] and [ebp + 8] point to nonsense. I ran a
> debugger and looked at the stack, and there is nothing else on the stack
> except for ebp, rtn addr, and these two parameters. I even tried
> daisy-chaining the addresses to see where they would lead, and they are not
> even close to pointing to the actual command line. I can easily find the
> command line using a memory search, so I know what address it should be. What
> am I doing wrong here? I have:

Never done this, and I don't have Windows, so I don't know if this is useful.

- The command line you found may not be the same as is passed to main().
Recall that that argv is an array of strings, not pointers to the actual
command line.

- This program shows the addresses of the individual args:

#include   

   
int
main(int argc, char *argv[]) {
  int i;

  for (i = 0; i < argc; i++) {
printf("%p: %s\n", [i], argv[i]);
  }

  return 0;
}

~$ ./args a b c d
0x7ffd48ffc538: ./args
0x7ffd48ffc540: a
0x7ffd48ffc548: b
0x7ffd48ffc550: c
0x7ffd48ffc558: d

As you can see, the addresses are aligned to 8 byte levels, as this is a
64-bit computer. Your offsets could be wrong, as they depend on the
word length of the computer.

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


Re: [Denemo-devel] Tooltips - what am I doing wrong?

2015-11-27 Thread John Coppens
On Thu, 19 Nov 2015 09:56:06 +0100 (CET)
Lucas Levrel  wrote:

> Please see by yourself:

Lucas, 

I think those 'tear-offs' are not the same ones as referred to here.
The 'main menu bar' of GIMP doesn't have tear-offs anymore. I believe
the ones you are showing are from right-clicking on the canvas.

I also suspect that the complexities arise from detaching menus from
the main menu bar, not from the right-click, which is already a
pop-up

John

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


Re: Misconduct of GTK+/glib Bugtracker Admins

2015-07-15 Thread John Coppens
On Thu, 4 Jun 2015 13:11:55 -0600
IgnorantGuru ignorantg...@openmailbox.org wrote:

 Greetings.  Not sure where is the best place to bring this - input
 welcome - but this email is an official complaint against the conduct
 of:

I haven't had the pleasure to converse with Andre Klapper, but I
can attest to the predisposition of Matthias and Emmanuele in more
than one occasion. I can only admire the huge quantity of issues both
are involved in, and they still take the time to answer (sometimes
rather basic) questions of many users. 

As Michael Torrie suggested, if you submitted a patch, and it solves
a real problem, I can't see your patch being refused. Unless it 
introduces more problems than it solves... I'm sure the developpers
would be grateful, as would millions of users.

Anyway, I'm a great open source fan, and I (try to) contribute as
much as I can.

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


Re: gtk_widget_queue_draw_area much slower in gtk3 than gtk3

2015-04-01 Thread John Coppens
On Sun, 29 Mar 2015 22:16:32 -0700
dmg d...@uvic.ca wrote:

 is there any suggestion on why is this happening, specially when it
 was working properly  under gtk2?

I have really no idea what is the cause, but it is something I have been
thinking about for a while... In one on-line course the text written on 
the screen was horrible - very segmented, nearly unreadable.

Another course had great graphics, even with (fast) handwritten text.

I'm quite sure that there is a trick to this, and I suspect that the 
samples are passed to a bezier curve generator to smooth out segmenting.
I have been meaning to experiment with that idea in gtk...

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


Re: set classic interface in Gtk.colorbutton

2014-12-12 Thread John Coppens
On Sun, 07 Dec 2014 12:18:21 +0100
rastersoft ras...@rastersoft.com wrote:

 I'm using a Gtk.ColorButton in an app to set a color, but I need it to 
 have alpha value. The problem is that the new ColorChooser interface is 
 confusing for the users, because, by default, it shows just a list of 
 opaque colors and they have to click the + button and then it shows 
 the classic interface to select a color with transparency. Is it 
 possible to show by default that classic interface, or, at least, to add 
 a transparency slide in the main interface?

I am by no means an expert on the matter, but I cannot find any way to
make this happen. A far-fetched trick, which probably would be unreliable
anyway, would be to synthesize a button click on the '+' by software,
maybe even before the show() or show_all() is called.

Unreliable, because possibly a change of theme might change the position of the 
+ enough to make it fail.

If you make your own ColorButton, you could call the ColorChooserDialog 
manually,
and add things (like an alpha slider) to it?

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


Re: Plotting library for GTK+

2014-12-02 Thread John Coppens
On Tue, 2 Dec 2014 19:17:01 +0300
Sergei Naumov vo...@rambler.ru wrote:

 Can anyone help?

GNU plot can be used with 'pipes', so you can send the commands to the
program directly. I didn't use it with GNUplot itself, but with a program
I made, and that form of 'remote control' is fairly handy.

For a little more integration, have a look at xmgrace 
(http://plasma-gate.weizmann.ac.il/Grace/doc/UsersGuide.html#ss6.2)
which can be called as subprocess for a C or fortran program. Xmgrace's plotting
capabilities are very wide-ranging. From simple XY plotting to FFT and other
niceties.

In this day and with modern computers, I'd suggest Python + one of the
plotting libraries. With matplotlib as the most sophisticated, but pyplot
is sufficient in most cases (part of matplotlib).

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


Re: gtk_window_set_geometry_hints woes

2014-10-25 Thread John Coppens
On Sat, 25 Oct 2014 10:15:21 +0200 (CEST)
Lucas Levrel llev...@yahoo.fr wrote:

 especially video players which would be a perfect candidate for this 
 feature, so I guess it's impossible.

Mplayer maintains a fixed aspect ratio. I suspect that the program 
calculates the WxH to maintain the ratio before setting the actual
window size though.

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


Re: set paned handle at the middle

2014-05-16 Thread John Coppens
On Thu, 15 May 2014 23:24:08 +0200
rastersoft ras...@rastersoft.com wrote:

 Hi all:
 
 How can I set the handle from a paned at the middle? I want to do this 
 because I have a paned with two treeviews, and at startup the upper one 
 is shown nearly collapsed.

https://developer.gnome.org/gtk3/3.7/GtkPaned.html#gtk-paned-set-position

The auto-setting can get confused if one panel is much 'heavier' than the
other - particularly with text.

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


Re: gtk_entry text cursor

2014-05-11 Thread John Coppens
On Sun, 11 May 2014 18:50:51 + (UTC)
Mycroft microft-m...@web.de wrote:

 How to set the cursor position in a gtk_entry.

gtk_editable_set_position(GTK_EDITABLE(w), pos);

w is the gtkEntry... pos is the position

John

http://vega.frugalware.org/tmpgit/gnome.old/source/xlib/gtk+2/pkg.gtk+2-docs/usr/share/gtk-doc/html/gtk/gtk-GtkEditable.html
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GnomeDateEdit emits no signal on editing entry

2014-03-02 Thread John Coppens
On Sun, 2 Mar 2014 11:25:27 +
Emmanuele Bassi eba...@gmail.com wrote:

 that never happened because nobody used that widget either. :-)

Sorry for the name confusion, Emmanuele (though I suspect this is not the
first time :)

I have been using gtk for many years now, and have the impression that 
gtk+ use overall is in decline. Maybe those deprecations
have something to do with it.

 ... I think every
 application exposing a date uses its own widget, and not two date
 selection widgets look alike.

Which seems logical, as gnomeDateEdit is marked as deprecated, warnings abound
about not using gnomelibs, and no alternative exists. I doubt that would have
happened if a GtkDateEdit would exist. I also doubt that the diversity is a
good thing: a unified and consistent interface is important for users (and
programmers).

Just checked, Qt has a QDateTimeEdit widget, which permits manual editing,
setting format, and enabling a Calendar popup if needed. So I guess there is
a clientele for that.

Thanks once again, I'll have a look at the libegg version.

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


Re: GnomeDateEdit emits no signal on editing entry

2014-03-01 Thread John Coppens
On Mon, 24 Feb 2014 17:33:56 +0001
Bernhard Schuster schuster.bernh...@gmail.com wrote:

 Can you provide a complete minimal compileable example? Did you open a 
 bugreport?
 
 Best

Hi Bernhard, Emmanuelle,

I did not submit a bug report because I thought I was doing something wrong.
I couldn't really imagine this could really be an issue, given, like
Emmanuelle said, it is a very old widget, and the fact that this really
seems to be a basic functionality.

I just wanted to have two dates 'begin' and 'end' date, and have 'end'
date follow 'begin' if 'begin' is edited. I hung a handler to the changed
signal, and this worked if a date was selected in the calendar, but not
if modified in the Entry field.

Yes, I could implement this by combining a Button, an Entry, and a
Calendar. I find the Calendar useful for small changes, but the Entry
is much easier for large steps (and copy-and-paste). 

It would be a pain if GnomeDateEdit would be deprecated without a new, 
equivalent widget in gtk. I use it fairly frequently, and I've seen it
used many times.

For the moment, I solved the problem with a 'copy' button to sync the
dates. If I find a moment, I'll make a small app to show the problem.

John


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


GnomeDateEdit emits no signal on editing entry

2014-02-20 Thread John Coppens
Hi guys  gals,

This may be common knowledge, but I didn't find any reference.

When editing the date manually (without the calendar dropdown), no
'change' signal is emitted, even after exiting the widget. I find this
rather strange - how do I detect changes?

I found an example in a tutorial, but it only connects to the
'change' signal, so it wouldn't receive those 'manual' changes
either.

Maybe I could connect to the change signal of the embedded entry,
but that would probably defeat any validation checks.

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


Re: Printing GtkTextView contents

2013-08-23 Thread John Coppens
On Tue, 20 Aug 2013 15:25:23 -0700 (PDT)
Marco Ricci marcoricci2...@yahoo.com wrote:

 Is there a way by which I can query for the printer and use the results of 
 the query to send the contents of the GtkTextView? Can someone please point 
 me to a small example that does what I describe? I program using C on Linux.

Normally, there is a default printer configured for your machine. So, you 
could, for example,
save the text of your TextView to a temp file, and execute (eg. with 'system') 
'lpr tempfile'
Of course, it will be formated using default character sizes etc (probably some 
monospaced font).
But in the case of tech info, this simple trick might be useful.

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


Re: Fulscreen mode

2013-06-17 Thread John Coppens
On Sun, 16 Jun 2013 09:09:52 +0300
Dov Grobgeld dov.grobg...@gmail.com wrote:

 You just need to use gtk_widget_hide() on the widget and it and its child
 widgets will not be shown.

Hi Dov,

I don't really understand that... I have (more or less) this:

   ++
   + Menu   +
   ++
   + Treevw1 | DArea  | Treevw2 +
   + || +
   +-++-+

I would like to make DArea full-screen, if possible even hiding the 
window borders. Is the only way to do that, hiding the VBox with the
Menu, Treevw1 etc, then unhiding DArea?

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


Fulscreen mode

2013-06-15 Thread John Coppens
Hi...

I created a program with three elements in an HBox (gtk2): two
treeviews and a GtkGlExt drawing area. I'd like to toggle the drawing
area fullscreen/normal. Ie., not show the treeviews (or any other
element - such as menus) while in fullscreen mode. Is that possible
somehow?

Thanks for any suggestion...

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


Re: Drag and drop, inter-widget

2012-10-13 Thread John Coppens
On Sat, 13 Oct 2012 14:08:34 +0900
Tristan Van Berkom t...@gnome.org wrote:

 Hopefully for you... your work is high-level enough and your drag
 source is in the
 same application as your drop target... that means you get to set some pointer
 data and work completely around the drag-and-drop GtkSelectionData apis
 in order to fetch the current drag data at drag-motion time anyway...

Which is exactly what I would try to avoid, as I can imagine dragging 
inter-program to be desireable.
Still, this program is meant more as a demo. Anyway, from your comments this 
isn't in gtk+'s bag of tricks.

Cheer,
John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Drag and drop, inter-widget

2012-10-12 Thread John Coppens
Hello guys,

I've got DnD actually working, between a GtkTreeView and a GtkLayout. I'm using 
it
to make a scheduler, where the TreeView has the classes to be scheduled, and the
Layout is the actual grid.

Though this works, I can't draw the correct size of the class period in the
layout till I drop the wares, which is when the data exchange takes place. Is 
there
some way to have a data exchange earlier? Hopefully before the move_over event
starts happening - so I can draw the box with the correct size. 

Of course it would be possible to do a parallel mechanism (say save a copy of 
the data 
from the treeview as global info) but I'd rather use the DnD mechanism, as this 
would 
work inter-program too.

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


Re: gtksourceview 2.11.2 compile problem.

2012-03-12 Thread John Coppens
On Fri, 9 Mar 2012 16:23:43 -0500 (EST)
Allin Cottrell cottr...@wfu.edu wrote:

 It seems gtksourceview 2.11 was transitional. Try 2.10.5, I 
 think that was the last real release for gtk+-2.0.
 
Thanks, Allin! 

That worked fine. 

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


gtksourceview 2.11.2 compile problem.

2012-03-09 Thread John Coppens
Hello people.

I wanted to recompile gtksourceview 2.11.2, because it was linked to an
older version of libpng, and this caused some problems. 

- The original version (actually installed) was compiled before I
installed gtk3

- Now I have a compile (not configure) error.

- Checking, it seems the the configure script checks if gtk3 is
installed, and, if so, always tries to link with gtk3 (that, by itself,
seems strange - gtksourceview 2.xx -  2.90 - linking with gtk3?)

- I can't see any option to select/force configuration with gtk2

Short of uninstalling gtk3 - is there a possibility to compile
sourceview for 2.0?

This is the make error:

  CC gtksourcecompletionwords.lo
In file included from gtksourcecompletionwords.c:27:0: 
../../../gtksourceview/gtksourcecompletion.h:60:2: error: expected 
specifier-qualifier-list before ‘GtkObject’ 
make[5]: ***[gtksourcecompletionwords.lo] Error 1 
make[5]: Leaving 
directory`/usr/local/src/gnome/gtksourceview-2.11.2/gtksourceview/completion-providers/words'

Here's the test in configure:

if test -n $PKG_CONFIG  \
{ { $as_echo $as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \gtk+-3.0 = 2.90\; }
  ($PKG_CONFIG --exists --print-errors gtk+-3.0 = 2.90) 25
  ac_status=$?
  $as_echo $as_me:${as_lineno-$LINENO}: \$? = $ac_status 5
  test $ac_status = 0; }; then
  
GTK_REQUIRED=gtk+-3.0
GTK_REQUIRED_VERSION=2.90.0
GTK_TYPELIB=Gtk-3.0

else

GTK_REQUIRED=gtk+-2.0
GTK_REQUIRED_VERSION=2.16.0
GTK_TYPELIB=Gtk-2.0

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

Re: need help in looping many times...

2012-01-24 Thread John Coppens
On Mon, 23 Jan 2012 18:17:41 -0800
Gary Kline kl...@thought.org wrote:

 right now, the user has to click and wait for gvim to spawn before
 he can type.  how can i code this so that the editor pops up over
 and over *while waiting for the user to type.*  if the user typed
 nothing, the program would pause.  
 

Wouldn't it be easier to simply add an editor window to your program?
Use for example, the GtkTextView widget. You won't have to spawn
external editors, and always have the text available.
You can even implement cut/copy/paste, re-use recent text, etc.

Also, you launch the reproduction as a thread, and permit editing while
permitting edition.

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


GtkPrint questions

2011-03-23 Thread John Coppens
Hi all.

Two items,

1) Even if I set the unit to mm (gtk_print_operation_set_unit), the page
drawing in the GtkPrint dialog appears in inches. How can I change that?

2) If I select print to file in the dialog, I can't change the page
size anymore. The page size _is_ coded into the generated Postscript
file (%%PageMedia: Letter), so how do I change that?

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


Re: GtkPrint questions

2011-03-23 Thread John Coppens
On Wed, 23 Mar 2011 12:35:14 -0300
John Coppens j...@jcoppens.com wrote:

 2) If I select print to file in the dialog, I can't change the page
 size anymore. The page size _is_ coded into the generated Postscript
 file (%%PageMedia: Letter), so how do I change that?

More specifically: if the actual printer is selected, the size is set
to A4, the dimensions of the page are correct (though in inches, not
mm). If I switch to 'print to file', the size goes to Letter.

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


GOption friends

2011-03-21 Thread John Coppens
Hello people,

I've been trying to get GOption and friends working - but it seems
we're not on friendly terms.

1) I defined a GOptionEntry as:

{debug, 'd', 0, G_OPTION_ARG_STRING, dbg, Debug options, opts},

and find that
  -d e   works
  --debug e
  --debug=e  work correctly

  -degives option parsing failed: Missing argument for -d

The form (-de), frequently used, fails though it is advertised
in the Command line parser description:

http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#g-option-context-add-main-entries

why?

2) The above entry should have a list of the actual debug options,
but I haven't found a practical way to add them to the help text.
I'd like to add options like:

  p: debug printing
  l: debug logging

Actually, I've extended the Debug options string with \n's and
looong string, but there should be a more practical way... is there?

3) The reason I wanted to migrate to GOption, is that it seems
gnome_program_init doesn't eliminate the recognized default arguments
such as --g-fatal-warnings, if added. So, in gdb, a run
--g-fatal-warnings produces an error in getopt. 


I've looked through numerous pages - can anyone point to an app that
actually uses GOption for more than a minimal options set?

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


Re: GOption friends

2011-03-21 Thread John Coppens
On Mon, 21 Mar 2011 15:42:17 +0100
Colomban Wendling lists@herbesfolles.org wrote:

  The form (-de), frequently used, fails though it is advertised
  in the Command line parser description:
  
  http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#g-option-context-add-main-entries
  
  {debug, 'd', 0, G_OPTION_ARG_STRING, dbg, Debug options, opts},
  why?
 
 This is NOT meant to work as you seem to expect, and the docs tells you:
 -de is the same as -d -e, not -d e.
 This is a very common thing, and most commands works this way (apart
 perhaps cut).

Ok... But if I put d: in getopt's arg list, I do expect an argument,
and -de is parsed as -d e. Why doesn't GOptionEntry, with a specified
G_OPTION_ARG_STRING do the same?


  3) The reason I wanted to migrate to GOption, is that it seems
  gnome_program_init doesn't eliminate the recognized default arguments
  such as --g-fatal-warnings, if added. So, in gdb, a run
  --g-fatal-warnings produces an error in getopt. 
 
 AFAIR, --g-fatal-warnings is NOT a standard option. You're expected to
 use the environment variable G_DEBUG:
 G_DEBUG=fatal-warnings gdb yourapp
 
 See http://library.gnome.org/devel/glib/unstable/glib-running.html

http://library.gnome.org/devel/gtk/2.21/gtk-running.html

Or doesn't GNOME pass those arguments to GTK?

(BTW, gimp accepts --g-fatal-warnings)

 
  I've looked through numerous pages - can anyone point to an app that
  actually uses GOption for more than a minimal options set?
 
 Most GNOME programs, and let's guess: GIMP ;)

Strange that gimp didn't jump out with a google search. Isn't the code
visible on the net?

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


Re: GOption friends

2011-03-21 Thread John Coppens
On Mon, 21 Mar 2011 17:29:03 +0100
Colomban Wendling lists@herbesfolles.org wrote:

  Ok... But if I put d: in getopt's arg list, I do expect an argument,
  and -de is parsed as -d e. Why doesn't GOptionEntry, with a specified
  G_OPTION_ARG_STRING do the same?
 
 Don't know why, I'm no GLib developer nor never worried about it. But
 how getopt handle arguments d:e if you give it -de? Does this mean
 -d -e or -d e?
 I'd think that GOption behavior is at least easier to understand.

Ah, well... If things were really easy to understand, we wouldn't need
mailing lists, would we?

getopt allows combining (-de meaning -d -e) if there are no possible
parameters (i.e., defined in the parameter list as de).

If a parameter is indicated (d:e in the parameter list), they
are not combinable (-de means -d e). Simple really.

  Strange that gimp didn't jump out with a google search. Isn't the code
  visible on the net?
 
 Of course: http://git.gnome.org/browse/gimp/tree/
 

Maybe those git pages are not searched by google? In fact I just
randomly picked a (one line) literal text from the Changelog in git -
and google didn't find it (did find two instances in mailing list
copies, but not the one in git).

So, one of the most important sources for info isn't accessible to
google it seems. (to be fair, bing.com doesn't find it either)

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


Re: Strange GObject warning, crashes GUI

2011-01-15 Thread John Coppens
On Sat, 15 Jan 2011 12:38:03 +0200
Mohammed Sameer msam...@foolab.org wrote:

  GLib-GObject-WARNING **: gsignal.c:3081: signal name `depressed' is
  invalid for instance `0x8a0900'
  
  messages.
 
 I've seen this error only once when I was writing a C++ wrapper for a GObject 
 and
 the GObject instance was being unref'ed thus destroyed without the C++ wrapper
 being informed. The C++ wrapper later on tried to call an action signal on
 the invalid instance it had and Glib printed that error.
 
 So it was the C++ wrapper trying to use some garbage memory as the GObject.

Hello Mohamed...

Thanks for the reply. I'm programming in C, and the code for the
ComboBox is very uncomplicated. Also, there is no way for anything to
have been unref'd, as far as I can detect.

Interesting would be to be able to identify what is at instance
`0x8a0900'

 I think this also explains the hang because of the invalid memory reference.

The hang, according to a suggestion from Johannes on the Anjuta list:

quote
That hang happens when you have a breakpoint in a signal handler
that processes some kind of synchronous X event. Possible solution is to
start anjuta from a different terminal like this:

DISPLAY=:0 gdb anjuta

and switch back to that terminal when X hangs and look at the debug
output.
/quote

This explains why most of the window manager hangs. I have yet to try
this out.

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


Strange GObject warning, crashes GUI

2011-01-14 Thread John Coppens
Hello people.

While updating an old program, warning messages started to appear
each time a ComboBoxEntry dropdown button was pressed:

GLib-GObject-WARNING **: gsignal.c:3081: signal name `depressed' is
invalid for instance `0x89c8e0' aborting...

This seemed innocent enough, so I tried to run the program with
--g-fatal-warnings in gdb. The program ran fine till the dropdown
button was pressed. Then most of XFCE blocked completely (only the
clock was updating). No closing windows, no changing desktops...

Of course, no debugging info either. I googled this error, and found a
few instances of the same problem, but this was ignored by all
responders.

I was using gtk+ 2.20.1, glib-2.0 2.27.2...
I suspected a problem with glib 2.27, so reinstalled 2.26.1, same
problem.

Now compiling gtk+ 2.22.1...

I'd appreciate suggestions...
John


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


Re: Strange GObject warning, crashes GUI

2011-01-14 Thread John Coppens
On Fri, 14 Jan 2011 13:48:56 -0300
John Coppens j...@jcoppens.com wrote:

 Now compiling gtk+ 2.22.1...

It took a while, because for some reason the tutorial and faq would not
be generated. I had to remove them from SUBDIRS in docs/Makefile.am,
then run autogen.sh

Well, the error remains... Still get those

GLib-GObject-WARNING **: gsignal.c:3081: signal name `depressed' is
invalid for instance `0x8a0900'

messages.

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


Re: Anjuta tutorial.

2011-01-13 Thread John Coppens
On Thu, 13 Jan 2011 17:51:18 +0530
Karthikeyan Krishnamurthi karthick.k5...@gmail.com wrote:

   Am very new to Anjuta IDE.  Can anyone suggest me a good tutorial to start
 gtk+ programming in c with Anjuta IDE..

I think you are looking for a too specific item. There are quite a few
gtk+ tutorials on the 'net, and then look for the tutorial for Anjuta
on the Anjuta site.

Look for gtk application development (google ignores de '+' anyway)

And check the right column on:

http://www.anjuta.org/

Anjuta manual and Project build tutorial...

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


Re: embedding flash files into GTK application

2011-01-05 Thread John Coppens
On Wed, 5 Jan 2011 17:12:02 +0530
Guruprasad Bhat guruprasad...@gmail.com wrote:

 I am trying one gtk application in which i want embed some flash files. (
 audio video files) can somebody throw guidelines for this. Anyone tried
 something this kind of thing. Please suggest me.

Hwllo Guruprasad,

Have a look at the Ming library - you can use it in C, C++, PHP and
others:

http://www.libming.org/

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


Re: embedding flash files into GTK application

2011-01-05 Thread John Coppens
On Wed, 5 Jan 2011 12:54:52 -0300
John Coppens j...@jcoppens.com wrote:

 Have a look at the Ming library - you can use it in C, C++, PHP and
 others:

Sorry - this library permits creating flash movies in these languages -
not reproducing. I used it a time ago and seemed to remember it had a
player. 


Have a look at Gnash: http://gnashdev.org/

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


Left gravity problem.

2010-11-09 Thread John Coppens
Hello people.

I've made a small text editor, in which I want to insert markup. I used
the GtkSourceView widget.

If there is a selection, I want to insert tags around the selection,
and I'd like to remain the selection as it was. As I understand, this
means I have to define right_gravity to the left tag, and left_gravity
to the right one. 

This doesn't seem to make any difference... Left works, right tag
always lands inside the selection. To be sure of the order of the tags,
I even call gtk_text_iter_order.

Can someone indicate my problem?
John

  GtkTextIter start, end;
  GtkTextMark *start_mark, *end_mark;
  gboolean empty;
  char *p;
  
  empty = !gtk_text_buffer_get_selection_bounds(GTK_TEXT_BUFFER(src_bff), 
start, end); 
  if (empty) {
p = g_strdup_printf(%s%s, str1, str2);
gtk_text_buffer_insert(GTK_TEXT_BUFFER(src_bff), start, p, -1);
g_free(p);
  } else {
gtk_text_iter_order(start, end);
start_mark = gtk_text_buffer_create_mark(GTK_TEXT_BUFFER(src_bff), NULL, 
start, FALSE);   
end_mark   = gtk_text_buffer_create_mark(GTK_TEXT_BUFFER(src_bff), NULL, 
end, TRUE); 
gtk_text_buffer_get_iter_at_mark(GTK_TEXT_BUFFER(src_bff), start, 
start_mark);  
gtk_text_buffer_insert(GTK_TEXT_BUFFER(src_bff), start, str1, -1);

gtk_text_buffer_get_iter_at_mark(GTK_TEXT_BUFFER(src_bff), end, end_mark); 
gtk_text_buffer_insert(GTK_TEXT_BUFFER(src_bff), end, str2, -1); }
  }
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Invalid utf-8

2010-10-18 Thread John Coppens
On Mon, 18 Oct 2010 11:06:58 +0200
David Nečas y...@physics.muni.cz wrote:

 Are you sure that g_file_get_contents() returns no error?

Yes, I am sure... If I just change the accented letters in the text,
the same code works fine.

I'll compile your program this afternoon when I return home.

Which is the locale defined in your machine? Could that have any
influence on the workings of ...get_contents or ...set_text?

I have en_US.utf8 as default here.

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

Re: Invalid utf-8

2010-10-18 Thread John Coppens
On Mon, 18 Oct 2010 15:05:07 +0200
David Nečas y...@physics.muni.cz wrote:

 It works for me with any locale, e.g. with

Well, I wanted to do some tests, and returned the accented characters
to the file, and, surprise, the error is gone! I positively hate it
when this happens. I'll do some more testing tomorrow, and try ro
re-create the problem I had yesterday. I think I still have the files
saved that created the original error.

Guruprasad Bhat: Thanks for the suggestion. In this case, I'm quite
sure it's not a buffer size problem. The entire file is only a couple
of kB long, and the buffer from ..._get_contents is dynamically
allocated. 

Thanks all. I'll report back later.
John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Invalid utf-8

2010-10-17 Thread John Coppens
Hello all.

Trying to load a text into a GtkTextBuffer, I bumped onto the well-known
Warning, that the text wasn't valid utf-8.

Ok... There were two accented ó's in it, so I edited the file in utf-8
mode, and changed those characters.

Still, I get the invalid utf-8 warning! Googling, I found a suggestion
to run:

iconv -f UTF-8 /tmp/fpc2_31399.lst -o /dev/null

as validation, but I had no complaints from iconv.

I then tried:

   #!/usr/bin/perl

   f = open(/tmp/fpc2_31399.lst, r);
   fdata = f.read();
   fdata.decode('utf-8', 'strict');

   f.close();

Again - no complaints.

The file contains:

0080 55 6E 69 76 │ 65 72 73 69 │ 64 61 64 20 │ 43 61 74 C3  Universidad 
Cat. 
0090 B3 6C 69 63 │ 61 20 64 65 │ 20 43 C3 B3 │ 72 64 6F 62  .lica de 
C..rdob 
00A0 61 0A 0A 43 │ 6F 6D 70 69 │ 6C 65 72 20 │ 6C 69 73 74  a..Compiler list

So, the utf-8 sequences are 0xC3 0xB3, which seem valid enough (C3 + B3 - F3)

Finally, I gave up, and modified the generated text.
Why can't I read the text into the TextBuffer? (It's not a trailing \0,
I specify the length).

John

PS:
This is the code used to read the file, and set TextBuffer:

g_file_get_contents(fname, bff, len, err);
gtk_text_buffer_set_text(list_bff, bff, len);

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

Button click regression?

2010-08-23 Thread John Coppens
Hello people,

A while ago,  a bug was corrected (about version GTK 2.0 2.18.x) to
correct a problem clicking a button. The issue was that the cursor had to
leave the button and re-enter it to re-enable clicking (it lost focus).

This was at the time a long-standing problem, and was nicely solved after
several iterations.

I have the impression this problem returned. E.g., in Sylpheed, I have to
leave and reenter 'Get' messages, else it won't work.

Anyone know about this? I can't seem to find any reference.

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


Re: Anyone for CMake?

2010-06-26 Thread John Coppens
On Sat, 26 Jun 2010 10:07:16 +0100
John Emmas john...@tiscali.co.uk wrote:

 I just wondered if there's ever been any discussion in the *nix
 community about moving away from Autoconf/Automake in favour of CMake?
 I guess this topic must have come up several times already, so what
 were considered to be the pros and cons?  At first glance, CMake seems
 to be a lot more modern and certainly a lot friendlier towards the
 other major platforms, as well as *nix.

Did you read this article? It seems to sum up the issue quite nicely:

http://lwn.net/Articles/188693/

The discussions are interesting too.

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


Strange gnome-config problem

2010-05-03 Thread John Coppens
I know, gnome-config is deprecated.

This is an older test program, and, if I can avoid it, I'd rather not
modify the code too much. I have plenty programs that have similar code
which works fine.

The program is rather simple:

I have a line (the first one actually), that does:

var = gnome_config_get_float_with_default(path2, def);

(path2 is dds_control/dds/ref_clock=25.0, var is a double)

This produces the following error message (twice):

(dds_controller:6714): Gnome-CRITICAL **: gnome_program_locate_file:
assertion `program != NULL' failed

I ran this by gdb, with --g-fatal-errors, and get the following backtrace:

#0  IA__g_logv (log_domain=0x7f72fe9b66f0 Gnome, 
log_level=G_LOG_LEVEL_CRITICAL, 
format=0x7f7302858697 %s: assertion `%s' failed,
args1=0x7fff0ce478c0) at gmessages.c:512
#1  0x7f7302805023 in IA__g_log (log_domain=0x7f73025b8a00 , 
log_level=37256104, 
format=0x51 Address 0x51 out of bounds) at gmessages.c:526
#2  0x7f72fe9b1538 in gnome_program_locate_file (program=0x0, 
domain=GNOME_FILE_DOMAIN_CONFIG, 
file_name=0x65eaa0 gnome/config-override/dds_control,
only_if_exists=1, ret_locations=0x0) at gnome-program.c:911
#3  0x7f72fe9adbaf in access_config_extended (mode=value optimized out, 
section_name=0x65e91c dds, key_name=0x65e920 ref_clock,
def=0x65e92a 25.0, rel_file=0x65e910 dds_control,
def_used=0x7fff0ce48bcc) at gnome-config.c:557
#4  0x7f72fe9ae5aa in gnome_config_get_float_with_default_(path=value 
optimized out, 
def=0x7fff0ce48bcc, priv=0) at gnome-config.c:1486
#5  0x7f73025bf616 in load_by_table (fn=0x409ea0 dds_control, 
tbl=value optimized out, len=6, def_file=1) at confmgr.c:530
#6  0x0040360a in main (argc=1, argv=0x7fff0ce48cf8) at main.c:38

I see (#3) that the path is parsed correctly. #2 seems correct too, but then #1 
seems to 
go wrong: 'format=0x51' is definitely wrong.

Can anyone suggest where to look? Google wasn't too helpful with the original
error message (only 10 hits).

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


Re: Resizing

2009-10-07 Thread John Coppens
On Wed, 7 Oct 2009 10:23:00 +0100
jcup...@gmail.com wrote:

 You need to put stuff inside something which can get larger. I'd put a
 scrolledwindow inside the vpane, then the frame and the table inside
 that.  This will mean if the table gets bigger than the vpane, it'll
 get scrollbars.

Thanks, John. That solves part of the problem. Now the table remains
inside the frame when it grows...

I have a more fundamental problem though: Recalling the structure:

Window
   VBox
  Top: Menu
  Btm: HPaned
  Left: VPaned (works fine)
  Right: Frame with table (with ScrollWdw, ok)

But, if I enlarge the outer window, the Vbox doesn't grow: the menu stays
the same width, as does the HPaned.

I've checked the properties of all of the elements, and, as far as I can
see, all the resizing/etc flags which could influence, are set.

I have done several programs which use this structure - never had any
problem with resizing the menu!

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


Resizing

2009-10-06 Thread John Coppens
Hello all,

Though I've read a load of pages, I can't seem to solve the following
problem:

- I have a (top-level) window, with a vbox, then a vpanel, a frame, an
'alignment' and a table (listed in the order of nesting).

When I change something in the table, which makes it wider, the table
gets wider, wider than the frame, which doesn't resize, and neither does
the rest upwards in the hierarchy. 

I understand that normally the size allocation starts from the window
down. How do I resize from de table up?

I tried with gtk_container_check_resize on the top vbox, and several
other tricks but I can't get it to work.

Any references to examples, suggestions?
John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Error in gthread.h?

2009-09-30 Thread John Coppens
Hello people.

After a month of switching to 64 bits, I'm still recompiling old
software. Most of this goes really very smoothly, but today I hit a snag
for which I can't seem to find a solution.

I get this error during compilation of my program:

/usr/include/glib-2.0/glib/gthread.h: In function ‘g_once_init_enter’:
/usr/include/glib-2.0/glib/gthread.h:344: warning: cast to pointer from
integer of different size

The offending line is:

  if (G_LIKELY ((gpointer) g_atomic_pointer_get (value_location) != NULL))
return FALSE;
  else
return g_once_init_enter_impl (value_location);

Though the (gpointer) cast seems unnecessary (The definition I found
already declares g_atomic_pointer_get as gpointer), I can't really find
any other problem (removing the cast doesn't change anything).

I've looked around the 'net, but can't find any reference to this problem.

Please, suggestions!

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

Re: Error in gthread.h?

2009-09-30 Thread John Coppens
On Wed, 30 Sep 2009 16:12:50 -0700
Brian J. Tarricone br...@tarricone.org wrote:

if (G_LIKELY ((gpointer) g_atomic_pointer_get (value_location) !=
  NULL)) return FALSE;
else
  return g_once_init_enter_impl (value_location);
 
 It's just a warning.  In this case, it's harmless.  Might want to report
 it as a bug, though.
 
 I think you've hit a semi-bug in gatomic.h -- if
 G_ATOMIC_OP_MEMORY_BARRIER_NEEDED isn't defined, g_atomic_pointer_get
 just expands to a dereference of the argument, cast to gpointer.  Since
 the argument passed is a gsize, they don't match -- though they should,
 because gsize should be a typedef for unsigned long on x86_64, which is
 a 64bit quantity... so maybe this is a problem, though something more
 about your installation of glib than an actual bug.  Hard to say.

Mmmm... I hadn't realized that this might have something to do with the
compatibility libraries I installed a week ago. They installed well, and
I have googleearth running, but they may have broken compilation in 64
bit mode. I also received the following:

/usr/include/glib-2.0/gio/gioenums.h:561: error: ‘GLIB_SYSDEF_AF_INET’
undeclared here (not in a function) 
/usr/include/glib-2.0/gio/gioenums.h:562: error: ‘GLIB_SYSDEF_AF_INET6’
undeclared here (not in a function) 

And I can't seem to find a definition of those macros anywhere (not even
in the glib source tree).

I have no clue as to where to start looking for either issue. Or where
best to search for help :(

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

Re: Error in gthread.h?

2009-09-30 Thread John Coppens
On Wed, 30 Sep 2009 16:38:10 -0700
Brian J. Tarricone bj...@cornell.edu wrote:

 That's odd.  Are you sure you don't have mixed versions of glib
 installed somehow?

I was convinced that I hadn't, because I installed both from Slackware
13.0 (32 and 64bit). But now I remember compiling Inkscape SVN, and that
needed a more recent version of glib (and I had to use SVN because of
problems with poppler).

So, I'm supposing the install of the compat libraries overwrote the
includes of the 64 bit version. 

If I re-install the (newer) 64 bit version of glib, will the 32 bit
version remain functional, or do I have to make a 32 version too?

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


Re: Error in gthread.h?

2009-09-30 Thread John Coppens
On Wed, 30 Sep 2009 17:11:19 -0700
Brian J. Tarricone bj...@cornell.edu wrote:

  So, I'm supposing the install of the compat libraries overwrote the
  includes of the 64 bit version. 
  
  If I re-install the (newer) 64 bit version of glib, will the 32 bit
  version remain functional, or do I have to make a 32 version too?
 
 Probably safest to do both...  Stuff linked to the old version should
 continue to work as is, but you might encounter compilation/linker
 problems later on if you try to build a 32bit app against the newer
 headers that don't match the 32bit binaries.

Mystery solved, it appears. Slackware64 had the wrong environment
variables set for pkg-config (/usr/lib and /usr/local/lib instead of the
64 bit versions). 

Thanks for the hints, Brian!

John


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


Re: usb plug/unplug notifications

2009-07-09 Thread John Coppens
On Thu, 9 Jul 2009 17:38:24 -0500
Garth's KidStuff garthskidst...@gmail.com wrote:

 I'd like to know how to intercept usb events.  Right now, I'm polling
 for changes, but that isn't the right way to handle device
 discovery.  Is there a way to get a notification when something happens
 in the usb world?

In recent distributions, udev is used. udev manages all hardware events,
and executes rules which are located in (possibly several) locations.
One such location is /usr/udev/rules. You can edit those rules to make
events call your programs, modify things, etc. 

The syntax of the rules is relatively simple and powerful, and you can
edit them with a simple editor. The command

udevadm monitor

will show you the events on the terminal, as a way to look at the events
that are detected. Do a 'man udev' for more info.

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


Re: Popup window for alert

2009-03-18 Thread John Coppens
On Wed, 18 Mar 2009 16:55:35 -0600
Jeffrey Barish jeff_bar...@earthlink.net wrote:

 I would like a popup window with a black line on its border in which I
 can put a label to alert the user to a failure condition.  A Dialog
 doesn't work because the appearance and disappearance of the window is
 entirely under program control.  A WINDOW_POPUP doesn't work because it
 lacks the black line on its border (even when I set decorate).  A
 WINDOW_TOPLEVEL is almost right, but I would prefer that the destroy
 button and the window menu button not appear -- not to mention the
 title bar at the top.  Is there a way to make any of these things
 disappear?

You can do everything with a normal window, Jeffrey. Look up the right
functions, but you can:

1) Make de decorations disappear, leaving a clean rectangle.
2) Put an image on the background, with the black border you want,
   making it fill the window entirely,
3) Put a label in the center of that window, and enter the text you
   wish to show.

You might want to search for the many examples of 'splash screens' with
GTK available on the 'net.

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


Generic debugging question.

2009-03-03 Thread John Coppens
This could be somewhat off topic... On the other hand it seems to happen
in the idle loop of GTK.

I have this app running, and it generates this SegFault:

Program received signal SIGSEGV, Segmentation fault.
0x0003 in ?? ()
(gdb) bt
#0  0x0003 in ?? ()
#1  0x0002 in ?? ()
#2  0x006d in ?? ()
#3  0x0002 in ?? ()
#4  0x003d in ?? ()
#5  0x081fc920 in ?? ()
#6  0x0045 in ?? ()
#7  0x0820cdf8 in ?? ()
#8  0xb7447710 in ?? () from /opt/gnome/lib/libgobject-2.0.so.0
#9  0x in ?? ()

I can't put my finger where this error could be generated (the backtrace
doesn't help much). It happens after calling a GtkDialog, but I traced
the call after the gtk_widget_destroy(), and I can't detect any problem.

The values in the bt are quite strange...

Does anyone recognize this?

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


GtkCalendar

2009-03-01 Thread John Coppens
Hello people.

I wonder how to solve this elegantly:

If I first set the day of the GtkCalendar, I sometimes hit an error
depending on the number of weeks in the following month.

If I set the month first, I have the same problem, depenging on the day
selected previously. 

In both cases, the error message is:

Gtk-CRITICAL **: calendar_invalidate_day_num: assertion `row != -1' failed

I can understand why the error appears, but I don't see how to remedy it.
Do I have to produce some code to test if the date/month I want to set
will appear on a correct row? Seems to me it is the responsability of the
widget to provide a way to validly change in any order.

John

PS: also tried to change the properties in one gtk_object_set, but that
gives the same result.

Changing the structure's variables directly doesn't produce an update of
the display.

Freeze and thaw are deprecated, and could've been a solution.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Bug in GtkFrame?

2009-02-27 Thread John Coppens
Hello people.

When a frame is set non-sensitive, a bar appears through (in reality,
behind) its label. I thought I was imagining it, but enlarging with xMag,
_did_ make it very clear!

Am I doing something wrong here, or should I really submit this as a bug?

John
PD: Attached a screenshot of the frame.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: GTK warning

2009-02-22 Thread John Coppens
On Sat, 21 Feb 2009 08:16:44 -0700
Jeffrey Barish jeff_bar...@earthlink.net wrote:

 I hate the warning messages that GTK provides because they rarely help
 me find the problem.  What does this one mean?
 
 /myprogram.py:118: Warning: g_object_unref: assertion
 `object-ref_count  0' failed
   self['myimage'].set_from_pixbuf(mypb)
 

Hi Jeffrey,

As I told in a previous meesage, which either didn't go out or didn't go
to the list, the trick is to start python with --g-fatal-warnings. You
can't do that directly, but I believe the trick is to 

python yourprog.py --g-fatal-warnings

The gtk module will take the arguments and generate the exception at the
point where the error above occurs. Then, you can look at the backtrace
to determine which line in the program caused it. This tutorial seems a
bit outdated, but helpful:

http://www.pygtk.org/pygtktutorial/ch-gettingstarted.html

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


Adding menu items dynamically

2009-02-18 Thread John Coppens
Hello people.

I'm still getting my feet wet with Glade3... I defined a menu, which works
fine, but now I want to add items to one of the submenus by program, and
I'm stuck. I did find several other people with similar problems though
(no solutions).

Glade3, via gtk-builder-convert, seems to convert the menu things to a
series of GtkActions, and a structure which defines the menu format. I
was able to create and add a new action. I can generate the menu widget
for that action, but I cannot find a way to append it. (I cannot seem to
access the menubar/menu structure)

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


Re: GTK+ 2.15.4 released

2009-02-18 Thread John Coppens
On Tue, 17 Feb 2009 19:23:00 -0500
Matthias Clasen mcla...@redhat.com wrote:

 GTK+ 2.15.4 is now available for download at:

I believe the change was made a longer time ago, but for some reason,
changing from 2.14.7 to 2.15.4, the default invisible character changed
from an asterisk to a horrible bullit. In the installed font (here), this
bullit is _huge_ and ugly.

Can I redefine this character somewhere globally?

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


Re: Adding menu items dynamically

2009-02-18 Thread John Coppens
On Wed, 18 Feb 2009 12:12:05 -0500
Tristan Van Berkom t...@gnome.org wrote:

 At the risk of sounding redundant, this will work better without the
 conversion script and with the Glade tool conversion routine.

You mean, marking the project as GtkBuilder and save it as such? I did
some tests at the beginning of my using Glade-3, and could not get the
xml to load in GtkBuilder.

Just tried again, and I get a _huge_ number of warnings about menuitems
available only in GTk 2.16.x when saving. The menu is saved as
menu/menuitem... That's nice - and it works even with GTK+-2.15.4, it
seems.

But, the '*' bug reappeared! Saving as GtkBuilder doesn't save '*' as
invisible character for a GtkEntry. (It finally did when saving as
libglade, http://bugzilla.gnome.org/show_bug.cgi?id=572271)

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


Re: Adding menu items dynamically

2009-02-18 Thread John Coppens
On Wed, 18 Feb 2009 13:28:49 -0500
Tristan Van Berkom t...@gnome.org wrote:

 That is very strange, your telling me that the asterisk saves in
 libglade format but not in GtkBuilder format ?

Since I sent the message, I did several more tests, and apparently it
doesn't get saved anymore - at all. 

I wonder why it seemed to work after recompiling, but that must have been
an error of mine. So, I'll reopen the bug.

Sorry for the confusion...
John

The fact that the 'group' property for radiobuttons seems to be
uneditable (either by hand or by editor) - could you give an idea of
where to look for the cause?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Strategy for furute programs?

2009-02-12 Thread John Coppens
On Thu, 12 Feb 2009 11:30:42 +0100
Murray Cumming murr...@murrayc.com wrote:

 On Tue, 2009-02-10 at 18:43 -0200, John Coppens wrote:
  Long time ago I wrote a program to manage my wife's pharmacy, and this
  involves (among other things) several windows with many modifiable
  widgets (checkbuttons, entries, spinbuttons, etc.)
 
 I suspect that Glom would make this much simpler, if you like that kind
 of thing.
 http://www.glom.org/

Interesting... but even the 'sales pitch' on the first page doesn't
really give the impression that anything will be working soon.

Thanks for the hint, Murray!
John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Date edit widget?

2009-02-12 Thread John Coppens
Hello people.

Once upon a time there used to be a gnome_date_edit widget. But with the
tendency to eliminate most of gnome ui things, I was looking what to use
if some GTK replacement existed instead.

I only found GtkCalendar - but I don't want an entire calendar on my
forms! Anyone know if there is some practical replacement for a date
(+time) editor?

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


Strategy for furute programs?

2009-02-10 Thread John Coppens
Hello people.

Last week, I've been experimenting and learning about many of the newer
goodies in GTK, GtkBuilder, GConf and now I'm confused and looking for
advice.

Long time ago I wrote a program to manage my wife's pharmacy, and this
involves (among other things) several windows with many modifiable
widgets (checkbuttons, entries, spinbuttons, etc.) These have all to be
initialized before editing, and read back for saving.

Things as I understand them with GtkBuilder, I can't find addresses of
the widgets after I close GtkBuilder, so I have two options:

1) maintain a long list of widget references in my program to be able to
access them later, with the corresponding widget names to get them from
Builder in the first place.

2) Implement many callbacks to fill them in and read the changes (not
very practical).

Of course, in case of the program configuration I also have to maintain a
long list of GConf keys, type info, appart from the widget references and
names. More than 100 modifiable items in the config!

Is there some magical way to simplify this process? At least at first
sight, it seemed more simple in Glade-1/2, where I could simply
lookup_widget when I needed the widgets. Am I missing something here?

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


Re: Strategy for furute programs?

2009-02-10 Thread John Coppens
On Tue, 10 Feb 2009 18:43:19 -0200
John Coppens j...@jcoppens.com wrote:

 furute programs?

future programs - sorry for the typo.

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


i18n, intltool problems

2009-02-05 Thread John Coppens
Hello people.

Previously developping mainly with glade1 and glade2, glade3 now requires
to write the code separately. This made me look into Anjuta and other
alternatives. 

During several tests, I came across the famous your intltool is too old.
You need intltool 0.35.0 or newer. I have 0.40.5 installed, as shown by:

$ intltool-update --version   
intltool-update (intltool) 0.40.5

I traced the problem to the configure test, where it tests for the version
of intltool, by reading the contents of intltool-update.in where $VERSION
appears. But in those cases where the test fails, that file was either
non-existent or empty (in the case of auto-generated files, eg. when
making a new project in Anjuta). 

I tried to follow the i19n-howto in the intltool package, but I have the
impression that it is hopelessly outdated. I tried to find out where the
problems lie, solved some, but finally got stuck.

Questions:

1) Anyone know how to get the 0.35.0 version problem solved? Is there a
new m4 macro to test for that version?

2) Is there an up-to-date Howto for the entire aclocal/automake/intltool
etc workflow? Maybe publish the original on the list and everyone add
modifications to get it working again?

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


Re: i18n, intltool problems

2009-02-05 Thread John Coppens
On Thu, 5 Feb 2009 14:05:04 -0200
John Coppens j...@jcoppens.com wrote:

 During several tests, I came across the famous your intltool is too
 old. You need intltool 0.35.0 or newer. I have 0.40.5 installed, as
 shown by:
 
 $ intltool-update --version   
 intltool-update (intltool) 0.40.5

Solved this one partially... There was another intltool.m4 laying around
which contained the wrong macro. Now the test succeeds, but I get:

Syntax error near unexpected token '0.35.0'. The corresponding line in
the configure script is:

IT_PROG_INTLTOOL([0.35.0])

Suggestions?
John

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


An 'oldie' question... GtkCList anyone?

2009-01-27 Thread John Coppens
Hello people.

In the process of converting an old program from mSQL to MySQL, I found a
couple of potential traps and optimized a couple of functions. I now have
a problem with adding lines into a GtkCList using gtk_clist_append. The
code is like this:

char *bff, str[4];

bff = strdup(abc|def|ghi|etc); Just to show bff has to freed later
splitline(bff, str);This puts pointers into str to each of
the substrings (at the start and
after each |, converting them to \0 ) 
gtk_clist_append(clist, str);   Add the line,
g_free(bff);

It looks as if the g_free happens before the append, because gibberish
appears on the screen.

Is there a way to assure the append is finished before the g_free? 

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


Re: An 'oldie' question... GtkCList anyone?

2009-01-27 Thread John Coppens
On Tue, 27 Jan 2009 15:53:03 +0100 (CET)
Tomas Soltys tomas.sol...@range-software.com wrote:

 Hi,
 
 try to declare str as:
 
   char *str[4];

Thanks for the suggestion, but it _was_ defined as a *str[4], of course.
I probably would've experienced a lot of SEGFAULTS if not.

Sorry for the typo.

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


Re: An 'oldie' question... GtkCList anyone?

2009-01-27 Thread John Coppens
On Tue, 27 Jan 2009 17:02:32 +0100
Nicola Fontana n...@entidi.it wrote:

 first of all I warmly suggest you to update your code to
 GtkTreeView. GtkCList is not maintained since ages: you'll
 surely meet bigger problem than this and you'll be alone.

Yes - I'm planning on doing that. But the application has _lots_ of
CLists. In fact, I've been think about emulating CLists with GtkTreeView
so I can get on without changing the program. Has anyone done that - at
least a subset of the CList functions? 

 Anyway, apart from the typo, I suspect the str array should be
 NULL terminated because there's no other way gtk_clist_append()
 can know how many line to append.

gtk_clist_append appends only 1 row, so that shouldn't be the problem. The
elements in the str[] array correspond to cells, the number is defined in
the CList, at creation time (gtk_clist_new takes nr of columns as
parameter). Number of columns in a CList cannot be changed dynamically.

John


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


Re: loading pixmaps from the C source

2008-10-22 Thread John Coppens
On Wed, 22 Oct 2008 18:13:41 +0300
Henri Häkkinen [EMAIL PROTECTED] wrote:

 I am writing a simple GTK+ 2.0 application which uses the GNU build
 system. The application opens a status icon on the system tray area and
 the icon is loaded from a image file. By default, the icon gets
 installed to the usual location (/usr/local/$PACKAGE/pixmaps), but the
 user may choose to install the package to some other place by using
 --prefix etc. configure script options.

I may be mistaken, but the normal path where the icons are searched is

$prefix/share/pixmaps/$package/

So, if a user configs with a different --prefix, the pixmaps will be
installed relative to that prefix.

You can add dirs to the searchpath in your .gtkrc-2.0:

pixmap_path /opt/gnome/share/pixmaps

The default path is where gtk+ is installed.

This may all be wrong, but it's how I got things working here ;-)

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


Re: Drag'n'drop problems

2008-09-08 Thread John Coppens
Thanks, Jeffrey, but:

On Mon, 08 Sep 2008 08:19:42 -0600
Jeffrey Barish [EMAIL PROTECTED] wrote:

 The first argument only has to match the first argument of the source.

This does not seem to be true. If I replace

  {GTK_TREE_MODEL_ROW, GTK_TARGET_SAME_APP, 0} // This works

by, eg.:

  {STRING, GTK_TARGET_SAME_APP, 0}// Doesn't work

So the string _is_ interpreted somewhere (outside of my program, that is).
To be specific, the drag seems to work, but drop doesn't - no event is
generated in the second case. BTW, it's not just STRING. I tried with
several other things, like xml_node_pointer (which described what I was
doing), but that didn't work either. 

 There is some information in this tutorial:
 
 http://scentric.net/tutorial/sec-dnd.html#sec-dnd-selected-item-info

I had found this tutorial, but was somewhat concerned about the '***needs
revision***' statement, and also, it uses the lowest level of interface,
using x and y coordinates. I tried some versions of this, but couldn't
get it to work. Thinking back now, the problem might have been with the
Target string.

 There is also some good information in:
 
 http://www.pygtk.org/pygtk2tutorial/sec-TreeViewDragAndDrop.html

There's a C version of this Python tutorial somewhere (I've downloaded
the C code, but lost the URL). It works well, but only drops are shown,
and then only simple strings. I do commend the python guys though - I'm
tempted to switch to Python just for the better docs.


The problem I'm now stuck with is what to do with the path I receive in
data_received (the destination path). I made a simple (destination) tree,
and get 'drop possibles' like this:

- Ok
Main item-- Ok
- No
  --- Ok
  Subitem 1 No
  --- Ok
  Subitem 2 No

BUT, if I convert those paths into iters, and set some data, I'm
destroying the next existing item. Do I have to insert an item before the
path/iter? I'll try that next. It wouldn't explain why I get a 'possible'
on Main item though.

Thanks for the hints, Jeff...
John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Drag'n'drop problems

2008-09-08 Thread John Coppens
On Mon, 08 Sep 2008 11:03:39 -0600
Jeffrey Barish [EMAIL PROTECTED] wrote:

  So the string _is_ interpreted somewhere (outside of my program, that
  is). To be specific, the drag seems to work, but drop doesn't - no
  event is generated in the second case. BTW, it's not just STRING. I
  tried with several other things, like xml_node_pointer (which
  described what I was doing), but that didn't work either.
 
 I was going to tell you that you are crazy, but when I tried putting
 GTK_TREE_MODEL_ROW in my program in place of the arbitrary string that I
 was using, I found that the behavior of my program changed to something
 bizarre (I get too many signals).  So I am forced to agree that
 GTK_TREE_MODEL_ROW is interpreted somewhere.  It's news to me.  I have
 always used an arbitrary string that matches in the source and
 destination specifications.

Thanks for that test - it does eliminate fears of other problems in my
program... In my case it was simple - with anything but
GTK_TREE_MODEL_ROW the drop callbacks are _not_ called at all. The
question is (for me, at least): where is the list of predefined values?

  The problem I'm now stuck with is what to do with the path I receive
  in data_received (the destination path). I made a simple
  (destination) tree, and get 'drop possibles' like this:
  
  - Ok
  Main item-- Ok
  - No
--- Ok
Subitem 1 No
--- Ok
Subitem 2 No  
  
  BUT, if I convert those paths into iters, and set some data, I'm
  destroying the next existing item. Do I have to insert an item before
  the path/iter? I'll try that next. It wouldn't explain why I get a
  'possible' on Main item though.
 
 The PyGTK FAQ has some hints:
 
 http://faq.pygtk.org/index.py?req=showfile=faq13.030.htp

Ok - that example doesn't use DnD, it directly pushes a row up or down,
but maybe it clears up some things about the insertion. Also, as far as I
can understand it, it works only for GtkListStores, not for TreeStores.

Maybe I have to go back to the lower level interface (the one with the x
and y coordinates).

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


Re: Drag'n'drop problems

2008-09-08 Thread John Coppens
On Mon, 8 Sep 2008 22:27:08 +0200
Kristian Rietveld [EMAIL PROTECTED] wrote:

 This function will actually set up the tree view as a model drag
 source and destination (via
 gtk_tree_view_enable_model_drag_{source,dest}) and will specify a
 target entry using GTK_TREE_MODEL_ROW as a target string.
 
 Unfortunately the default implementations of the GtkTreeDragDest
 interface that are in the GtkListStore and GtkTreeStore models can
 only handle the GTK_TREE_MODEL_ROW target.  One of the things you can
 try is subclass GtkListStore or GtkTreeStore and re-implement the
 GtkTreeDragDest interface.  If that is not enough, I think another
 thing that people tend to do is even override the default
 implementation of drag and drop on the tree view widget.

Hello Kristian,

Yes, that is what I found out. Most implementations seem to use the lower
level interface. Is GTK_TREE_MODEL_ROW the only string that is
interpreted as special? Or does any of the frequently used ones, like
'STRING' 'TEXT', 'INTEGER', 'text/plain', also have side-effects?

 This recent blog entry (and the preceding one) of Davyd may be of use:
 http://davyd.livejournal.com/252082.html

Interesting, particularly the part of how to copy data into the
selection - I hadn't seen an example of that elsewhere.

 I fully agree that the current implementation of drag and drop in tree
 view is suboptimal, especially in terms of ease of use and
 extensibility.  Over the summer I started on a rewrite of this, but as
 University has started again I cannot really say when this will be
 finished :)  But at least improvements are (finally) in the works.

Nice to see a student who takes his studies seriously! Best of luck...

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


Re: Drag'n'drop problems

2008-09-07 Thread John Coppens
On Sat, 6 Sep 2008 11:58:00 -0300
John Coppens [EMAIL PROTECTED] wrote:

 I couldn't find a list of valid format
 descriptions. Can anyone point me in the right direction?

Adding some more info: I found an (incomplete) chunk of code on the net
that defines the row data in the GtkTargetEntry array as:

  {GTK_TREE_MODEL_ROW, GTK_TARGET_SAME_APP, 0}

I put this in my program, and behold, it worked. I searched for
GTK_TREE_MODEL_ROW as a target type, but couldn't find any reference to
that... So can anyone tell me what the possible values are?

And I'm still interested in an example on how to process row data
received from a drop, into a gtk_tree_store. I promise to write a
tutorial if I can get to understand this.

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


Drag'n'drop problems

2008-09-06 Thread John Coppens
Hello people.

I was playing around with the idea of a specialized editor with a
facility to drop macros into the a structure tree, using DnD.
This would boil down to DnD between two TreeViews.

Preliminary research showed a confusion of information on the net, which
I categorized into (at least) 3 methods: 

- really low level DnD at widget level,
- Higher level DnD at TreeView level,
- High level DnD at TreeModel level.

All tree involve (unless I'm very mistaken) defining Target lists which
have an 'ascii' format description, flags, and a numeric type (more or
less corresponding to the format). I couldn't find a list of valid format
descriptions. Can anyone point me in the right direction?

I've done the following:

- 2 GtkTreeStores with separate Views (in the same app),
- One of them designated as drag_source, and with srci-drag_data_get
and srci-row_draggable assigned handlers for those events.
- The other TreeStore designated as drag_dest, and with
desti-row_drop_possible and desti-drag_data_received assigned handlers
for these events.
- Both are defined with the same GtkTarget[] list.

What happens: The drag starts (draggable and data_get are called), but no
signal is emitted in the destination widget. The only sign of recognition
in the destination are the selection effects when hovering (the line
above/below/around the target line) with the dragged object. 

In particular, 'drop_possible' is never called.

I've been at this for a couple of days, and with the different methods
available it is very difficult to find a simple and clear example.

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


Markup in GtkTreeViewColumns

2008-08-20 Thread John Coppens
Hello people.

It may be evident, but I can't seem to find how. I need to put markup in
the column title of GtkTreeViewColumns, as the column titles are
parameters with sub-indexes. (S11 etc).

Is this possible?

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


Re: Markup in GtkTreeViewColumns

2008-08-20 Thread John Coppens
On Wed, 20 Aug 2008 22:47:02 +0300
Paul Pogonyshev [EMAIL PROTECTED] wrote:

 John Coppens wrote:
  It may be evident, but I can't seem to find how. I need to put markup
  in the column title of GtkTreeViewColumns, as the column titles are
  parameters with sub-indexes. (S11 etc).
 
 Use gtk_tree_view_column_set_widget() on the column.  You can
 then use any widget as a title, including a label with markup.
 
 Paul

I _knew_ it had to be simple ;-)Thanks  lot, Paul!

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


Re: What's wrong with the docs?

2008-02-03 Thread John Coppens
On Sun, 03 Feb 2008 18:40:37 +0200
Stefan Kost [EMAIL PROTECTED] wrote:

  - Are those docs maybe declared unaccessible by the spider engines?
(by robots.txt or so)
 
 I guess library.gnome.org is just too new and maybe not linked that
 much yet (I used good to search for sites that link to it and found
 links inside it).

Mmmm... But, as far as I can see, library.gnome.org is a (very) nicely
reorganization of the same information that already existed. I check
some more, but many, if not all docs seem familiar. Eg. the GTK+-2.0
tutorial is still missing docs for several frequently used widgets 
(menus and menuitems, to name a couple)

X  
  - Or are those alternative languages just much more popular than C?
  
  Which makes this question pop up: Wouldn't it be interesting/practical
  to have _common_ documentation. Say, GtkWidget is used in Python like
  this, in C like this, etc.? I could even serve as an educational tool
  to compare languages.
 
 I though about this several times, but don't think it will work. Too
 much of the api is specific to the environment.

But with the power of modern computers it might not be impossible.
The texts are (mostly) common between all languages.

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


What's wrong with the docs?

2008-01-30 Thread John Coppens
Hello all...

There must be something terribly wrong somewhere, when I try to find
documentation on operation with GTK+ or GDK elements, I always seem to
get _much_ more documentation from the Python/Perl libraries than from
the actual C interface. I'm sure others noticed the same trend.

So, why is this?

- Are the original (C/C++) docs really so scarse they don't appear at
  the top of of the list? or...

- Is something in the google algorithms preferencial to anything but C?

- Are those docs maybe declared unaccessible by the spider engines?
  (by robots.txt or so)

- Or are those alternative languages just much more popular than C?

Which makes this question pop up: Wouldn't it be interesting/practical
to have _common_ documentation. Say, GtkWidget is used in Python like
this, in C like this, etc.? I could even serve as an educational tool
to compare languages.

Just idle thoughts...

John
___
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 insert a menu_item into the middle of a menu list ?

2008-01-27 Thread John Coppens
On Sun, 27 Jan 2008 22:42:47 +0800
Gregory Hosler [EMAIL PROTECTED] wrote:

 any thoughts or suggestions ?

Hi Greg.

I suspect you can insert the new element in the GList obtained by

gtk_container_get_children()

(or at least manage the order of the list after appending the new item)

John
___
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 insert a menu_item into the middle of a menu list ?

2008-01-27 Thread John Coppens
On Sun, 27 Jan 2008 22:42:47 +0800
Gregory Hosler [EMAIL PROTECTED] wrote:

 any thoughts or suggestions ?
 

Sorry about the previous message, Greg... I was writing from memory, and
seems memory didn't work as it should've...

The GList you obtain from _get_children is newly allocated so you can't
change anything there. 

But the MenuBar and Menu are both derived from MenuShell, which _does_
provide with several methods to manipulate items in the list, including
a  gtk_menu_shell_insert  to insert new items at a certain position.

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


Slow access to one directory

2007-07-18 Thread John Coppens
Hi all...

I'm experiencing terrible slowdown when accessing one directory. Lastly
it's the root directory, but I've know it to be other directories.

I first thought it was a firefox problem, but now I notice  it's also
present in GIMP. During the delay (which takes up to 20-30 seconds or so)
one of the CPUs is at 100%. Either entering or leaving the directory has
this delay. During the delay, 'top' marks GIMP (or whatever program is
doing the access) as taking up all CPU.

Accessing with xterm is instantaneous. The directory has few files (maybe
20/30). Any - _any_ - other directory is accessing much more rapidly.
After reboot, things normalise for a while. GTK libs are 2.8.20, distro
is Slackware. 

Anyone have an idea where to look? Is this some kind of cache problem?

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


Window resizing

2007-06-01 Thread John Coppens
Hi all...

I need a hand. In a program I have a small toolbar separate from the main
window. The toolbar is a GtkToolbar inside a GtkWindow. The problem is
that I cannot seem to make the GtkWindow resize to adjust to the toolbar
size (I want to switch vertical/horizontal). Also, I need to adjust to
other glyph sizes.

I tried to obtain the toolbar's size, but get the actual size, not the
one I need to show the toolbar completely.

It seems as if the toolbar doesn't have any influence on the window's
size...

Can anybody help?

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


Re: Window resizing

2007-06-01 Thread John Coppens
On Fri, 1 Jun 2007 22:13:47 -0300
John Coppens [EMAIL PROTECTED] wrote:

 Hi all...
 
 I need a hand. In a program I have a small toolbar separate from the
 main window. The toolbar is a GtkToolbar inside a GtkWindow. The
 problem is that I cannot seem to make the GtkWindow resize to adjust to
 the toolbar size (I want to switch vertical/horizontal). Also, I need
 to adjust to other glyph sizes.
 
 I tried to obtain the toolbar's size, but get the actual size, not the
 one I need to show the toolbar completely.
 
 It seems as if the toolbar doesn't have any influence on the window's
 size...

Quite accidently, solved! If the 'arrow' is enabled, no size requests
seem to go the window, because the 'arrow' on the toolbar would take care
of shifts anyway. 

Sorry for the noise...

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


Re: serial ports

2007-05-14 Thread John Coppens
On Mon, 14 May 2007 18:49:02 -
Pavel A. da Mek [EMAIL PROTECTED] wrote:

 When I want to use serial ports, shall I write separate code for
 Windows and for Linux, or is there some library function which would
 allow to do it in the platform  independent way? 

If I'm not mistaken (I don't use windows), look at the g_io functions, I
believe they are portable to Windows too. There may be a problem with the
names of the devices (COM1: vs /dev/ttyS0) or so, but that is relatively
easy to solve, I'd say.

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


Re: GDK_2BUTTON_PRESS and GDK_BUTTON_PRESS

2006-12-30 Thread John Coppens
On Thu, 28 Dec 2006 18:33:24 +0100
Enrico Sardi [EMAIL PROTECTED] wrote:

 How can I distinguish between  |||GDK_BUTTON_PRESS and a | 
 cid:part1.05080504.08050205@tiscali.it|GDK_2BUTTON_PRESS event?| 
 cid:part2.02010409.02050407@tiscali.it

Enrico,

This page explains how to detect double and triple clicks:

http://developer.gnome.org/doc/API/gdk/gdk-event-structures.html

John
___
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 Draw Bitmaps From FreeType?

2006-12-23 Thread John Coppens
On Sat, 23 Dec 2006 10:30:59 -1000
Eric Mader [EMAIL PROTECTED] wrote:

 I'm also thinking about creating a GdkPixbuf with a depth of 24 and 
 filling it by hand from the FreeType bitmap by copying the 8 bit pixel 
 value into all three components of the pixbuf. Will that work?

Eric,

Did you consider Cairo? It's not too difficult to use, and produces a
variety of output formats - both bitmap (PNG) and vector. It was
easier to use than the pixmap/pixbuf functions.

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


Re: Color selection

2006-12-21 Thread John Coppens
On Thu, 21 Dec 2006 11:24:19 +0300
Alexander S.Kresin [EMAIL PROTECTED] wrote:

 How can I convert them to the 0..255 for to be able to get Windows
 compatible long value by color.red + color.green*255 +
 color.blue*65535 ?

Divide them by 256?

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


Re: Finding Version of GTK installed

2006-12-06 Thread John Coppens
On Tue, 5 Dec 2006 09:42:02 -0500
David Vandepol [EMAIL PROTECTED] wrote:

 It appears that GTK isn't installed.  Just to be clear, GTK is installed
 with Red Hat OS correct?

Check if there is a -dev package for gtk+ (gtk+-dev... or something). I
believe redhat does install the basic gtk libraries, but not the headers
and the pkg-config info necessary.

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


Re: Finding Version of GTK installed

2006-12-05 Thread John Coppens
On Tue, 5 Dec 2006 09:42:02 -0500
David Vandepol [EMAIL PROTECTED] wrote:

   I'm still having problems.  When I run java tool and view all of
 the LaF's GTK is displayed, however gtk isn't available in the
 pkg-config

Hi David.

I'm not sure about this, but I suspect that if any other language would
want to know about the GTK version, the correct way to do it would be to
consult the pkg-config system. But the following functions/macros are
available in GTK+:

extern  const guint gtk_major_version;
extern  const guint gtk_minor_version;
extern  const guint gtk_micro_version;
extern  const guint gtk_binary_age;
extern  const guint gtk_interface_age;
gchar*  gtk_check_version   (guint required_major,
 guint required_minor,
 guint required_micro);

#define GTK_MAJOR_VERSION
#define GTK_MINOR_VERSION
#define GTK_MICRO_VERSION
#define GTK_BINARY_AGE
#define GTK_INTERFACE_AGE
#define GTK_CHECK_VERSION   (major,minor,micro)

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


Re: Finding Version of GTK installed

2006-12-04 Thread John Coppens
On Mon, 4 Dec 2006 13:09:46 -0500
David Vandepol [EMAIL PROTECTED] wrote:

 a gtk-config file is not created in /usr/lib or anyplace
 for that matter.  I was wondering if anyone knew how to determine the
 version of GTK installed, or any file(s) that would contain this
 information.

gtk-config was for GTK+ version 1.x. From 2.0 on, the version can
be interrogated by

pkg-config --modversion gtk+(for version 1.2.x)

pkg-config --modversion gtk+-2.0  (for version 2.x - the 2.0 is
misleading)

use --modversion, not --version (the latter will give you the version of
pkg-config)

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


Strange slowdown in one directory

2006-10-30 Thread John Coppens
Hi all..

Since a couple of weeks, I have a very strange thing with one partition
of my disk mounted as '/data'. GTK+ based programs seem to have
problems accessing this directory after some time.

When the app is recently started, access is fast. After a couple of
hours, it can take up over 30 seconds to 'enter' or 'leave' the directory
with the fileselection menu. I first thought it was a Firefox thing, but
now I'm noticing the same effect in GIMP.

D: contains a lot of files, but few in its root, which is where the delay
occurs. The machine is fast, and RAM is plenty...

Stopping the app, and restarting makes all delay go away. I first thought
about disk unreliability, but I've copied the contents to a new drive.
And its only the root dir in that partition...

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


Re: Pango advice?

2006-08-30 Thread John Coppens
On Wed, 30 Aug 2006 18:07:01 +1000
kadil [EMAIL PROTECTED] wrote:

 Hi, 
 
 I want to use pango in an app to render text to a drawingarea. I have
 seen examples that show how to render text in a textview, but not to a
 drawingarea. Can you specify the width of the layout to be rendered,
 into a drawingarea, with text wrapping and determine the height of the
 layout.
 
 Is there any docs that describe this, but I cannot find the info I am
 looking for. I am sure it is easy, once you know.

Look for Cairo. It's the easiest way to do it (I think).

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


Re: frequently updated pixbuf images disapear after a while

2006-08-26 Thread John Coppens
On Sat, 26 Aug 2006 15:50:07 +0200
rupert [EMAIL PROTECTED] wrote:

 I assume its some unfread memory, but i havent really been able to track
 this errors.

Not much of an expert either, here goes a suggestion:

I suspect you call that function each second. I don't see where you
release the pixbuf memory - maybe it's another function? Could it be that
you run out of memory and can't get new pixbufs anymore?

Maybe you can check that running 'top' while the program is running and
checking the remaining memory (or just the memory occupation). Also,  I
believe the new_pixbuf_from_file returns a NULL if there's a problem (you
don't check that).

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


Re: Signal Handling problems with own data

2006-08-18 Thread John Coppens
On Fri, 18 Aug 2006 07:03:41 -0700 (PDT)
NicolasA [EMAIL PROTECTED] wrote:

 In my case I want to pass two widgets(the two text entries)so that
 when my function is called, to access the two text entries, grab their
 contents and validate the username and password with the server. How
 can I pass both the text entry widgets to the function that is called
 after the emission of the button click signal?

You can make a struct with the pointers to two widgets inside, 

struct {
  GetWidget *name, *pass;
} myTwoWidgets;

or an array of two pointers

GtkWidget *myTwoWidgets[2]

and pass a pointer to the struct/array as data. In both cases you will
have to typecast the gpointer in the handler to the corresponding type.

If you're using Glade, you can also pass the reference to the parent
window, and do lookup_widget (parent, ) for each widget inside the
handler.

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


Re: Bug in GLib, libglade, libc??

2006-08-14 Thread John Coppens
On Tue, 15 Aug 2006 00:57:06 -0300
Fabricio Rocha [EMAIL PROTECTED] wrote:

   I have a suspicion from my lack of practice in C: a module of
 my program uses a structured type which must contain, as its last
 member, a dynamic list of strings, i.e., pointers to gchars (**list).
 Sometimes I need to fill only the first string, and sometimes I will
 need more than ...

Hi Fabricio.

Why don't you leave the administration of that list to GList? Check it
out. it is part of glib and very simple to use! And you can add as many
strings as you like, too.

John

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


Memory problem in Pango?

2006-07-25 Thread John Coppens
Hi all.

I was debugging a program of mine, and when I ran valgrind, I ran across
the following (which sounds quite important):

==30953==  Address 0x5F73D25 is 141 bytes inside a block of size 1,280 free'd
==30953==at 0x401A2F8: free (m_replacemalloc/vg_replace_malloc.c:233)
==30953==by 0x46B5DA9: _cairo_traps_fini (cairo-traps.c:84)
==30953==by 0x46A5F46: _cairo_clip_clip (cairo-clip.c:461)
==30953==by 0x46A86BB: _cairo_gstate_clip (cairo-gstate.c:1125)
==30953==by 0x46A3BD8: cairo_clip_preserve (cairo.c:2034)
==30953==by 0x46A3C01: cairo_clip (cairo.c:2001)
==30953==by 0x45C69DF: _gdk_gc_update_context (gdkgc.c:1243)
==30953==by 0x45C7E7D: get_cairo_context (gdkpango.c:207)
==30953==by 0x45C7FA6: gdk_pango_renderer_draw_glyphs (gdkpango.c:232)
==30953==by 0x46801F0: pango_renderer_draw_glyphs (pango-renderer.c:597)
==30953==by 0x468159C: pango_renderer_draw_layout_line 
(pango-renderer.c:528)
==30953==by 0x468194A: pango_renderer_draw_layout (pango-renderer.c:182)

Could this be a cause for concern?

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


Re: Question about gtk_label_set_justify()

2006-07-25 Thread John Coppens
On Tue, 25 Jul 2006 14:46:19 +0800
chao yeaj [EMAIL PROTECTED] wrote:

 Hello everyone
 
  You knowe ,there is a function called
 gtk_label_set_justify(),which used to modify the label's text'sjustify
 mode
 
   my code as follow
GtkWidget *label = NULL;
gtk_label_new( I am label!);
gtk_label_set_justify(GTK_LABEL(label),GTK_JUSTIFY_FILL);
 
 but ,this do not  work,  Why ?

According to the manual:

If you instead want to set the alignment of the label as a whole, use
gtk_misc_set_alignment() instead. gtk_label_set_justify() has no effect
on labels containing only a single line.


I need your help
 Any comments would be much appreciated,and 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
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: showing a logfile in a Textview(like tail -f)

2006-07-20 Thread John Coppens
On Thu, 20 Jul 2006 11:55:47 +0200
rupert [EMAIL PROTECTED] wrote:

 Currently i update a buffer with gtk_text_buffer_insert_at_cursor(data,
 line, -1);in a timeout, the problem here is that the new text gets
 copied at the and of the old text, i also tried gtk_text_buffer_insert,
 but that gives me no text or a segfault.

Rupert,

I see you do not use textiters - a very valuable tool. For example, if
you want to insert text at the beginning, start with
gtk_text_buffer_get_start_iter. This gives you a reliable point of
insertion, and permits you to gtk_text_buffer_insert, not relying on the
cursor, which the user could have changed by clicking.

Now, this doesn't garantee you that the added text will be visible
(generally, the cursor remains visible). But you can scroll by software
by manipulating the textview with  gtk_text_view_scroll_to_iter.

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


  1   2   >