[PATCH] List view fixes for right click menu and zoom levels
- From: David Emory Watson <dwatson cs ucr edu>
- To: nautilus-list gnome org
- Subject: [PATCH] List view fixes for right click menu and zoom levels
- Date: 05 May 2002 13:25:48 -0400
The right click menu changes should be fairly obvious given the comments
in the code.
Regarding the zoom level changes:
Nautilus views generally have larger icon sizes (and spacing) then
"older" systems do so changing the default to 75% (aka 36 pixels) isn't
that bad. The original default of 50% was probably intended to make the
list view look like those systems. However, this choice makes it
difficult to get both a range of font sizes and make the default have a
"normal" looking font. These changes (including the bumping up of all
font sizes, per Dave's comment and my own agreement) make that
possible. Anyway, if we want we can always change this latter. But
with the release coming up I think it's important that we get these
changes in.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5266
diff -p -u -r1.5266 ChangeLog
--- ChangeLog 5 May 2002 15:40:22 -0000 1.5266
+++ ChangeLog 5 May 2002 16:59:57 -0000
@@ -1,3 +1,15 @@
+2002-05-05 David Emory Watson <dwatson cs ucr edu>
+
+ * libnautilus-private/nautilus-global-preferences.c: Make list view
+ default to 75% zoom to get "nice" looking font size while maintaining
+ range of different font sizes.
+
+ * src/file-manager/fm-list-view.c:
+ (button_press_callback): Don't let the list view unselect anything when
+ the user attempts to get the right-click menu on a selection.
+ (fm_list_view_set_zoom_level): Invent equivalent of XXX_LARGE and make
+ the font size at all zoom levels one bigger.
+
2002-05-04 David Emory Watson <dwatson cs ucr edu>
* configure.in: Require eel 1.1.13.
Index: libnautilus-private/nautilus-global-preferences.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-global-preferences.c,v
retrieving revision 1.197
diff -p -u -r1.197 nautilus-global-preferences.c
--- libnautilus-private/nautilus-global-preferences.c 20 Apr 2002 21:11:26 -0000 1.197
+++ libnautilus-private/nautilus-global-preferences.c 5 May 2002 16:59:57 -0000
@@ -546,7 +546,7 @@ static const PreferenceDefault preferenc
},
{ NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL,
PREFERENCE_STRING,
- "smaller",
+ "small",
NULL, NULL,
"default_zoom_level"
},
Index: src/file-manager/fm-list-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-view.c,v
retrieving revision 1.169
diff -p -u -r1.169 fm-list-view.c
--- src/file-manager/fm-list-view.c 2 May 2002 23:03:29 -0000 1.169
+++ src/file-manager/fm-list-view.c 5 May 2002 16:59:57 -0000
@@ -158,14 +158,33 @@ event_after_callback (GtkWidget *widget,
static gboolean
button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callback_data)
{
- /* Deselect if people click outside any row. */
- if (event->window == gtk_tree_view_get_bin_window (GTK_TREE_VIEW (widget))
- && !gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget),
- event->x, event->y, NULL, NULL, NULL, NULL)) {
- gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (widget)));
+ GtkTreeView *tree_view;
+ GtkTreePath *path;
+
+ tree_view = GTK_TREE_VIEW (widget);
+
+ if (event->window != gtk_tree_view_get_bin_window (tree_view)) {
+ return FALSE;
}
- /* Let the default code run in any case; it won't reselect anything. */
+ if (gtk_tree_view_get_path_at_pos (tree_view, event->x, event->y,
+ &path, NULL, NULL, NULL)) {
+ if (event->button == 3
+ && gtk_tree_selection_path_is_selected (gtk_tree_view_get_selection (tree_view), path)) {
+ /* Don't let the default code run because if multiple rows
+ are selected it will unselect all but one row; but we
+ want the right click menu to apply to everything that's
+ currently selected. */
+ return TRUE;
+ }
+
+ gtk_tree_path_free (path);
+ } else {
+ /* Deselect if people click outside any row. */
+ gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (tree_view));
+ }
+
+ /* Let the default code run; it won't reselect anything. */
return FALSE;
}
@@ -262,6 +281,7 @@ create_and_set_up_tree_view (FMListView
GtkTreeViewColumn *column;
view->details->tree_view = GTK_TREE_VIEW (gtk_tree_view_new ());
+
g_signal_connect_object (gtk_tree_view_get_selection (view->details->tree_view),
"changed",
G_CALLBACK (list_selection_changed_callback), view, 0);
@@ -529,9 +549,13 @@ fm_list_view_set_zoom_level (FMListView
NautilusZoomLevel new_level,
gboolean always_set_level)
{
- static double pango_scale[7] = { PANGO_SCALE_XX_SMALL, PANGO_SCALE_X_SMALL, PANGO_SCALE_SMALL,
+ static double pango_scale[7] = { PANGO_SCALE_X_SMALL,
+ PANGO_SCALE_SMALL,
PANGO_SCALE_MEDIUM,
- PANGO_SCALE_LARGE, PANGO_SCALE_X_LARGE, PANGO_SCALE_XX_LARGE };
+ PANGO_SCALE_LARGE,
+ PANGO_SCALE_X_LARGE,
+ PANGO_SCALE_XX_LARGE,
+ 1.2 * PANGO_SCALE_XX_LARGE };
int icon_size;
int column;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]