[gedit] Remove overview map
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Remove overview map
- Date: Mon, 25 Nov 2019 14:14:57 +0000 (UTC)
commit 26899e0ba7c1390c098b61fc7a901d700c4e745c
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Nov 25 14:53:44 2019 +0100
Remove overview map
It currently doesn't work well with the additional normal scrollbar that
is always displayed (see commit 5e0909c19f267b4023131881fac89c58a2a17453
for why it is needed).
It's also a pragmatic decision to simplify the gedit code, because there
are not enough developers, and too many bugs. Do you prefer a rock-solid
text editor? Or a text editor with some shiny and non-essential features
that complexifies the code, at the expense of more bugs? The gedit core
should have a much smaller code size, with all the essential features
implemented in libraries.
data/org.gnome.gedit.gschema.xml.in | 5 -----
gedit/gedit-settings.h | 1 -
gedit/gedit-view-frame.c | 12 ------------
gedit/resources/css/gedit-style.css | 8 --------
gedit/resources/ui/gedit-view-frame.ui | 31 ++++++-------------------------
5 files changed, 6 insertions(+), 51 deletions(-)
---
diff --git a/data/org.gnome.gedit.gschema.xml.in b/data/org.gnome.gedit.gschema.xml.in
index df1c8db44..6b94a3a23 100644
--- a/data/org.gnome.gedit.gschema.xml.in
+++ b/data/org.gnome.gedit.gschema.xml.in
@@ -126,11 +126,6 @@
<summary>Right Margin Position</summary>
<description>Specifies the position of the right margin.</description>
</key>
- <key name="display-overview-map" type="b">
- <default>false</default>
- <summary>Display Overview Map</summary>
- <description>Whether gedit should display the overview map for the document.</description>
- </key>
<key name="background-pattern" enum="org.gnome.gedit.BackgroundPatternType">
<default>'none'</default>
<summary>Document background pattern type</summary>
diff --git a/gedit/gedit-settings.h b/gedit/gedit-settings.h
index 0573b8e1d..f79ec4aa5 100644
--- a/gedit/gedit-settings.h
+++ b/gedit/gedit-settings.h
@@ -74,7 +74,6 @@ void gedit_settings_set_list (GSettings
*settings,
#define GEDIT_SETTINGS_SEARCH_HIGHLIGHTING "search-highlighting"
#define GEDIT_SETTINGS_TOOLBAR_VISIBLE "toolbar-visible"
#define GEDIT_SETTINGS_TOOLBAR_BUTTONS_STYLE "toolbar-buttons-style"
-#define GEDIT_SETTINGS_DISPLAY_OVERVIEW_MAP "display-overview-map"
#define GEDIT_SETTINGS_BACKGROUND_PATTERN "background-pattern"
#define GEDIT_SETTINGS_STATUSBAR_VISIBLE "statusbar-visible"
#define GEDIT_SETTINGS_SIDE_PANEL_VISIBLE "side-panel-visible"
diff --git a/gedit/gedit-view-frame.c b/gedit/gedit-view-frame.c
index c7962e92d..caebb45d8 100644
--- a/gedit/gedit-view-frame.c
+++ b/gedit/gedit-view-frame.c
@@ -53,10 +53,7 @@ struct _GeditViewFrame
{
GtkOverlay parent_instance;
- GSettings *editor_settings;
-
GeditView *view;
- GtkFrame *map_frame;
SearchMode search_mode;
@@ -162,7 +159,6 @@ gedit_view_frame_dispose (GObject *object)
gtk_source_file_set_mount_operation_factory (file, NULL, NULL, NULL);
}
- g_clear_object (&frame->editor_settings);
g_clear_object (&frame->entry_tag);
g_clear_object (&frame->search_settings);
g_clear_object (&frame->old_search_settings);
@@ -1436,7 +1432,6 @@ gedit_view_frame_class_init (GeditViewFrameClass *klass)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/gedit/ui/gedit-view-frame.ui");
gtk_widget_class_bind_template_child (widget_class, GeditViewFrame, view);
- gtk_widget_class_bind_template_child (widget_class, GeditViewFrame, map_frame);
gtk_widget_class_bind_template_child (widget_class, GeditViewFrame, revealer);
gtk_widget_class_bind_template_child (widget_class, GeditViewFrame, search_entry);
gtk_widget_class_bind_template_child (widget_class, GeditViewFrame, go_up_button);
@@ -1463,13 +1458,6 @@ gedit_view_frame_init (GeditViewFrame *frame)
gtk_widget_init_template (GTK_WIDGET (frame));
- frame->editor_settings = g_settings_new ("org.gnome.gedit.preferences.editor");
- g_settings_bind (frame->editor_settings,
- GEDIT_SETTINGS_DISPLAY_OVERVIEW_MAP,
- frame->map_frame,
- "visible",
- G_SETTINGS_BIND_GET | G_SETTINGS_BIND_NO_SENSITIVITY);
-
doc = get_document (frame);
file = gedit_document_get_file (doc);
diff --git a/gedit/resources/css/gedit-style.css b/gedit/resources/css/gedit-style.css
index 7036567c4..8c9ef7daa 100644
--- a/gedit/resources/css/gedit-style.css
+++ b/gedit/resources/css/gedit-style.css
@@ -14,14 +14,6 @@
padding: 12px;
}
-.gedit-map-frame:dir(ltr) border {
- border-width: 0 0 0 1px;
-}
-
-.gedit-map-frame:dir(rtl) border {
- border-width: 0 1px 0 0;
-}
-
.open-document-selector-treeview {
padding: 3px 6px 3px 6px;
}
diff --git a/gedit/resources/ui/gedit-view-frame.ui b/gedit/resources/ui/gedit-view-frame.ui
index fb4e4ee89..ebf70b013 100644
--- a/gedit/resources/ui/gedit-view-frame.ui
+++ b/gedit/resources/ui/gedit-view-frame.ui
@@ -7,34 +7,15 @@
<property name="has_focus">False</property>
<property name="is_focus">False</property>
<child>
- <object class="GtkGrid" id="grid">
+ <object class="GtkScrolledWindow" id="scrolled_window">
<property name="visible">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="overlay_scrolling">False</property>
<child>
- <object class="GtkScrolledWindow" id="scrolled_window">
+ <object class="GeditView" id="view">
<property name="visible">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="overlay_scrolling">False</property>
- <child>
- <object class="GeditView" id="view">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkFrame" id="map_frame">
- <property name="visible">True</property>
- <style>
- <class name="gedit-map-frame"/>
- </style>
- <child>
- <object class="GtkSourceMap" id="map">
- <property name="visible">True</property>
- <property name="view">view</property>
- </object>
- </child>
+ <property name="can_focus">True</property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]