Skip to content

Commit 9604d0f

Browse files
committed
preferences: Move document templates to its own tab.
1 parent fc86663 commit 9604d0f

File tree

4 files changed

+50
-9
lines changed

4 files changed

+50
-9
lines changed

gresources/nemo-file-management-properties.glade

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4317,6 +4317,35 @@ along with . If not, see <http://www.gnu.org/licenses/>.
43174317
<property name="position">6</property>
43184318
</packing>
43194319
</child>
4320+
<child>
4321+
<object class="GtkScrolledWindow">
4322+
<property name="visible">True</property>
4323+
<property name="can-focus">True</property>
4324+
<child>
4325+
<object class="GtkViewport">
4326+
<property name="visible">True</property>
4327+
<property name="can-focus">False</property>
4328+
<child>
4329+
<object class="GtkBox" id="templates_box">
4330+
<property name="visible">True</property>
4331+
<property name="can-focus">False</property>
4332+
<property name="border-width">4</property>
4333+
<property name="orientation">vertical</property>
4334+
<child>
4335+
<placeholder/>
4336+
</child>
4337+
</object>
4338+
</child>
4339+
</object>
4340+
</child>
4341+
</object>
4342+
<packing>
4343+
<property name="name">templates</property>
4344+
<property name="title" translatable="yes">Document Templates</property>
4345+
<property name="icon-name">xsi-folder-templates-symbolic</property>
4346+
<property name="position">7</property>
4347+
</packing>
4348+
</child>
43204349
<child>
43214350
<object class="GtkScrolledWindow" id="scrolledwindow7">
43224351
<property name="visible">True</property>
@@ -4342,14 +4371,14 @@ along with . If not, see <http://www.gnu.org/licenses/>.
43424371
<property name="name">plugins</property>
43434372
<property name="title" translatable="yes">Plugins</property>
43444373
<property name="icon-name">xapp-prefs-plugins-symbolic</property>
4345-
<property name="position">7</property>
4374+
<property name="position">8</property>
43464375
</packing>
43474376
</child>
43484377
</object>
43494378
<packing>
43504379
<property name="expand">True</property>
43514380
<property name="fill">True</property>
4352-
<property name="position">1</property>
4381+
<property name="position">2</property>
43534382
</packing>
43544383
</child>
43554384
</object>

src/nemo-file-management-properties.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include <libnemo-private/nemo-module.h>
4242

4343
#include "nemo-plugin-manager.h"
44+
#include "nemo-template-config-widget.h"
4445
#include "nemo-actions.h"
4546

4647
/* string enum preferences */
@@ -474,6 +475,18 @@ nemo_file_management_properties_dialog_setup_plugin_page (GtkBuilder *builder)
474475
TRUE, TRUE, 0);
475476
}
476477

478+
static void
479+
nemo_file_management_properties_dialog_setup_templates_page (GtkBuilder *builder)
480+
{
481+
GtkWidget *box;
482+
483+
box = GTK_WIDGET (gtk_builder_get_object (builder, "templates_box"));
484+
485+
gtk_box_pack_start (GTK_BOX (box),
486+
GTK_WIDGET (nemo_template_config_widget_new ()),
487+
TRUE, TRUE, 0);
488+
}
489+
477490
static void
478491
create_date_format_menu (GtkBuilder *builder)
479492
{
@@ -1130,6 +1143,8 @@ nemo_file_management_properties_dialog_setup (GtkBuilder *builder,
11301143
nemo_file_management_properties_dialog_setup_icon_caption_page (builder);
11311144
nemo_file_management_properties_dialog_setup_list_column_page (builder);
11321145
nemo_file_management_properties_dialog_setup_plugin_page (builder);
1146+
nemo_file_management_properties_dialog_setup_templates_page (builder);
1147+
11331148

11341149
setup_configurable_menu_items (builder);
11351150

src/nemo-plugin-manager.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,11 @@ nemo_plugin_manager_init (NemoPluginManager *self)
3939
gtk_grid_set_row_homogeneous (GTK_GRID (grid), TRUE);
4040
gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);
4141

42-
widget = nemo_template_config_widget_new ();
43-
gtk_grid_attach (GTK_GRID (grid), widget, 0, 0, 2, 1);
44-
4542
widget = nemo_action_config_widget_new ();
46-
gtk_grid_attach (GTK_GRID (grid), widget, 0, 1, 2, 1);
43+
gtk_grid_attach (GTK_GRID (grid), widget, 0, 0, 2, 1);
4744

4845
widget = nemo_extension_config_widget_new ();
49-
gtk_grid_attach (GTK_GRID (grid), widget, 0, 2, 2, 1);
46+
gtk_grid_attach (GTK_GRID (grid), widget, 0, 1, 2, 1);
5047

5148
gtk_container_add (GTK_CONTAINER (self), grid);
5249

src/nemo-template-config-widget.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ nemo_template_config_widget_init (NemoTemplateConfigWidget *self)
578578
gtk_list_box_set_selection_mode (GTK_LIST_BOX (NEMO_CONFIG_BASE_WIDGET (self)->listbox), GTK_SELECTION_SINGLE);
579579
gtk_list_box_set_activate_on_single_click (GTK_LIST_BOX (NEMO_CONFIG_BASE_WIDGET (self)->listbox), FALSE);
580580

581-
gchar *title = g_strdup (_("New Document templates"));
581+
gchar *title = g_strdup (_("Templates"));
582582
gchar *markup = g_strdup_printf ("<b>%s</b>", title);
583583

584584
gtk_label_set_markup (GTK_LABEL (label), markup);
@@ -627,7 +627,7 @@ nemo_template_config_widget_init (NemoTemplateConfigWidget *self)
627627
g_signal_connect (widget, "clicked", G_CALLBACK (on_rename_row_clicked), self);
628628
self->rename_button = widget;
629629

630-
widget = gtk_button_new_with_label (_("Edit"));
630+
widget = gtk_button_new_with_label (_("Edit content"));
631631
gtk_widget_set_tooltip_text (widget, _("Modify the selected template's contents"));
632632

633633
gtk_box_pack_start (GTK_BOX (bb),

0 commit comments

Comments
 (0)