diff --git a/ChangeLog b/ChangeLog index bf0fb304775f6a84e1911f4df8f1966a23221757..7df92ecf3680c147b3c31f0b5f1d6d38886f157f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-02-06 Benedikt Meurer <benny@xfce.org> + + * thunar/thunar-templates-action.c: Use "show" instead of "map" to + create the Templates menu, to make sure the menu position is + determined properly. + * README, configure.in.in, thunar/thunar-icon-view.c: Use cairo only + with Gtk+ >= 2.7.1. + * thunar/thunar-shortcuts-view.c(thunar_shortcuts_view_init): Display + typeahead search for the shortcuts view. + 2006-02-06 Benedikt Meurer <benny@xfce.org> * thunar-vfs/thunar-vfs-transfer-job.c(thunar_vfs_transfer_job_execute): diff --git a/README b/README index 50c50a8f4ba5fb476f98865953f7810249ef6469..00263d74f3f46c88ff0756bdd2517e0bfccce3b9 100644 --- a/README +++ b/README @@ -20,7 +20,6 @@ Thunar depends on the following packages: Thunar can optionally use the following packages: - - cairo 0.5 or above - gamin 0.1.0 or above - gconf 2.4 or above - libjpeg 6 or above diff --git a/configure.in.in b/configure.in.in index 56849d184702d3e21325c9582a712632af7e6162..d03ea41052b456e66e7de7ac82d1d3aa80bb60ab 100644 --- a/configure.in.in +++ b/configure.in.in @@ -162,11 +162,6 @@ XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.6.4]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0]) XDT_CHECK_PACKAGE([LIBPNG], [libpng12], [1.2.0]) -dnl ********************************** -dnl *** Optional support for cairo *** -dnl ********************************** -XDT_CHECK_OPTIONAL_PACKAGE([CAIRO], [cairo], [0.5], [cairo], [Cairo]) - dnl ******************************************************* dnl *** Optional support for gconf (GNOME thumbnailers) *** dnl ******************************************************* diff --git a/thunar/thunar-icon-view.c b/thunar/thunar-icon-view.c index 1109236221a5f80e0c7026afd0eed53fd23193c2..b55b6700d85661adb17901f4a4e8491cf2767e4a 100644 --- a/thunar/thunar-icon-view.c +++ b/thunar/thunar-icon-view.c @@ -27,11 +27,6 @@ #include <thunar/thunar-icon-view.h> #include <thunar/thunar-icon-view-ui.h> -#if !GTK_CHECK_VERSION(2,7,1) && defined(GDK_WINDOWING_X11) && defined(HAVE_CAIRO) -#include <cairo/cairo-xlib.h> -#include <gdk/gdkx.h> -#endif - /* Property identifiers */ @@ -635,40 +630,6 @@ thunar_icon_view_button_release_event (ExoIconView *view, -#if GTK_CHECK_VERSION(2,7,1) -static cairo_t* -get_cairo_context (GdkWindow *window) -{ - return gdk_cairo_create (window); -} -#elif defined(GDK_WINDOWING_X11) && defined(HAVE_CAIRO) -static cairo_t* -get_cairo_context (GdkWindow *window) -{ - cairo_surface_t *surface; - GdkDrawable *drawable; - cairo_t *cr; - gint w; - gint h; - gint x; - gint y; - - gdk_window_get_internal_paint_info (window, &drawable, &x, &y); - gdk_drawable_get_size (drawable, &w, &h); - - surface = cairo_xlib_surface_create (GDK_DRAWABLE_XDISPLAY (drawable), GDK_DRAWABLE_XID (drawable), - gdk_x11_visual_get_xvisual (gdk_drawable_get_visual (drawable)), w, h); - cr = cairo_create (surface); - cairo_surface_destroy (surface); - - cairo_translate (cr, -x, -y); - - return cr; -} -#endif - - - static gboolean thunar_icon_view_expose_event (ExoIconView *view, GdkEventExpose *event, @@ -678,7 +639,7 @@ thunar_icon_view_expose_event (ExoIconView *view, GtkAction *action = NULL; GdkPixbuf *stock_icon = NULL; gchar *stock_id; -#if GTK_CHECK_VERSION(2,7,1) || (defined(GDK_WINDOWING_X11) && defined(HAVE_CAIRO)) +#if GTK_CHECK_VERSION(2,7,1) GdkColor bg; cairo_t *cr; #endif @@ -690,8 +651,8 @@ thunar_icon_view_expose_event (ExoIconView *view, g_return_val_if_fail (icon_view->gesture_release_id > 0, FALSE); /* shade the icon view content while performing mouse gestures */ -#if GTK_CHECK_VERSION(2,7,1) || (defined(GDK_WINDOWING_X11) && defined(HAVE_CAIRO)) - cr = get_cairo_context (event->window); +#if GTK_CHECK_VERSION(2,7,1) + cr = gdk_cairo_create (event->window); bg = GTK_WIDGET (view)->style->base[GTK_STATE_NORMAL]; cairo_set_source_rgba (cr, bg.red / 65535.0, bg.green / 65535.0, bg.blue / 65535.0, 0.7); cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height); diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c index 314a733c848f9a630a59f0f2d5c461c57681ccef..29b6a63420f619487b8cfc46d262a26b3a1f1bfc 100644 --- a/thunar/thunar-shortcuts-view.c +++ b/thunar/thunar-shortcuts-view.c @@ -213,6 +213,7 @@ thunar_shortcuts_view_init (ThunarShortcutsView *view) GtkCellRenderer *renderer; /* configure the tree view */ + gtk_tree_view_set_enable_search (GTK_TREE_VIEW (view), FALSE); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE); /* grab a reference on the preferences; be sure to redraw the view diff --git a/thunar/thunar-templates-action.c b/thunar/thunar-templates-action.c index 1fddde6cdf416ef173b27088bb8986c0d8b78d45..af05a6b46f16c17a00b9a881ffaea049188ca345 100644 --- a/thunar/thunar-templates-action.c +++ b/thunar/thunar-templates-action.c @@ -42,7 +42,7 @@ static GtkWidget *thunar_templates_action_create_menu_item (GtkAction static void thunar_templates_action_fill_menu (ThunarTemplatesAction *templates_action, ThunarVfsPath *templates_path, GtkWidget *menu); -static void thunar_templates_action_menu_mapped (GtkWidget *menu, +static void thunar_templates_action_menu_shown (GtkWidget *menu, ThunarTemplatesAction *templates_action); @@ -154,9 +154,9 @@ thunar_templates_action_create_menu_item (GtkAction *action) /* let GtkAction allocate the menu item */ item = (*GTK_ACTION_CLASS (thunar_templates_action_parent_class)->create_menu_item) (action); - /* associate an empty submenu with the item (will be filled when mapped) */ + /* associate an empty submenu with the item (will be filled when shown) */ menu = gtk_menu_new (); - g_signal_connect (G_OBJECT (menu), "map", G_CALLBACK (thunar_templates_action_menu_mapped), action); + g_signal_connect (G_OBJECT (menu), "show", G_CALLBACK (thunar_templates_action_menu_shown), action); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu); return item; @@ -343,8 +343,8 @@ thunar_templates_action_fill_menu (ThunarTemplatesAction *templates_action, static void -thunar_templates_action_menu_mapped (GtkWidget *menu, - ThunarTemplatesAction *templates_action) +thunar_templates_action_menu_shown (GtkWidget *menu, + ThunarTemplatesAction *templates_action) { ThunarVfsPath *templates_path; ThunarVfsPath *home_path;