Re: [anjuta-devel] A "Close All But This" Feature for Tabs
- From: Johannes Schmid <jhs jsschmid de>
- To: Varad Gautam <varadgautam gmail com>
- Cc: anjuta-devel-list gnome org
- Subject: Re: [anjuta-devel] A "Close All But This" Feature for Tabs
- Date: Mon, 01 Apr 2013 21:22:19 +0200
Hey!
Also, how do I use the DEBUG_PRINT statement? Where does it write to?
DEBUG_PRINT writes to stderr (maybe stdout not sure) in case you enable
the --enable-debug configure switch. You can control the output with the
ANJUTA_DEBUG environment variable. It's explained in the development
docs of DEBUG_PRINT().
In general, the easiest thing is to just add a breakpoint in the
debugger of the function you are interested in (for example if it is
called).
Regards,
Johannes
On Wed, Mar 27, 2013 at 2:36 AM, Johannes Schmid <jhs jsschmid de>
wrote:
Hi Varad!
> I want to add a "Close All But This" menu item that appears
in the
> right click menu for editor tabs (or make a menu appear on
middle
> mouse press on a tab, which I think would be better), that
lets users
> do the same if they have multiple editor tabs open. I would
like to
> have your opinions.
Please keep it in the right-click menu - a middle-click menu
is nothing
that is expected to exist in any gnome application.
> Here's what I think I need to do:
> - Modify the 'on_notebook_tab_btnpress/btnrelease' function
in the
> file anjuta-docman.c and add a 'gtk_notebook_remove_page'
call to
> remove the tabs.
>
> However, I still need to figure out how to make a menu
appear, which
> shouldn't be a problem.
The menu is defined in the .xml file together with the data
given in the
plugin.c file (the big arrays defined in the front of the
file). You can
simply add another menu item there together with necessary
seperators.
The callback (and code) for closing all other tabs already
exists (see
the menu item in the "Document" menu) and is defined in
action-callbacks.c (IIRC). So you just have to add the
callback for the
new menu item in the array.
Regards,
Johannes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]