The current context is no longer built on demand. Instead, the view are
responsible for creating the new context whenever it makes sense (for
instance the selection changed), and pass it to the Context_Changed
signal. This lets views decide when a new context should be computed,
rather than let the caller decide.
In particular, editors will be able to update the context only when
the cursor location has changed (and after a short delay), rather than
for every button press signal (to optimize NB19-029).
Rename and simplify the profile for a number of subprograms related to
contexts, in GPS.Kernel.Modules.UI. In particular, the context creation
is always done via a new primitive operation of GPS_MDI_Child_Record,
and the context_func passed to Instrument_Contextual_Menu is now only
used to add entries to the menu, rather than also compute the context.
This context_func will be removed as soon as all contextual menus are
implemented via GPS actions or in the local config menu.
NB19-029 (2/2)
Change-Id: Ib68a848c62bbc20563e95f5a037e1b388a24ed51
Remove mention of the debugger console color highlight.
* gvd-consoles.adb:
(Initialize): Adapt to new profile of Set_Highlight_Color.
* gvd-preferences.adb:
(Register_Default_Preferences): Remove preference Debugger_Highlight_Color.
* gvd-preferences.ads:
Remove preference Debugger_Highlight_Color;
* default_preferences.adb:
(Get_Pref_Fg_Color, Get_Pref_Bg_Color): New subprograms.
* default_preferences.ads:
(Get_Pref_Fg_Color, Get_Pref_Bg_Color): New subprograms.
* gps-kernel-console.adb:
(On_Preferences_Changed): No longer need to call Set_Highlight_Color, this is
handled by the console itself.
(Initialize): Adapt to the new profile of Initialize.
* gps-kernel-interactive.adb:
(Create_Interactive_Console): Adapt to new profile of Initialize.
* interactive_consoles.adb:
(Gtk_New): New profile.
(Initialize): New profile. Register a handler on preferences changed.
(Set_Highlight_Color): The color is now a preference: extract the actual color
from the preference.
* interactive_consoles.ads:
(Gtk_New): New profile for Kernel and Highlight.
(Initialize): Ditto.
(Interactive_Console_Record): Change field Highlight to a Preference.
* python_module.adb:
(Initialize): Adapt to new profile of Initialize.
Part of N724-033:
- reuse the style of comments for the prompt in the debugger console
instead of having a specific preference for this. This removes an unneeded
preference.
This also addresses the issue of the prompt being wrong in Dark mode.
- make the Interactive_Consoles accept a Preference directly rather than
an RGBA for their highlight color. This way, the Interactive Console can
react to Preference_Changed and change the highlight: this avoids the need
for each client of Interactive_Console having to do this themselves. (And
implements it in the case of the Debugger Console which didn't do it).
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@230959 936e1b1b-40f2-da11-902a-00137254ae57
This required various modifications in GPS, because the custom browsers are
using an instance of generic_views.ads (so that we can have local toolbars)
but using a python module's save_desktop and load_desktop function requires
that GPS.MDI.add be called with a proper save_desktop callback.
As such setting such a callback is now possible directly on a GPS_MDI_Child
rather than on a hidden class in python_module.adb.
Saving the desktop will now save the name of the .mdl file, and automatically
reload it when GPS is reopened.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@225868 936e1b1b-40f2-da11-902a-00137254ae57
Refactor in the xref engine: make the Entity
an abstract type which owns a reference to the
database it is from. Slightly simplifies the
user API, and allows for introducing other
Entities for other database without client
modifications.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@224486 936e1b1b-40f2-da11-902a-00137254ae57
This gives better control on the order of menus, as well as open
the way to moving the menus to application windows.
MA18-041
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@218586 936e1b1b-40f2-da11-902a-00137254ae57
Add gnatcoll_python as dependency of python_core.gpr
For M227-043
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@215575 936e1b1b-40f2-da11-902a-00137254ae57
This package was obsolete and replaced with GNATCOLL.Traces
Exceptions are now sent to "<name>.EXCEPTIONS" streams, and are
always displayed in the testsuite.
Remove a number of exception handlers in gtk+ callbacks, which were
no longer necessary since GtkAda has its own exception handlers.
M910-019
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@215445 936e1b1b-40f2-da11-902a-00137254ae57
only works when using the modules.py interface
("GPS.MDI.add"): now returns the newly created GPS.MDIWindow
Fixes regression in mdi.13
M807-044
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@213972 936e1b1b-40f2-da11-902a-00137254ae57
which takes care of various things, like automatic connection to hooks,
setup, desktop saving,...
M807-044
(task_manager.py): rewritten with modules.py, so that we can save it in
the desktop. No loading implemented yet.
("GPS.MDI.add"): new parameter save_desktop, to support saving python
widgets in the desktop.
M808-040
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@213958 936e1b1b-40f2-da11-902a-00137254ae57
make the use of perspectives less surprising to users.
M731-021
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@213581 936e1b1b-40f2-da11-902a-00137254ae57
These were mostly deprecated in any case (no support to view these
graphically for several years), and can be easily replaced with
standard python commands.
M705-018
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@212496 936e1b1b-40f2-da11-902a-00137254ae57
This check in introduces the support/ directory to contain all mandatory
python files that must be loaded on startup.
This removes a number of entries from the Plug-ins dialog, which is thus
more readable.
Rewrite the .xml files into .py files
Merge some plug-ins that were split into several files, such as
ada-support.xml+ada_support.py, subversion.xml+subversion.py,...
Fix issue with the Plug-ins dialog with python modules, which were
showing up as empty lines. This dialog no longer shows the scripts
that are mandatory (i.e. those in support/)
M617-025
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@212495 936e1b1b-40f2-da11-902a-00137254ae57
These are used to specify the initial position of the widget.
M218-036
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@211052 936e1b1b-40f2-da11-902a-00137254ae57
and ensure a consistent layout. In particular, there is a single
place to change if for instance we want to show the filter options
other than with buttons. Such filters also have a special CSS class,
so that for instance we can use rounded corner for them as seems
usual in most GUIs now.
(Generic_Views): a View_Record now always has a Kernel field, which
simplifies the API a bit, and allows removing the kernel field from
a lot of other records.
This is in preparation for adding a filter to the Outline view.
M122-025
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@201358 936e1b1b-40f2-da11-902a-00137254ae57
Remove almost all public API from gps-kernel-console.ads. This package
is now only used to create and manage the Messages window, but all
packages that need to insert messages in the console need to go through
the new services in GPS.Kernel (with same name as before).
(Create_Interactive_Console): moved to the new package GPS.Kernel.Interactive
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@199369 936e1b1b-40f2-da11-902a-00137254ae57