elementaryart team mailing list archive
-
elementaryart team
-
Mailing list archive
-
Message #00861
[Merge] lp:~timorei/marlin/Fixes805729 into lp:marlin
Timo Reimerdes has proposed merging lp:~timorei/marlin/Fixes805729 into lp:marlin.
Requested reviews:
The elementary Project (elementaryproject)
Related bugs:
Bug #805729 in Marlin: "Could the icon size in miller columns be adjustable?"
https://bugs.launchpad.net/marlin/+bug/805729
For more details, see:
https://code.launchpad.net/~timorei/marlin/Fixes805729/+merge/67588
editable icon-sizes,
gsettings-keys,
options-dialogue
I used the same way that the sidebar icons sizes uses. So the not-working live-update applies here as well.
--
https://code.launchpad.net/~timorei/marlin/Fixes805729/+merge/67588
Your team The elementary Project is requested to review the proposed merge of lp:~timorei/marlin/Fixes805729 into lp:marlin.
=== modified file 'org.gnome.marlin.gschema.xml.in'
--- org.gnome.marlin.gschema.xml.in 2011-05-30 22:32:56 +0000
+++ org.gnome.marlin.gschema.xml.in 2011-07-11 17:11:35 +0000
@@ -52,7 +52,7 @@
<default>false</default>
<_summary>enable rgba window</_summary>
<_description>
- If set to true, rgba will be enabled, you'll need a gtk engine supporting rgba, like murrine. Compiz can have some problems like drawings shadows ...
+ If set to true, rgba will be enabled, you'll need a gtk engine supporting rgba, like murrine. Compiz can have some problems like drawings shadows ...
</_description>
</key>
<key name="date-format" type="s">
@@ -105,6 +105,13 @@
If set to a null or negative value, the default GTK_ICON_SIZE_MENU would be used.
</description>
</key>
+ <key name="column-icon-size" type="i">
+ <default>16</default>
+ <summary>Size of the icons in the Column View</summary>
+ <description>
+ If set to a null or negative value, the default GTK_ICON_SIZE_MENU would be used.
+ </description>
+ </key>
<key type="b" name="show-open-with-text">
<default>false</default>
<summary>Show applications name</summary>
@@ -175,4 +182,17 @@
</key>
</schema>
+ <schema id="org.gnome.marlin.column-view" path="/apps/marlin/column-view/">
+ <key name="default-zoom-level" enum="org.gnome.marlin.ZoomLevel">
+ <default>'normal'</default>
+ <_summary>icon default zoom level</_summary>
+ <_description>Default Zoom level used by the column view.</_description>
+ </key>
+ <key name="zoom-level" enum="org.gnome.marlin.ZoomLevel">
+ <default>'normal'</default>
+ <_summary>icon zoom level</_summary>
+ <_description>Zoom level used by the column view.</_description>
+ </key>
+ </schema>
+
</schemalist>
=== modified file 'po/de.po'
--- po/de.po 2011-06-04 17:39:47 +0000
+++ po/de.po 2011-07-11 17:11:35 +0000
@@ -1645,6 +1645,10 @@
msgid "Sidebar icon size:"
msgstr "SymbolgröÃe der Seitenleiste:"
+#: ../src/View/SettingsDialog.vala:187
+msgid "Column View icon size:"
+msgstr "SymbolgröÃe der Spaltenansicht:"
+
#: ../src/View/SettingsDialog.vala:115
msgid "locale"
msgstr "Lokalisierung"
=== modified file 'src/View/SettingsDialog.vala'
--- src/View/SettingsDialog.vala 2011-06-01 15:52:03 +0000
+++ src/View/SettingsDialog.vala 2011-07-11 17:11:35 +0000
@@ -65,16 +65,16 @@
Preferences.settings.bind("single-click", hbox_single_click, "sensitive", SettingsBindFlags.DEFAULT);
Preferences.settings.bind("single-click-timeout", spi_click_speed.get_adjustment(), "value", SettingsBindFlags.DEFAULT);
-
+
first_vbox.pack_start(hbox_single_click, false);
-
-
+
+// Notebook with Behavior Settings ----
mai_notebook.append_page(first_vbox, new Gtk.Label(_("Behavior")));
first_vbox = new Gtk.VBox(false, 3);
first_vbox.border_width = 5;
-
+
/* Sidebar icon size */
var spin_icon_size = new Chrome.ModeButton();
spin_icon_size.append(new Gtk.Label(_("small")));
@@ -106,10 +106,12 @@
hbox_single_click.pack_start(label);
hbox_single_click.pack_start(spin_icon_size, false, false);
-
+
first_vbox.pack_start(hbox_single_click, false);
-
+
+
+
/* Date format */
var mode_date_format = new Chrome.ModeButton();
mode_date_format.append(new Gtk.Label(_("locale")));
@@ -131,17 +133,17 @@
mode_date_format.mode_changed.connect(date_format_changed);
mode_date_format.set_visible_window(true);
- hbox_single_click = new Gtk.HBox(false, 0);
+ hbox_single_click = new Gtk.HBox(false, 10);
label = new Gtk.Label(_("Date format:"));
label.set_alignment(0, 0.5f);
hbox_single_click.pack_start(label);
hbox_single_click.pack_start(mode_date_format, false, false);
-
+
first_vbox.pack_start(hbox_single_click, false);
-
-
+
+
/* Show text in the sidebar */
hbox_single_click = new Gtk.HBox(false, 0);
checkbox = new Gtk.Switch();
@@ -156,12 +158,47 @@
first_vbox.pack_start(hbox_single_click, false);
+ /* Miller Column view icon size */
+ var column_icon_size = new Chrome.ModeButton();
+ column_icon_size.append(new Gtk.Label(_("small")));
+ column_icon_size.append(new Gtk.Label(_("medium")));
+ column_icon_size.append(new Gtk.Label(_("large")));
+ column_icon_size.append(new Gtk.Label(_("extra-large")));
+ switch((int)Preferences.settings.get_value("column-icon-size"))
+ {
+ case 16:
+ column_icon_size.selected = 0;
+ break;
+ case 24:
+ column_icon_size.selected = 1;
+ break;
+ case 32:
+ column_icon_size.selected = 2;
+ break;
+ case 48:
+ column_icon_size.selected = 3;
+ break;
+ }
+
+ column_icon_size.mode_changed.connect(column_icon_size_changed);
+
+ hbox_single_click = new Gtk.HBox(false, 10);
+
+ label = new Gtk.Label(_("Column View icon size:"));
+ label.set_alignment(0, 0.5f);
+
+ hbox_single_click.pack_start(label);
+ hbox_single_click.pack_start(column_icon_size, false, false);
+
+ first_vbox.pack_start(hbox_single_click, false);
+
+/* Display Notebook */
mai_notebook.append_page(first_vbox, new Gtk.Label(_("Display")));
first_vbox = new Gtk.VBox(false, 3);
first_vbox.border_width = 5;
-
- var view = new Gtk.TreeView();
+
+ var view = new Gtk.TreeView();
var listmodel = new Gtk.ListStore (2, typeof (string), typeof (bool));
view.set_model (listmodel);
@@ -211,7 +248,7 @@
Preferences.settings.set_strv("plugins-enabled", plugs);
}
- });
+ });
view.insert_column_with_attributes (-1, "Active", toggle, "active", 1);
Gtk.TreeIter iter;
@@ -240,6 +277,27 @@
run();
}
+ /* Column Icon size changed*/
+ private void column_icon_size_changed(Gtk.Widget widget)
+ {
+ int value = 16;
+ switch(((Gtk.Label)widget).get_text())
+ {
+ case "small":
+ value = 16;
+ break;
+ case "medium":
+ value = 24;
+ break;
+ case "large":
+ value = 32;
+ break;
+ case "extra-large":
+ value = 48;
+ break;
+ }
+ Preferences.settings.set_value("column-icon-size", value);
+ }
private void spin_icon_size_changed(Gtk.Widget widget)
{
int value = 16;
=== modified file 'src/fm-columns-view.c'
--- src/fm-columns-view.c 2011-07-02 18:56:37 +0000
+++ src/fm-columns-view.c 2011-07-11 17:11:35 +0000
@@ -177,7 +177,7 @@
printf ("%s\n", G_STRFUNC);
if (view->details->renaming_file) {
view->details->rename_done = TRUE;
-
+
if (error != NULL) {
/* If the rename failed (or was cancelled), kill renaming_file.
* We won't get a change event for the rename, so otherwise
@@ -187,7 +187,7 @@
view->details->renaming_file = NULL;
}
}
-
+
g_object_unref (view);
}
@@ -248,7 +248,7 @@
printf ("%s\n", G_STRFUNC);
view->details->editable_widget = NULL;
- /* Don't allow a rename with an empty string. Revert to original
+ /* Don't allow a rename with an empty string. Revert to original
* without notifying the user.
*/
if (new_text[0] == '\0') {
@@ -257,13 +257,13 @@
fm_directory_view_unfreeze_updates (FM_DIRECTORY_VIEW (view));
return;
}
-
+
path = gtk_tree_path_new_from_string (path_str);
gtk_tree_model_get_iter (GTK_TREE_MODEL (view->model), &iter, path);
gtk_tree_path_free (path);
-
+
gtk_tree_model_get (GTK_TREE_MODEL (view->model), &iter,
FM_LIST_MODEL_FILE_COLUMN, &file, -1);
@@ -276,7 +276,7 @@
g_free (view->details->original_name);
view->details->original_name = g_strdup (new_text);
}
-
+
gof_file_unref (file);
/*We're done editing - make the filename-cells readonly again.*/
@@ -458,7 +458,7 @@
GtkTreeSelection *selection;
GtkTreePath *path;
- if (view->details->pressed_button == event->button)
+ if (view->details->pressed_button == event->button)
{
selection = gtk_tree_view_get_selection (tree_view);
list_selection_changed_callback (selection, view);
@@ -529,7 +529,7 @@
}
if ((event->state & GDK_SHIFT_MASK) != 0) {
//TODO
- printf ("activate alternate\n");
+ printf ("activate alternate\n");
//activate_selected_items_alternate (FM_LIST_VIEW (view), NULL, TRUE);
} else {
fm_directory_view_preview_selected_items (view);
@@ -643,7 +643,7 @@
gtk_tree_view_column_set_expand (col, TRUE);
#if 0
- renderer = gtk_cell_renderer_pixbuf_new( );
+ renderer = gtk_cell_renderer_pixbuf_new( );
gtk_tree_view_column_pack_start (col, renderer, FALSE);
gtk_tree_view_column_set_attributes (col,
renderer,
@@ -694,7 +694,7 @@
GtkTreeIter temp_iter;
GtkTreeRowReference* row_reference;
FMColumnsView *col_view;
- GtkTreeModel* tree_model;
+ GtkTreeModel* tree_model;
GtkTreeSelection *selection;
path = NULL;
@@ -708,7 +708,7 @@
file_path = gtk_tree_model_get_path (tree_model, &iter);
if (gtk_tree_selection_path_is_selected (selection, file_path)) {
- /* get reference for next element in the list view. If the element to be deleted is the
+ /* get reference for next element in the list view. If the element to be deleted is the
* last one, get reference to previous element. If there is only one element in view
* no need to select anything.
*/
@@ -740,7 +740,7 @@
if (row_reference) {
gtk_tree_row_reference_free (row_reference);
}
- }
+ }
}
@@ -820,7 +820,7 @@
}
static gboolean
-fm_columns_view_get_visible_range (FMDirectoryView *view,
+fm_columns_view_get_visible_range (FMDirectoryView *view,
GtkTreePath **start_path,
GtkTreePath **end_path)
@@ -837,14 +837,14 @@
g_warning ("%s\n", G_STRFUNC);
- if (view->details->new_selection_path)
+ if (view->details->new_selection_path)
gtk_tree_path_free (view->details->new_selection_path);
if (view->details->selection)
gof_file_list_free (view->details->selection);
g_object_unref (view->model);
g_free (view->details);
- G_OBJECT_CLASS (fm_columns_view_parent_class)->finalize (object);
+ G_OBJECT_CLASS (fm_columns_view_parent_class)->finalize (object);
}
static void
@@ -856,11 +856,12 @@
create_and_set_up_tree_view (view);
//fm_columns_view_click_policy_changed (FM_DIRECTORY_VIEW (view));
-
+
/* set the new "size" for the icon renderer */
- g_object_set (G_OBJECT (FM_DIRECTORY_VIEW (view)->icon_renderer), "size", 16, NULL);
+ int column_icon_size = (int)(g_settings_get_int (settings, "column-icon-size"));
+ g_object_set (G_OBJECT (FM_DIRECTORY_VIEW (view)->icon_renderer), "size", column_icon_size, NULL);
//TODO clean up this "hack"
- gtk_cell_renderer_set_fixed_size (FM_DIRECTORY_VIEW (view)->icon_renderer, 18, 18);
+ gtk_cell_renderer_set_fixed_size (FM_DIRECTORY_VIEW (view)->icon_renderer, column_icon_size, column_icon_size);
}
static void
@@ -880,8 +881,8 @@
fm_directory_view_class->remove_file = fm_columns_view_remove_file;
fm_directory_view_class->colorize_selection = fm_columns_view_colorize_selected_items;
//fm_directory_view_class->sync_selection = fm_columns_view_sync_selection;
- fm_directory_view_class->get_selection = fm_columns_view_get_selection;
- fm_directory_view_class->get_selection_for_file_transfer = fm_columns_view_get_selection_for_file_transfer;
+ fm_directory_view_class->get_selection = fm_columns_view_get_selection;
+ fm_directory_view_class->get_selection_for_file_transfer = fm_columns_view_get_selection_for_file_transfer;
fm_directory_view_class->get_path_at_pos = fm_columns_view_get_path_at_pos;
fm_directory_view_class->highlight_path = fm_columns_view_highlight_path;
Follow ups