Skip to content

Commit

Permalink
2006-04-13 Alexander Olk <alex.olk@googlemail.com>
Browse files Browse the repository at this point in the history
	* FileDialog.cs: Show something in the DirComboBox on *nix if the
	  path doesn't fit into some of our Current.Places


svn path=/trunk/mcs/; revision=59474
  • Loading branch information
Alexander Olk committed Apr 13, 2006
1 parent 6397521 commit 2416ff6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2006-04-13 Alexander Olk <alex.olk@googlemail.com>

* FileDialog.cs: Show something in the DirComboBox on *nix if the
path doesn't fit into some of our Current.Places

2006-04-13 Jackson Harper <jackson@ximian.com>

* ComboBox.cs: Use borders instead of drawing our own decorations,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2423,6 +2423,7 @@ public int XPos {
private string recently_used_tmp;
private string my_computer_tmp;
private string my_network_tmp;
private string my_root_tmp;
private Stack dirStack = new Stack();

public DirComboBox ()
Expand All @@ -2445,6 +2446,7 @@ public DirComboBox ()
recently_used_tmp = FileDialog.recently_string;
my_computer_tmp = FileDialog.mycomputer_string;
my_network_tmp = FileDialog.network_string;
my_root_tmp = "/";
} else {
recently_used_tmp = ThemeEngine.Current.Places (UIIcon.PlacesRecentDocuments);
my_computer_tmp = ThemeEngine.Current.Places (UIIcon.PlacesMyComputer);
Expand All @@ -2460,6 +2462,10 @@ public DirComboBox ()
}
);

if ((platform == 4) || (platform == 128)) {
Items.Add(new DirComboBoxItem (5, "/", my_root_tmp, 0));
}

ResumeLayout (false);
}

Expand Down Expand Up @@ -2495,6 +2501,9 @@ private void CreateComboList ()
else
if (currentPath == my_network_tmp)
selection = 4;
else
if (currentPath == my_root_tmp)
selection = 5;

child_of = CheckChildOf ();

Expand All @@ -2516,6 +2525,12 @@ private void CreateComboList ()

Items.Add (new DirComboBoxItem (4, "My Network", my_network_tmp, 0));

if ((platform == 4) || (platform == 128)) {
Items.Add (new DirComboBoxItem (5, "/", my_root_tmp, 0));
if (child_of == 15)
selection = AppendToParent ();
}

if (selection != -1)
SelectedIndex = selection;

Expand All @@ -2540,8 +2555,11 @@ private int CheckChildOf ()
if (di.FullName == ThemeEngine.Current.Places (UIIcon.PlacesDesktop))
return 1;
else
if (di.FullName == ThemeEngine.Current.Places (UIIcon.PlacesPersonal))
if (di.FullName == ThemeEngine.Current.Places (UIIcon.PlacesPersonal) || di.FullName == "/home")
return 2;
else
if (di.FullName == "/")
return 15;

dirStack.Push (di);
}
Expand Down

0 comments on commit 2416ff6

Please sign in to comment.