Re: Gnome terminal feature: close button on tabs / modifying OSS



Hi,

On Mon, 2006-07-17 at 02:03 -0700, Fred H Olson wrote:
> Hi,
<snip>
> 
> Occasionally when I click a terminal tab (I often switch between them and
> a browser etc) I hit the close button on the tab by mistake.  There is no
> confirmation on the intent to close the tab.  Particularly in the case of
> the editor this can be quite disconcerting.  If I then re-open a tab with
> the profile that was accidentally closed it is usually out of order;
> another nuisance.

You can reorder the tabs by dragging them around on the tab-bar.  On
versions of g-t before 2.14, there was no close button on the tabs.
They were added in 2.14 to make it more like other gnome apps (gedit,
epiphany et. al.)

<snip>
> Anyway I'm looking for advice as to whether to pursue this.  How many
> subscribers to this list have modified an OSS program?  Is there other
> documentation that would get me started in understanding the Gnome
> terminal source?. Is Gnome terminal a resonable place to start playing?

If you don't know any C at all, looking through source may not be the
best way to start.  There are many free books available for download.
[1] and [2] are possible starting places (I really haven't look through
them though).  The advantage is that if you know 1 language (say, C)
other languages are easier to learn (like python).

If you know enough to feel comfortable navigating source code but don't
really know gtk+, try working through the gtk+ tutorial [3].  From
there, it should be somewhat simpler to follow what is happening in the
program (although keeping an API reference handy is always a good idea).

Unfortunately, there isn't any documentation that specifically deals
with gnome-terminal.  If the gnome-terminal source is still too daunting
to examine, there is the gnome-hello project (a basic "Hello World"
program from gnome) which has a similar directory layout to most
projects.  Try following what is happening in that code should give you
an idea of what to expect in other modules.

FWIW or if you want to just dive in, the close button type code is kept
in the file src/terminal-nootbook.c  You can see all the changes made to
the file by going to [4] and selecting "Diff to previous x" for the
revision your interested in.  The close button was introduced in version
1.3 of the file.  Revisions after this look like additional fixes to the
(close button) code - at least some of them.

Hope this helps
Don

[1] http://en.wikibooks.org/wiki/C_Programming
[2] http://publications.gbdirect.co.uk/c_book/
[3] http://gtk.org/tutorial/
[4]
http://cvs.gnome.org/viewcvs/gnome-terminal/src/terminal-notebook.c?rev=1.8&view=log






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]