summaryrefslogtreecommitdiff
path: root/thunar/thunar-icon-view.c
diff options
context:
space:
mode:
authorBenedikt Meurer <benny@xfce.org>2006-02-23 23:49:26 +0000
committerBenedikt Meurer <benny@xfce.org>2006-02-23 23:49:26 +0000
commit0b980a8fa95006ffe095d79044363779b33f5fac (patch)
treeb60abbfcad65eb541f23867335ef7bb3c664d7e6 /thunar/thunar-icon-view.c
parenta6b78a48991199a3f175a0a9318a19daa53eb938 (diff)
downloadthunar-0b980a8fa95006ffe095d79044363779b33f5fac.tar.gz
2006-02-24 Benedikt Meurer <benny@xfce.org>
* thunar/thunar-window.c(thunar_window_action_about): Add credits for Young Hahn <youngjin.hahn@gmail.com> to the about dialog. * thunar/thunar-preferences.c, docs/README.thunarrc: Add new preference MiscSingleClick, which controls whether single click navigation should be used. * thunar/thunar-preferences-dialog.c(thunar_preferences_dialog_init): Add single/double-click options to the preferences dialog. * thunar/thunar-pango-extensions.{c,h}: Add new helper function thunar_pango_attr_list_underline_single(), which returns a Pango attribute list for single-underlined text rendering. * thunar/thunar-text-renderer.c: Add "follow-prelit" property, which controls whether the text renderer should highlight text using the single underline attribute when a row/item is highlighted. * thunar/thunar-details-view.c, thunar/thunar-icon-view.c, thunar/thunar-shortcuts-view.c, thunar/thunar-standard-view.c: Add support for single click navigation to the details and icon views, and also to the shortcuts view. Bug #1396. * po/Thunar.pot, po/*.po: Merge new strings. * po/de.po: Update german translations. (Old svn revision: 20009)
Diffstat (limited to 'thunar/thunar-icon-view.c')
-rw-r--r--thunar/thunar-icon-view.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/thunar/thunar-icon-view.c b/thunar/thunar-icon-view.c
index e052e15b..a2d6e9eb 100644
--- a/thunar/thunar-icon-view.c
+++ b/thunar/thunar-icon-view.c
@@ -231,6 +231,7 @@ thunar_icon_view_init (ThunarIconView *icon_view)
g_signal_connect (G_OBJECT (view), "key-press-event", G_CALLBACK (thunar_icon_view_key_press_event), icon_view);
g_signal_connect (G_OBJECT (view), "item-activated", G_CALLBACK (thunar_icon_view_item_activated), icon_view);
g_signal_connect_swapped (G_OBJECT (view), "selection-changed", G_CALLBACK (thunar_standard_view_selection_changed), icon_view);
+ exo_binding_new (G_OBJECT (THUNAR_STANDARD_VIEW (icon_view)->preferences), "misc-single-click", G_OBJECT (view), "single-click");
gtk_container_add (GTK_CONTAINER (icon_view), view);
gtk_widget_show (view);
@@ -550,8 +551,10 @@ thunar_icon_view_button_press_event (ExoIconView *view,
/* select only the path to the item on which the user clicked */
exo_icon_view_select_path (view, path);
- /* if the event was a double-click, then we'll open the file or folder (folder's are opened in new windows) */
- if (G_LIKELY (event->type == GDK_2BUTTON_PRESS))
+ /* if the event was a double-click or we are in single-click mode, then
+ * we'll open the file or folder (folder's are opened in new windows)
+ */
+ if (G_LIKELY (event->type == GDK_2BUTTON_PRESS || exo_icon_view_get_single_click (view)))
{
/* determine the file for the path */
gtk_tree_model_get_iter (GTK_TREE_MODEL (THUNAR_STANDARD_VIEW (icon_view)->model), &iter, path);