summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>1998-03-13 09:19:03 +0000
committerGeorge Lebl <jirka@src.gnome.org>1998-03-13 09:19:03 +0000
commit6acde3e1ce5791538a639544aa50ac3d9389cf1e (patch)
tree717f8b3cf3d897d1fad8a6c50481a6775c2cb7be
parent38326008228cf382dffe87783103f33d95069ca9 (diff)
downloadgdk-pixbuf-6acde3e1ce5791538a639544aa50ac3d9389cf1e.tar.gz
Set the column width of the clists to the longest string length so that
Fri Mar 13 01:17:44 1998 George Lebl <jirka@5z.com> * gtk/gtkfilesel.c: Set the column width of the clists to the longest string length so that the bottom scrollbar appears when you get some long files in the list
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-06
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-26
-rw-r--r--ChangeLog.pre-2-46
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gtk/gtkfilesel.c24
8 files changed, 66 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c28f6fb2e..6b8b09e8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Mar 13 01:17:44 1998 George Lebl <jirka@5z.com>
+
+ * gtk/gtkfilesel.c: Set the column width of the clists
+ to the longest string length so that the bottom scrollbar
+ appears when you get some long files in the list
+
1998-03-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
* docs/gtk_tut.sgml: fix one missing quote.
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index c28f6fb2e..6b8b09e8e 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,9 @@
+Fri Mar 13 01:17:44 1998 George Lebl <jirka@5z.com>
+
+ * gtk/gtkfilesel.c: Set the column width of the clists
+ to the longest string length so that the bottom scrollbar
+ appears when you get some long files in the list
+
1998-03-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
* docs/gtk_tut.sgml: fix one missing quote.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index c28f6fb2e..6b8b09e8e 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+Fri Mar 13 01:17:44 1998 George Lebl <jirka@5z.com>
+
+ * gtk/gtkfilesel.c: Set the column width of the clists
+ to the longest string length so that the bottom scrollbar
+ appears when you get some long files in the list
+
1998-03-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
* docs/gtk_tut.sgml: fix one missing quote.
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index c28f6fb2e..6b8b09e8e 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,9 @@
+Fri Mar 13 01:17:44 1998 George Lebl <jirka@5z.com>
+
+ * gtk/gtkfilesel.c: Set the column width of the clists
+ to the longest string length so that the bottom scrollbar
+ appears when you get some long files in the list
+
1998-03-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
* docs/gtk_tut.sgml: fix one missing quote.
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index c28f6fb2e..6b8b09e8e 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,9 @@
+Fri Mar 13 01:17:44 1998 George Lebl <jirka@5z.com>
+
+ * gtk/gtkfilesel.c: Set the column width of the clists
+ to the longest string length so that the bottom scrollbar
+ appears when you get some long files in the list
+
1998-03-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
* docs/gtk_tut.sgml: fix one missing quote.
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index c28f6fb2e..6b8b09e8e 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+Fri Mar 13 01:17:44 1998 George Lebl <jirka@5z.com>
+
+ * gtk/gtkfilesel.c: Set the column width of the clists
+ to the longest string length so that the bottom scrollbar
+ appears when you get some long files in the list
+
1998-03-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
* docs/gtk_tut.sgml: fix one missing quote.
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index c28f6fb2e..6b8b09e8e 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+Fri Mar 13 01:17:44 1998 George Lebl <jirka@5z.com>
+
+ * gtk/gtkfilesel.c: Set the column width of the clists
+ to the longest string length so that the bottom scrollbar
+ appears when you get some long files in the list
+
1998-03-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
* docs/gtk_tut.sgml: fix one missing quote.
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c
index 66dd267ef..f1357833f 100644
--- a/gtk/gtkfilesel.c
+++ b/gtk/gtkfilesel.c
@@ -1228,6 +1228,8 @@ gtk_file_selection_populate (GtkFileSelection *fs,
gint did_recurse = FALSE;
gint possible_count = 0;
gint selection_index = -1;
+ gint file_list_width;
+ gint dir_list_width;
g_return_if_fail (fs != NULL);
g_return_if_fail (GTK_IS_FILE_SELECTION (fs));
@@ -1257,6 +1259,12 @@ gtk_file_selection_populate (GtkFileSelection *fs,
text[0] = "../";
row = gtk_clist_append (GTK_CLIST (fs->dir_list), text);
+ /*reset the max widths of the lists*/
+ dir_list_width = gdk_string_width(fs->dir_list->style->font,"../");
+ gtk_clist_set_column_width(GTK_CLIST(fs->dir_list),0,dir_list_width);
+ file_list_width = 1;
+ gtk_clist_set_column_width(GTK_CLIST(fs->file_list),0,file_list_width);
+
while (poss)
{
if (cmpl_is_a_completion (poss))
@@ -1272,12 +1280,28 @@ gtk_file_selection_populate (GtkFileSelection *fs,
if (strcmp (filename, "./") != 0 &&
strcmp (filename, "../") != 0)
{
+ int width = gdk_string_width(fs->dir_list->style->font,
+ filename);
row = gtk_clist_append (GTK_CLIST (fs->dir_list), text);
+ if(width > dir_list_width)
+ {
+ dir_list_width = width;
+ gtk_clist_set_column_width(GTK_CLIST(fs->dir_list),0,
+ width);
+ }
}
}
else
{
+ int width = gdk_string_width(fs->file_list->style->font,
+ filename);
row = gtk_clist_append (GTK_CLIST (fs->file_list), text);
+ if(width > file_list_width)
+ {
+ file_list_width = width;
+ gtk_clist_set_column_width(GTK_CLIST(fs->file_list),0,
+ width);
+ }
}
}