Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions data/org.mate.pluma.gschema.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
12 changes: 6 additions & 6 deletions plugins/taglist/pluma-taglist-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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);
}

Expand Down
24 changes: 24 additions & 0 deletions pluma/pluma-commands-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,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)
Expand Down
2 changes: 2 additions & 0 deletions pluma/pluma-commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions pluma/pluma-settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion pluma/pluma-ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions pluma/pluma-ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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/>
Expand Down
3 changes: 3 additions & 0 deletions pluma/pluma-window-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -105,6 +107,7 @@ struct _PlumaWindowPrivate

gint side_panel_size;
gint bottom_panel_size;
gint right_panel_size;

PlumaWindowState state;

Expand Down
Loading