1
0
mirror of https://github.com/GNOME/gedit synced 2024-06-30 23:15:01 +00:00
Commit Graph

13569 Commits

Author SHA1 Message Date
Sébastien Wilmet
7e89b3c728 commands-view: put some code that doesn't work in comments and add todo 2024-03-21 13:31:09 +01:00
Sébastien Wilmet
382d0adddb commands-view: small cleanup 2024-03-21 13:30:49 +01:00
Sébastien Wilmet
a904a6f235 commands-help: cleanup and small update 2024-03-21 12:36:15 +01:00
Sébastien Wilmet
fc39140e01 commands-file-print: small cleanup 2024-03-21 12:22:44 +01:00
Sébastien Wilmet
7aedc53a61 commands-documents: remove useless #include 2024-03-21 12:17:51 +01:00
Sébastien Wilmet
bbc9954473 commands-documents: small cleanup 2024-03-20 21:36:51 +01:00
Sébastien Wilmet
91329a42e0 Window: simplify configure_event()
save_window_state() has the same condition for
window->priv->window_state.
2024-03-20 14:31:52 +01:00
Sébastien Wilmet
b6644c691b Window: minor code improvements 2024-03-20 12:44:22 +01:00
Sébastien Wilmet
f7310bada3 Window: add missing g_settings_apply()
The call to g_settings_apply() was removed in
commit 9c27bdaec6

but was implicitly useful for the call to save_window_state() in dispose
as well.
2024-03-20 09:40:21 +01:00
Sébastien Wilmet
463f54ec2f Window: small refactoring for save_window_state() 2024-03-20 09:29:07 +01:00
Sébastien Wilmet
9c27bdaec6 Window: delegate a bit more work to SidePanel and BottomPanel 2024-03-20 09:04:12 +01:00
Sébastien Wilmet
4918144a13 BottomPanel: add save_state() 2024-03-20 08:21:10 +01:00
Sébastien Wilmet
530b67f1b3 SidePanel: add save_state()
To have less code in GeditWindow.
2024-03-20 08:00:36 +01:00
Sébastien Wilmet
01231d1eab SidePanel: make the class truly internal
Note the added g_type_ensure() call to make it work for the *.ui file.
2024-03-20 07:46:44 +01:00
Sébastien Wilmet
2e6e25b0b8 Window: use the GeditBottomPanel class 2024-03-20 01:31:43 +01:00
Sébastien Wilmet
02ac056f4f BottomPanel: implement UI 2024-03-20 01:31:43 +01:00
Sébastien Wilmet
a2e19e87a4 BottomPanel: class skeleton 2024-03-20 00:54:21 +01:00
Sébastien Wilmet
04f557174b Window: bug fix: fixme comment about the bottom panel
Grab the focus on the whole bottom panel, not the GtkStack. To do the
same as done by _gedit_cmd_view_toggle_bottom_panel(). This is subject
to change if it appears to be better to grab the focus on the GtkStack
instead.
2024-03-19 16:29:58 +01:00
Sébastien Wilmet
f1018fb22d Window: bug fix, work on the whole bottom_panel in certain cases
Use the whole bottom_panel for two purposes:
- the panel visibility.
- the size (height).

The bug (now fixed)
-------------------

The bottom panel size was not correctly restored after quitting and
restarting gedit. The same when opening a new window.
2024-03-19 15:45:47 +01:00
Sébastien Wilmet
5f92c2d89b Window: rename bottom_panel -> bottom_panel_stack
And have the GtkStack type.
2024-03-19 14:26:57 +01:00
Sébastien Wilmet
c0ed0e2b0a Window: simplify a little the *.ui file
The GtkBox contained only one child.

Setup the valign property.
2024-03-19 03:09:39 +01:00
Sébastien Wilmet
be1aa04db7 Window: remove some dead code from *.ui file 2024-03-19 03:09:39 +01:00
Martin
f36998dd22 Update Slovenian translation 2024-03-17 10:11:05 +00:00
Aurimas Černius
42d90545e5 Update Lithuanian translation 2024-03-16 20:54:34 +00:00
Sébastien Wilmet
cb337d2cdf NotebookStackSwitcher: more precise type for the notebook attribute 2024-03-15 15:51:21 +01:00
Sébastien Wilmet
1d618cb2a1 NotebookStackSwitcher: various small code improvements 2024-03-15 15:34:17 +01:00
Sébastien Wilmet
bccdeed716 utils: remove location_get_dirname_for_display() from the API
Reformat also the header while at it.

The function is badly implemented, see the FIXME comment about the use
of a sync GIO API.

The code needs to be reworked.
2024-03-15 12:20:28 +01:00
Sébastien Wilmet
dd508ce236 NEWS file: write all news so far 2024-03-15 10:42:11 +01:00
Sébastien Wilmet
d94b2c13b3 Window: keep only one ::active-tab-changed* signal
1) Remove the deprecated signal (no longer used).
2) Rename the ::active-tab-changed-simple signal to
   ::active-tab-changed and adapt the code accordingly.
3) Document the API break.
2024-03-15 10:23:42 +01:00
Sébastien Wilmet
5fd0084999 snippets: don't use deprecated GeditWindow signal 2024-03-15 09:59:57 +01:00
Sébastien Wilmet
09314b69ab WindowTitles: listen to TeplBuffer:tepl-short-title property changes
The short_title is what is used by the update function, not the tab
name.
2024-03-15 08:06:04 +01:00
Sébastien Wilmet
4ce036bcde WindowTitles: bug fix, rework the update function
- Split set_titles() in 3 functions.
- Use g_get_application_name() in every place where "gedit" was used.
- Use tepl_buffer_get_short_title() to directly get the star if the
  buffer is modified.

About truncation
----------------

Do not care about truncation (remove the related code). GtkHeaderBar
truncates the strings at the end, which is good enough (the window can
be resized in order to see the whole string if needed). The single-title
is also truncated by GTK at the end if there is no GtkHeaderBar.
gnome-shell truncates also the single-title at the end for the window
tooltip in the Overview.

Truncation in the middle with GtkLabel is possible. It would be feasible
to put two custom GtkLabels in the GtkHeaderBar, but in order to do so
(to just adjust where the strings are truncated, keeping all the rest
the same) the implementation of GtkHeaderBar needs to be read and
copied. Relying on implementation details is never a good thing, so it's
better to avoid it. It's also less work to rely on the default behavior
of GtkHeaderBar, of course.

About the bug (now fixed)
-------------------------

When the filename is too long (so it needed to be truncated), the
directory was not shown as subtitle.
2024-03-15 08:06:04 +01:00
Sébastien Wilmet
6af1fa7f47 WindowTitles: unexpose update() 2024-03-15 06:12:34 +01:00
Sébastien Wilmet
33ca3607ea WindowTitles: listen to signals to update the titles
The diff shows more code added, but the new way is hopefully easier to
follow because it is contained in a single (smaller) class. Small
classes are in general easier to understand.
2024-03-15 06:09:52 +01:00
Sébastien Wilmet
7c7b62fd86 WindowTitles: connect to GeditWindow::active-tab-changed-simple signal 2024-03-13 21:16:50 +01:00
Sébastien Wilmet
ff472eca80 Window: deprecate the ::active-tab-changed signal 2024-03-13 21:11:57 +01:00
Sébastien Wilmet
6e93057a05 docs: add index of new symbols in 47 2024-03-13 21:07:36 +01:00
Sébastien Wilmet
0f5979170d Window: add ::active-tab-changed-simple signal 2024-03-13 21:02:46 +01:00
Sébastien Wilmet
5f8b0d8504 Window: improve code and docs around the ::active-tab-changed signal 2024-03-13 17:34:54 +01:00
Sébastien Wilmet
d1176bb8e2 Window: add some missing GI annotations 2024-03-13 17:34:54 +01:00
Sébastien Wilmet
5918a367ae WindowTitles: listen to GeditWindow::active-tab-changed signal
The code is normally equivalent, but the goal is to make the
_gedit_window_titles_update() function internal to GeditWindowTitles.
2024-03-13 16:33:11 +01:00
Sébastien Wilmet
b3fab39b33 Window: delegate update_titles() to GeditWindowTitles
GLib 2.76 is required for g_set_str().
2024-03-13 15:04:00 +01:00
Sébastien Wilmet
de99eb5cec HeaderBar: bind GeditWindowTitles properties 2024-03-13 07:48:04 +01:00
Sébastien Wilmet
fb23999467 Window: use GeditWindowTitles to update single-title 2024-03-13 07:31:13 +01:00
Sébastien Wilmet
22e7fdb9b5 Window: have a GeditWindowTitles instance 2024-03-13 06:42:46 +01:00
Sébastien Wilmet
16094c66a1 WindowTitles: create class 2024-03-13 06:01:05 +01:00
Sébastien Wilmet
2ab5d55681 Window: update_titles(): small code simplification 2024-03-12 22:23:35 +01:00
Sébastien Wilmet
b137877a6d Window: update_titles(): use g_get_application_name() 2024-03-12 20:44:12 +01:00
Sébastien Wilmet
7f7f5b965b Use TeplSettingsSimpleThemeVariant for the GTK light/dark theme variants
gedit is not fully ready for the 'system' theme variant setting.

The GSettings and the preferences dialog UI for the style/color schemes
(coming from libgedit-gtksourceview) need some work to be able to choose
the one that is set for a light GTK theme, and the one that is set for a
dark GTK theme.

So in the meantime, in order for gedit to be in a releasable state, use
the simplified API from Tepl. Only "force light" and "force dark" are
supported, so gedit doesn't take into account the system setting.

However with some scripting it would be possible to achieve the desired
behavior when the system setting for the GTK theme changes, adapting
automatically the style/color scheme.
2024-03-12 01:00:27 +01:00
Sébastien Wilmet
5276e14cd0 help: update gedit icon
See previous commits.

The 48x48 png file doesn't fit well in the <title> (the icon and the
"gedit" text are not well aligned), so take the 24x24 instead.
2024-03-11 15:49:52 +01:00