[pygtk] A few quickies (IMPORTANT)

Hassan Aurag aurag@geocities.com
03 Nov 2000 07:28:24 +0500


--=-4UFxC7DK54/Ysa7sb7om
Content-Type: text/plain

 Hi,

 I'm writing a tool for internal use. Anyway, I build up a GtkCTree
containing info and where to find that info in the file (the char
positions) on a text file that I display in a GtkText. 

 The goal is to be able to click on a tree node and "jump" to its place
in the text file. Grabbing the info and connecting to the selection
event goes normal, but there are some problems

 I know GtkText is going to die, but for it's the only one I can use.
Anyway, I'll shoot my quickies:

1- For some unknown reason, insert_defaults(text) would change the
format of my text. Do you know why and how to prevent this? As far as I
guess, it has to do with empty spaces. And btw, there are no tabs in my
text file. I read the file using python and it prints ok (the read text)
on anything from terminal to emacs ... but not in the damn widget.

2-When I use set_position (or the other one, can't remember) to jump, it
jumps ok for the top parts of the file but fails miserably later. I
think it may have to do with point 1. The crazy part is that it still
reports the correct position and when I print that part of the string on
Python nothing is wrong, but all is in the widget. Any help?

3-What is a GdkColor? How can I get red, white, black ... and turn it
into a GdkColor?


Thanks a lot for reading thus far ;)


-- 
------------------------------------------------------------------
------------------------------------------------------------------
Hassan Aurag
------------------------------------------------------------------
CAE Electronics Ltd     |       Universite de Montreal
System update specialist|       Centre de Recherches Mathematiques
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Maximum Linux Magazine  |       Universite de Montreal
Contributing Editor     |       Departement de Maths/Stat
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EMAIL:  aurag@geocities.com
------------------------------------------------------------------
------------------------------------------------------------------

Drew's Law of Highway Biology:
        The first bug to hit a clean windshield lands directly in front
        of your eyes.
------------------------------------------------------------------

--=-4UFxC7DK54/Ysa7sb7om
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">

  
  

 Hi,

I'm writing a tool for internal use. Anyway, I build up a GtkCTree containing info and where to find that info in the file (the char positions) on a text file that I display in a GtkText.

The goal is to be able to click on a tree node and "jump" to its place in the text file. Grabbing the info and connecting to the selection event goes normal, but there are some problems

I know GtkText is going to die, but for it's the only one I can use. Anyway, I'll shoot my quickies:

1- For some unknown reason, insert_defaults(text) would change the format of my text. Do you know why and how to prevent this? As far as I guess, it has to do with empty spaces. And btw, there are no tabs in my text file. I read the file using python and it prints ok (the read text) on anything from terminal to emacs ... but not in the damn widget.

2-When I use set_position (or the other one, can't remember) to jump, it jumps ok for the top parts of the file but fails miserably later. I think it may have to do with point 1. The crazy part is that it still reports the correct position and when I print that part of the string on Python nothing is wrong, but all is in the widget. Any help?

3-What is a GdkColor? How can I get red, white, black ... and turn it into a GdkColor?


Thanks a lot for reading thus far ;)
-- 
------------------------------------------------------------------
------------------------------------------------------------------
Hassan Aurag
------------------------------------------------------------------
CAE Electronics Ltd | Universite de Montreal
System update specialist| Centre de Recherches Mathematiques
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Maximum Linux Magazine | Universite de Montreal
Contributing Editor | Departement de Maths/Stat
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EMAIL:  aurag@geocities.com
------------------------------------------------------------------
------------------------------------------------------------------

Drew's Law of Highway Biology:
The first bug to hit a clean windshield lands directly in front
of your eyes.
------------------------------------------------------------------
--=-4UFxC7DK54/Ysa7sb7om--