summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/builds.yml2
-rw-r--r--.github/workflows/release.yml2
-rw-r--r--data/org.mate.pluma.gschema.xml.in15
-rwxr-xr-xplugins/externaltools/tools/library.py2
-rw-r--r--plugins/snippets/snippets/Document.py4
-rw-r--r--plugins/snippets/snippets/SubstitutionParser.py2
-rw-r--r--plugins/taglist/pluma-taglist-plugin-parser.c16
-rw-r--r--plugins/taglist/pluma-taglist-plugin.c12
-rw-r--r--pluma/pluma-commands-view.c24
-rw-r--r--pluma/pluma-commands.h2
-rw-r--r--pluma/pluma-io-error-message-area.c4
-rw-r--r--pluma/pluma-panel.c4
-rw-r--r--pluma/pluma-settings.h3
-rw-r--r--pluma/pluma-ui.h5
-rw-r--r--pluma/pluma-ui.xml1
-rw-r--r--pluma/pluma-window-private.h3
-rw-r--r--pluma/pluma-window.c158
-rw-r--r--pluma/pluma-window.h2
18 files changed, 236 insertions, 25 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml
index 284886a7..a3dcaba4 100644
--- a/.github/workflows/builds.yml
+++ b/.github/workflows/builds.yml
@@ -69,7 +69,7 @@ jobs:
pacman --noconfirm -Sy git || true
echo "::endgroup::"
- name: Repository checkout
- uses: actions/checkout@v5
+ uses: actions/checkout@v6
with:
submodules: "true"
- name: Install dependency packages
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 4d7298b7..c37230d0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Repository checkout
- uses: actions/checkout@v5
+ uses: actions/checkout@v6
with:
submodules: "true"
diff --git a/data/org.mate.pluma.gschema.xml.in b/data/org.mate.pluma.gschema.xml.in
index 45dd196e..78a57c41 100644
--- a/data/org.mate.pluma.gschema.xml.in
+++ b/data/org.mate.pluma.gschema.xml.in
@@ -170,6 +170,11 @@
<summary>Bottom Panel is Visible</summary>
<description>Whether the bottom panel at the bottom of editing windows should be visible.</description>
</key>
+ <key name="right-panel-visible" type="b">
+ <default>false</default>
+ <summary>Right Panel is Visible</summary>
+ <description>Whether the right panel at the right of editing windows should be visible.</description>
+ </key>
<key name="max-recents" type="u">
<default>5</default>
<summary>Maximum Recent Files</summary>
@@ -285,6 +290,16 @@
<summary>bottom-panel-active-page</summary>
<description>The pluma bottom-panel-active-page</description>
</key>
+ <key name="right-panel-size" type="i">
+ <default>200</default>
+ <summary>right-panel-size</summary>
+ <description>The pluma right-panel-size</description>
+ </key>
+ <key name="right-panel-active-page" type="i">
+ <default>0</default>
+ <summary>right-panel-active-page</summary>
+ <description>The pluma right-panel-active-page</description>
+ </key>
<key name="filter-id" type="i">
<default>0</default>
<summary>filter-id</summary>
diff --git a/plugins/externaltools/tools/library.py b/plugins/externaltools/tools/library.py
index ed66e268..0eb4e123 100755
--- a/plugins/externaltools/tools/library.py
+++ b/plugins/externaltools/tools/library.py
@@ -197,7 +197,7 @@ class ToolDirectory(object):
class Tool(object):
- RE_KEY = re.compile('^([a-zA-Z_][a-zA-Z0-9_.\-]*)(\[([a-zA-Z_@]+)\])?$')
+ RE_KEY = re.compile(r'^([a-zA-Z_][a-zA-Z0-9_.\-]*)(\[([a-zA-Z_@]+)\])?$')
def __init__(self, parent, filename=None):
super(Tool, self).__init__()
diff --git a/plugins/snippets/snippets/Document.py b/plugins/snippets/snippets/Document.py
index 1c2960b1..65c4b437 100644
--- a/plugins/snippets/snippets/Document.py
+++ b/plugins/snippets/snippets/Document.py
@@ -827,8 +827,8 @@ class Document:
return components
def relative_path(self, first, second, mime):
- prot1 = re.match('(^[a-z]+:\/\/|\/)(.*)', first)
- prot2 = re.match('(^[a-z]+:\/\/|\/)(.*)', second)
+ prot1 = re.match(r'(^[a-z]+:\/\/|\/)(.*)', first)
+ prot2 = re.match(r'(^[a-z]+:\/\/|\/)(.*)', second)
if not prot1 or not prot2:
return second
diff --git a/plugins/snippets/snippets/SubstitutionParser.py b/plugins/snippets/snippets/SubstitutionParser.py
index e6b4647b..a03382b0 100644
--- a/plugins/snippets/snippets/SubstitutionParser.py
+++ b/plugins/snippets/snippets/SubstitutionParser.py
@@ -159,7 +159,7 @@ class SubstitutionParser:
return match.group(1), tokens[match.end():]
def _condition_value(self, tokens):
- match = re.match('\\\\?%s\s*' % self.REG_GROUP, tokens)
+ match = re.match('\\\\?%s\\s*' % self.REG_GROUP, tokens)
if not match:
return None, tokens
diff --git a/plugins/taglist/pluma-taglist-plugin-parser.c b/plugins/taglist/pluma-taglist-plugin-parser.c
index 74693290..bca7a70d 100644
--- a/plugins/taglist/pluma-taglist-plugin-parser.c
+++ b/plugins/taglist/pluma-taglist-plugin-parser.c
@@ -140,7 +140,9 @@ parse_tag_group (TagGroup *tg, const gchar* fn, xmlDocPtr doc,
tag = g_new0 (Tag, 1);
/* Get Tag name */
- tag->name = (xmlChar*)gettext((const char*)xmlGetProp (cur, (const xmlChar *) "name"));
+ xmlChar *prop = xmlGetProp (cur, (const xmlChar *) "name");
+ tag->name = (xmlChar*)g_strdup (gettext ((const char*)prop));
+ xmlFree (prop);
if (tag->name == NULL)
{
@@ -196,7 +198,9 @@ get_tag_group (const gchar* filename, xmlDocPtr doc,
tag_group = g_new0 (TagGroup, 1);
/* Get TagGroup name */
- tag_group->name = (xmlChar*)gettext((const char*)xmlGetProp (cur, (const xmlChar *) "name"));
+ xmlChar *prop = xmlGetProp (cur, (const xmlChar *) "name");
+ tag_group->name = (xmlChar*)g_strdup (gettext ((const char*)prop));
+ xmlFree (prop);
sort_str = xmlGetProp (cur, (const xmlChar *) "sort");
@@ -499,13 +503,13 @@ free_tag (Tag *tag)
*/
g_return_if_fail (tag != NULL);
- free (tag->name);
+ g_free (tag->name);
if (tag->begin != NULL)
- free (tag->begin);
+ xmlFree (tag->begin);
if (tag->end != NULL)
- free (tag->end);
+ xmlFree (tag->end);
g_free (tag);
}
@@ -519,7 +523,7 @@ free_tag_group (TagGroup *tag_group)
g_return_if_fail (tag_group != NULL);
- free (tag_group->name);
+ g_free (tag_group->name);
for (l = tag_group->tags; l != NULL; l = g_list_next (l))
{
diff --git a/plugins/taglist/pluma-taglist-plugin.c b/plugins/taglist/pluma-taglist-plugin.c
index 7249421b..14e32ecf 100644
--- a/plugins/taglist/pluma-taglist-plugin.c
+++ b/plugins/taglist/pluma-taglist-plugin.c
@@ -107,20 +107,20 @@ pluma_taglist_plugin_activate (PlumaWindowActivatable *activatable)
{
PlumaTaglistPluginPrivate *priv;
PlumaWindow *window;
- PlumaPanel *side_panel;
+ PlumaPanel *right_panel;
gchar *data_dir;
pluma_debug (DEBUG_PLUGINS);
priv = PLUMA_TAGLIST_PLUGIN (activatable)->priv;
window = PLUMA_WINDOW (priv->window);
- side_panel = pluma_window_get_side_panel (window);
+ right_panel = pluma_window_get_right_panel (window);
data_dir = peas_extension_base_get_data_dir (PEAS_EXTENSION_BASE (activatable));
priv->taglist_panel = pluma_taglist_plugin_panel_new (window, data_dir);
g_free (data_dir);
- pluma_panel_add_item_with_icon (side_panel,
+ pluma_panel_add_item_with_icon (right_panel,
priv->taglist_panel,
_("Tags"),
"list-add");
@@ -131,15 +131,15 @@ pluma_taglist_plugin_deactivate (PlumaWindowActivatable *activatable)
{
PlumaTaglistPluginPrivate *priv;
PlumaWindow *window;
- PlumaPanel *side_panel;
+ PlumaPanel *right_panel;
pluma_debug (DEBUG_PLUGINS);
priv = PLUMA_TAGLIST_PLUGIN (activatable)->priv;
window = PLUMA_WINDOW (priv->window);
- side_panel = pluma_window_get_side_panel (window);
+ right_panel = pluma_window_get_right_panel (window);
- pluma_panel_remove_item (side_panel,
+ pluma_panel_remove_item (right_panel,
priv->taglist_panel);
}
diff --git a/pluma/pluma-commands-view.c b/pluma/pluma-commands-view.c
index d81824a7..68181598 100644
--- a/pluma/pluma-commands-view.c
+++ b/pluma/pluma-commands-view.c
@@ -124,6 +124,30 @@ _pluma_cmd_view_show_bottom_pane (GtkAction *action,
}
void
+_pluma_cmd_view_show_right_pane (GtkAction *action,
+ PlumaWindow *window)
+{
+ gboolean visible;
+ PlumaPanel *panel;
+
+ pluma_debug (DEBUG_COMMANDS);
+
+ visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+
+ panel = pluma_window_get_right_panel (window);
+
+ if (visible)
+ {
+ gtk_widget_show (GTK_WIDGET (panel));
+ gtk_widget_grab_focus (GTK_WIDGET (panel));
+ }
+ else
+ {
+ gtk_widget_hide (GTK_WIDGET (panel));
+ }
+}
+
+void
_pluma_cmd_view_toggle_fullscreen_mode (GtkAction *action,
PlumaWindow *window)
{
diff --git a/pluma/pluma-commands.h b/pluma/pluma-commands.h
index 54860ea4..ebc8e222 100644
--- a/pluma/pluma-commands.h
+++ b/pluma/pluma-commands.h
@@ -125,6 +125,8 @@ void _pluma_cmd_view_show_side_pane (GtkAction *action,
PlumaWindow *window);
void _pluma_cmd_view_show_bottom_pane (GtkAction *action,
PlumaWindow *window);
+void _pluma_cmd_view_show_right_pane (GtkAction *action,
+ PlumaWindow *window);
void _pluma_cmd_view_toggle_fullscreen_mode (GtkAction *action,
PlumaWindow *window);
void _pluma_cmd_view_leave_fullscreen_mode (GtkAction *action,
diff --git a/pluma/pluma-io-error-message-area.c b/pluma/pluma-io-error-message-area.c
index 31c90636..f1fd60ff 100644
--- a/pluma/pluma-io-error-message-area.c
+++ b/pluma/pluma-io-error-message-area.c
@@ -1156,7 +1156,7 @@ pluma_externally_modified_message_area_new (const gchar *uri,
gchar *full_formatted_uri;
gchar *uri_for_display;
gchar *temp_uri_for_display;
- const gchar *primary_text;
+ gchar *primary_text;
const gchar *secondary_text;
GtkWidget *message_area;
@@ -1207,6 +1207,8 @@ pluma_externally_modified_message_area_new (const gchar *uri,
primary_text,
secondary_text);
+ g_free (primary_text);
+
return message_area;
}
diff --git a/pluma/pluma-panel.c b/pluma/pluma-panel.c
index 40b373b7..69cc6d07 100644
--- a/pluma/pluma-panel.c
+++ b/pluma/pluma-panel.c
@@ -667,6 +667,10 @@ pluma_panel_add_item (PlumaPanel *panel,
tab_label,
menu_label);
+ gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (panel->priv->notebook),
+ item,
+ TRUE);
+
g_signal_emit (G_OBJECT (panel), signals[ITEM_ADDED], 0, item);
}
diff --git a/pluma/pluma-settings.h b/pluma/pluma-settings.h
index a429c093..b4578d72 100644
--- a/pluma/pluma-settings.h
+++ b/pluma/pluma-settings.h
@@ -121,6 +121,7 @@ GSList * pluma_settings_get_writable_vfs_schemes (GSettings *sett
#define PLUMA_SETTINGS_STATUSBAR_VISIBLE "statusbar-visible"
#define PLUMA_SETTINGS_SIDE_PANE_VISIBLE "side-pane-visible"
#define PLUMA_SETTINGS_BOTTOM_PANE_VISIBLE "bottom-panel-visible"
+#define PLUMA_SETTINGS_RIGHT_PANE_VISIBLE "right-panel-visible"
#define PLUMA_SETTINGS_MAX_RECENTS "max-recents"
#define PLUMA_SETTINGS_PRINT_SYNTAX_HIGHLIGHTING "print-syntax-highlighting"
#define PLUMA_SETTINGS_PRINT_HEADER "print-header"
@@ -154,6 +155,8 @@ GSList * pluma_settings_get_writable_vfs_schemes (GSettings *sett
#define PLUMA_SETTINGS_SIDE_PANEL_ACTIVE_PAGE "side-panel-active-page"
#define PLUMA_SETTINGS_BOTTOM_PANEL_SIZE "bottom-panel-size"
#define PLUMA_SETTINGS_BOTTOM_PANEL_ACTIVE_PAGE "bottom-panel-active-page"
+#define PLUMA_SETTINGS_RIGHT_PANEL_SIZE "right-panel-size"
+#define PLUMA_SETTINGS_RIGHT_PANEL_ACTIVE_PAGE "right-panel-active-page"
#define PLUMA_SETTINGS_ACTIVE_FILE_FILTER "filter-id"
G_END_DECLS
diff --git a/pluma/pluma-ui.h b/pluma/pluma-ui.h
index 394a42e9..4c737937 100644
--- a/pluma/pluma-ui.h
+++ b/pluma/pluma-ui.h
@@ -181,7 +181,10 @@ static const GtkToggleActionEntry pluma_panes_toggle_menu_entries[] =
G_CALLBACK (_pluma_cmd_view_show_side_pane), FALSE },
{ "ViewBottomPane", NULL, N_("_Bottom Pane"), "<control>F9",
N_("Show or hide the bottom pane in the current window"),
- G_CALLBACK (_pluma_cmd_view_show_bottom_pane), FALSE }
+ G_CALLBACK (_pluma_cmd_view_show_bottom_pane), FALSE },
+ { "ViewRightPane", NULL, N_("_Right Pane"), "<shift>F9",
+ N_("Show or hide the right pane in the current window"),
+ G_CALLBACK (_pluma_cmd_view_show_right_pane), FALSE }
};
G_END_DECLS
diff --git a/pluma/pluma-ui.xml b/pluma/pluma-ui.xml
index 7231b763..6ba43a5b 100644
--- a/pluma/pluma-ui.xml
+++ b/pluma/pluma-ui.xml
@@ -87,6 +87,7 @@
<menuitem name="ViewStatusbarMenu" action="ViewStatusbar"/>
<menuitem name="ViewSidePaneMenu" action="ViewSidePane"/>
<menuitem name="ViewBottomPaneMenu" action="ViewBottomPane"/>
+ <menuitem name="ViewRightPaneMenu" action="ViewRightPane"/>
<separator/>
<menuitem name="ViewFullscreenMenu" action="ViewFullscreen"/>
<separator/>
diff --git a/pluma/pluma-window-private.h b/pluma/pluma-window-private.h
index 25e22296..ee63b016 100644
--- a/pluma/pluma-window-private.h
+++ b/pluma/pluma-window-private.h
@@ -50,8 +50,10 @@ struct _PlumaWindowPrivate
GtkWidget *side_panel;
GtkWidget *bottom_panel;
+ GtkWidget *right_panel;
GtkWidget *hpaned;
+ GtkWidget *hpaned_inner;
GtkWidget *vpaned;
GtkWidget *tab_width_combo;
@@ -105,6 +107,7 @@ struct _PlumaWindowPrivate
gint side_panel_size;
gint bottom_panel_size;
+ gint right_panel_size;
PlumaWindowState state;
diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c
index 7a12bdd1..24538d39 100644
--- a/pluma/pluma-window.c
+++ b/pluma/pluma-window.c
@@ -154,6 +154,16 @@ save_panes_state (PlumaWindow *window)
if (pane_page != 0)
g_settings_set_int (window->priv->editor_settings,
PLUMA_SETTINGS_BOTTOM_PANEL_ACTIVE_PAGE, pane_page);
+
+ if (window->priv->right_panel_size > 0)
+ g_settings_set_int (window->priv->editor_settings,
+ PLUMA_SETTINGS_RIGHT_PANEL_SIZE,
+ window->priv->right_panel_size);
+
+ pane_page = _pluma_panel_get_active_item_id (PLUMA_PANEL (window->priv->right_panel));
+ if (pane_page != 0)
+ g_settings_set_int (window->priv->editor_settings,
+ PLUMA_SETTINGS_RIGHT_PANEL_ACTIVE_PAGE, pane_page);
}
static void
@@ -2092,6 +2102,7 @@ clone_window (PlumaWindow *origin)
* they are mapped */
window->priv->side_panel_size = origin->priv->side_panel_size;
window->priv->bottom_panel_size = origin->priv->bottom_panel_size;
+ window->priv->right_panel_size = origin->priv->right_panel_size;
panel_page = _pluma_panel_get_active_item_id (PLUMA_PANEL (origin->priv->side_panel));
_pluma_panel_set_active_item_by_id (PLUMA_PANEL (window->priv->side_panel), panel_page);
@@ -2099,6 +2110,9 @@ clone_window (PlumaWindow *origin)
panel_page = _pluma_panel_get_active_item_id (PLUMA_PANEL (origin->priv->bottom_panel));
_pluma_panel_set_active_item_by_id (PLUMA_PANEL (window->priv->bottom_panel), panel_page);
+ panel_page = _pluma_panel_get_active_item_id (PLUMA_PANEL (origin->priv->right_panel));
+ _pluma_panel_set_active_item_by_id (PLUMA_PANEL (window->priv->right_panel), panel_page);
+
if (gtk_widget_get_visible (origin->priv->side_panel))
gtk_widget_show (window->priv->side_panel);
else
@@ -2109,6 +2123,11 @@ clone_window (PlumaWindow *origin)
else
gtk_widget_hide (window->priv->bottom_panel);
+ if (gtk_widget_get_visible (origin->priv->right_panel))
+ gtk_widget_show (window->priv->right_panel);
+ else
+ gtk_widget_hide (window->priv->right_panel);
+
set_statusbar_style (window, origin);
set_toolbar_style (window, origin);
@@ -3548,6 +3567,14 @@ bottom_panel_size_allocate (GtkWidget *widget,
}
static void
+right_panel_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation,
+ PlumaWindow *window)
+{
+ window->priv->right_panel_size = allocation->width;
+}
+
+static void
hpaned_restore_position (GtkWidget *widget,
PlumaWindow *window)
{
@@ -3597,6 +3624,32 @@ vpaned_restore_position (GtkWidget *widget,
}
static void
+hpaned_inner_restore_position (GtkWidget *widget,
+ PlumaWindow *window)
+{
+ GtkAllocation allocation;
+ gint pos;
+
+ gtk_widget_get_allocation (widget, &allocation);
+
+ pluma_debug_message (DEBUG_WINDOW,
+ "Restoring hpaned_inner position: right panel size %d",
+ window->priv->right_panel_size);
+
+ pos = allocation.width - MAX (50, window->priv->right_panel_size);
+ gtk_paned_set_position (GTK_PANED (window->priv->hpaned_inner), pos);
+
+ /* start monitoring the size */
+ g_signal_connect (window->priv->right_panel,
+ "size-allocate",
+ G_CALLBACK (right_panel_size_allocate),
+ window);
+
+ /* run this only once */
+ g_signal_handlers_disconnect_by_func (widget, hpaned_inner_restore_position, window);
+}
+
+static void
side_panel_visibility_changed (GtkWidget *side_panel,
PlumaWindow *window)
{
@@ -3750,11 +3803,58 @@ create_bottom_panel (PlumaWindow *window)
}
static void
+right_panel_visibility_changed (PlumaPanel *right_panel,
+ PlumaWindow *window)
+{
+ gboolean visible;
+ GtkAction *action;
+
+ visible = gtk_widget_get_visible (GTK_WIDGET (right_panel));
+
+ g_settings_set_boolean (window->priv->editor_settings,
+ PLUMA_SETTINGS_RIGHT_PANE_VISIBLE,
+ visible);
+
+ action = gtk_action_group_get_action (window->priv->panes_action_group,
+ "ViewRightPane");
+
+ if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)) != visible)
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), visible);
+
+ /* focus the document */
+ if (!visible && window->priv->active_tab != NULL)
+ gtk_widget_grab_focus (GTK_WIDGET (pluma_tab_get_view (PLUMA_TAB (window->priv->active_tab))));
+}
+
+static void
+create_right_panel (PlumaWindow *window)
+{
+ pluma_debug (DEBUG_WINDOW);
+
+ window->priv->right_panel = pluma_panel_new (GTK_ORIENTATION_VERTICAL);
+
+ gtk_paned_pack2 (GTK_PANED (window->priv->hpaned_inner),
+ window->priv->right_panel,
+ FALSE,
+ FALSE);
+
+ g_signal_connect_after (window->priv->right_panel,
+ "show",
+ G_CALLBACK (right_panel_visibility_changed),
+ window);
+ g_signal_connect_after (window->priv->right_panel,
+ "hide",
+ G_CALLBACK (right_panel_visibility_changed),
+ window);
+}
+
+static void
init_panels_visibility (PlumaWindow *window)
{
gint active_page;
gboolean side_pane_visible;
gboolean bottom_pane_visible;
+ gboolean right_pane_visible;
pluma_debug (DEBUG_WINDOW);
@@ -3768,6 +3868,8 @@ init_panels_visibility (PlumaWindow *window)
PLUMA_SETTINGS_SIDE_PANE_VISIBLE);
bottom_pane_visible = g_settings_get_boolean (window->priv->editor_settings,
PLUMA_SETTINGS_BOTTOM_PANE_VISIBLE);
+ right_pane_visible = g_settings_get_boolean (window->priv->editor_settings,
+ PLUMA_SETTINGS_RIGHT_PANE_VISIBLE);
if (side_pane_visible)
@@ -3796,6 +3898,20 @@ init_panels_visibility (PlumaWindow *window)
gtk_action_set_sensitive (action, FALSE);
}
+ /* right pane */
+ if (pluma_panel_get_n_items (PLUMA_PANEL (window->priv->right_panel)) > 0)
+ {
+ active_page = g_settings_get_int (window->priv->editor_settings,
+ PLUMA_SETTINGS_RIGHT_PANEL_ACTIVE_PAGE);
+ _pluma_panel_set_active_item_by_id (PLUMA_PANEL (window->priv->right_panel),
+ active_page);
+
+ if (right_pane_visible)
+ {
+ gtk_widget_show (window->priv->right_panel);
+ }
+ }
+
/* start track sensitivity after the initial state is set */
window->priv->bottom_panel_item_removed_handler_id =
g_signal_connect (window->priv->bottom_panel,
@@ -3990,19 +4106,28 @@ pluma_window_init (PlumaWindow *window)
TRUE,
0);
+ /* Create nested horizontal paned for center+right layout */
+ window->priv->hpaned_inner = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
+ gtk_paned_pack2 (GTK_PANED (window->priv->hpaned),
+ window->priv->hpaned_inner,
+ TRUE,
+ FALSE);
+
+ /* Create vertical paned for notebook+bottom panel */
window->priv->vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
- gtk_paned_pack2 (GTK_PANED (window->priv->hpaned),
- window->priv->vpaned,
- TRUE,
- FALSE);
+ gtk_paned_pack1 (GTK_PANED (window->priv->hpaned_inner),
+ window->priv->vpaned,
+ TRUE,
+ TRUE);
pluma_debug_message (DEBUG_WINDOW, "Create pluma notebook");
window->priv->notebook = pluma_notebook_new ();
add_notebook (window, window->priv->notebook);
/* side and bottom panels */
- create_side_panel (window);
+ create_side_panel (window);
create_bottom_panel (window);
+ create_right_panel (window);
/* panes' state must be restored after panels have been mapped,
* since the bottom pane position depends on the size of the vpaned. */
@@ -4010,6 +4135,8 @@ pluma_window_init (PlumaWindow *window)
PLUMA_SETTINGS_SIDE_PANEL_SIZE);
window->priv->bottom_panel_size = g_settings_get_int (window->priv->editor_settings,
PLUMA_SETTINGS_BOTTOM_PANEL_SIZE);
+ window->priv->right_panel_size = g_settings_get_int (window->priv->editor_settings,
+ PLUMA_SETTINGS_RIGHT_PANEL_SIZE);
g_signal_connect_after (window->priv->hpaned,
"map",
@@ -4019,8 +4146,13 @@ pluma_window_init (PlumaWindow *window)
"map",
G_CALLBACK (vpaned_restore_position),
window);
+ g_signal_connect_after (window->priv->hpaned_inner,
+ "map",
+ G_CALLBACK (hpaned_inner_restore_position),
+ window);
gtk_widget_show (window->priv->hpaned);
+ gtk_widget_show (window->priv->hpaned_inner);
gtk_widget_show (window->priv->vpaned);
/* Drag and drop support, set targets to NULL because we add the
@@ -4514,6 +4646,22 @@ pluma_window_get_bottom_panel (PlumaWindow *window)
}
/**
+ * pluma_window_get_right_panel:
+ * @window: a #PlumaWindow
+ *
+ * Gets the right #PlumaPanel of the @window.
+ *
+ * Returns: (transfer none): the right #PlumaPanel.
+ */
+PlumaPanel *
+pluma_window_get_right_panel (PlumaWindow *window)
+{
+ g_return_val_if_fail (PLUMA_IS_WINDOW (window), NULL);
+
+ return PLUMA_PANEL (window->priv->right_panel);
+}
+
+/**
* pluma_window_get_statusbar:
* @window: a #PlumaWindow
*
diff --git a/pluma/pluma-window.h b/pluma/pluma-window.h
index 5b9ae841..0878e82a 100644
--- a/pluma/pluma-window.h
+++ b/pluma/pluma-window.h
@@ -146,6 +146,8 @@ PlumaPanel *pluma_window_get_side_panel (PlumaWindow *window);
PlumaPanel *pluma_window_get_bottom_panel (PlumaWindow *window);
+PlumaPanel *pluma_window_get_right_panel (PlumaWindow *window);
+
GtkWidget *pluma_window_get_statusbar (PlumaWindow *window);
GtkUIManager *pluma_window_get_ui_manager (PlumaWindow *window);