nautilus r14243 - in branches/multiview: . src/file-manager
- From: jaredm svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r14243 - in branches/multiview: . src/file-manager
- Date: Sun, 8 Jun 2008 13:30:21 +0000 (UTC)
Author: jaredm
Date: Sun Jun 8 13:30:21 2008
New Revision: 14243
URL: http://svn.gnome.org/viewvc/nautilus?rev=14243&view=rev
Log:
2008-06-08 Jared Moore <jaredm svn gnome org>
* src/file-manager/fm-tree-view.c (button_pressed_callback):
Middle click on entry in tree sidebar to open a new tab.
Modified:
branches/multiview/ChangeLog
branches/multiview/src/file-manager/fm-tree-view.c
Modified: branches/multiview/src/file-manager/fm-tree-view.c
==============================================================================
--- branches/multiview/src/file-manager/fm-tree-view.c (original)
+++ branches/multiview/src/file-manager/fm-tree-view.c Sun Jun 8 13:30:21 2008
@@ -138,6 +138,9 @@
static void fm_tree_view_iface_init (NautilusSidebarIface *iface);
static void sidebar_provider_iface_init (NautilusSidebarProviderIface *iface);
+static void fm_tree_view_activate_file (FMTreeView *view,
+ NautilusFile *file,
+ NautilusWindowOpenFlags flags);
static GType fm_tree_view_provider_get_type (void);
G_DEFINE_TYPE_WITH_CODE (FMTreeView, fm_tree_view, GTK_TYPE_SCROLLED_WINDOW,
@@ -769,6 +772,24 @@
g_object_unref (view);
return TRUE;
+ } else if (event->button == 2 && event->type == GDK_BUTTON_PRESS) {
+ NautilusFile *file;
+
+ if (!gtk_tree_view_get_path_at_pos (treeview, event->x, event->y,
+ &path, NULL, NULL, NULL)) {
+ return FALSE;
+ }
+
+ file = sort_model_path_to_file (view, path);
+ if (file) {
+ fm_tree_view_activate_file (view, file,
+ NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB);
+ nautilus_file_unref (file);
+ }
+
+ gtk_tree_path_free (path);
+
+ return TRUE;
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]