Index: gtkpathbar.c
===================================================================
--- gtkpathbar.c	(revision 17203)
+++ gtkpathbar.c	(working copy)
@@ -327,18 +327,22 @@ gtk_path_bar_update_slider_buttons (GtkP
       GtkWidget *button;
 
       button = BUTTON_DATA (path_bar->button_list->data)->button;
-      if (gtk_widget_get_child_visible (button))
+      if (gtk_widget_get_child_visible (button) &&
+	  button->allocation.width >= button->requisition.width)
 	{
-	  gtk_path_bar_stop_scrolling (path_bar);
+	  if (path_bar->scrolling_down)
+	    gtk_path_bar_stop_scrolling (path_bar);
 	  gtk_widget_set_sensitive (path_bar->down_slider_button, FALSE);
 	}
       else
 	gtk_widget_set_sensitive (path_bar->down_slider_button, TRUE);
 
       button = BUTTON_DATA (g_list_last (path_bar->button_list)->data)->button;
-      if (gtk_widget_get_child_visible (button))
+      if (gtk_widget_get_child_visible (button) &&
+	  button->allocation.width >= button->requisition.width)
 	{
-	  gtk_path_bar_stop_scrolling (path_bar);
+	  if (path_bar->scrolling_up)
+	    gtk_path_bar_stop_scrolling (path_bar);
 	  gtk_widget_set_sensitive (path_bar->up_slider_button, FALSE);
 	}
       else
@@ -366,7 +370,7 @@ gtk_path_bar_size_allocate (GtkWidget   
   GtkAllocation child_allocation;
   GList *list, *first_button;
   gint width;
-  gint allocation_width;
+  gint allocation_width, free_space;
   gint border_width;
   gboolean need_sliders = FALSE;
   gint up_slider_offset = 0;
@@ -485,22 +489,26 @@ gtk_path_bar_size_allocate (GtkWidget   
       child = BUTTON_DATA (list->data)->button;
 
       child_allocation.width = child->requisition.width;
-      if (direction == GTK_TEXT_DIR_RTL)
-	child_allocation.x -= child_allocation.width;
 
       /* Check to see if we've don't have any more space to allocate buttons */
-      if (need_sliders && direction == GTK_TEXT_DIR_RTL)
-	{
-	  if (child_allocation.x - path_bar->spacing - path_bar->slider_width < widget->allocation.x + border_width)
-	    break;
-	}
-      else if (need_sliders && direction == GTK_TEXT_DIR_LTR)
+      if (need_sliders)
 	{
-	  if (child_allocation.x + child_allocation.width + path_bar->spacing + path_bar->slider_width >
-	      widget->allocation.x + border_width + allocation_width)
+	  if (direction == GTK_TEXT_DIR_RTL)
+	    free_space = child_allocation.x -
+	      (widget->allocation.x + border_width + path_bar->slider_width + path_bar->spacing);
+	  else
+	    free_space = widget->allocation.x + border_width + allocation_width -
+	      path_bar->slider_width - path_bar->spacing - child_allocation.x;
+
+	  if (free_space <= 0)
 	    break;
+	  else if (free_space < child_allocation.width)
+	    child_allocation.width = free_space;
 	}
 
+      if (direction == GTK_TEXT_DIR_RTL)
+	child_allocation.x -= child_allocation.width;
+
       gtk_widget_set_child_visible (BUTTON_DATA (list->data)->button, TRUE);
       gtk_widget_size_allocate (child, &child_allocation);
 
@@ -1303,7 +1311,7 @@ make_directory_button (GtkPathBar  *path
     case DESKTOP_BUTTON:
       button_data->image = gtk_image_new ();
       button_data->label = gtk_label_new (NULL);
-      label_alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
+      label_alignment = gtk_alignment_new (0.0, 0.5, 1.0, 1.0);
       gtk_container_add (GTK_CONTAINER (label_alignment), button_data->label);
       child = gtk_hbox_new (FALSE, 2);
       gtk_box_pack_start (GTK_BOX (child), button_data->image, FALSE, FALSE, 0);
@@ -1312,7 +1320,7 @@ make_directory_button (GtkPathBar  *path
     case NORMAL_BUTTON:
     default:
       button_data->label = gtk_label_new (NULL);
-      label_alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
+      label_alignment = gtk_alignment_new (0.0, 0.5, 1.0, 1.0);
       gtk_container_add (GTK_CONTAINER (label_alignment), button_data->label);
       child = label_alignment;
       button_data->image = NULL;
@@ -1326,6 +1334,9 @@ make_directory_button (GtkPathBar  *path
     g_signal_connect (label_alignment, "size-request",
 		      G_CALLBACK (label_size_request_cb), button_data);
 
+  if (button_data->label)
+    gtk_label_set_ellipsize (GTK_LABEL (button_data->label), PANGO_ELLIPSIZE_END);
+
   button_data->dir_name = g_strdup (dir_name);
   button_data->path = gtk_file_path_new_dup (gtk_file_path_get_string (path));
   button_data->file_is_hidden = file_is_hidden;
