mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 12:41:07 +00:00
preserve ordering from gtk_tree_selection_foreach when returning filenames
Tue Sep 24 23:33:48 2002 Manish Singh <yosh@gimp.org> * gtk/gtkfilesel.c: preserve ordering from gtk_tree_selection_foreach when returning filenames for gtk_file_selection_get_selections (#86567) * gtk/gtkclipboard.c: GtkClipboard struct should have a GObject in it, not a GObjectClass
This commit is contained in:
parent
273f99112e
commit
9cde6b74d5
@ -1,3 +1,12 @@
|
|||||||
|
Tue Sep 24 23:33:48 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c: preserve ordering from gtk_tree_selection_foreach
|
||||||
|
when returning filenames for gtk_file_selection_get_selections
|
||||||
|
(#86567)
|
||||||
|
|
||||||
|
* gtk/gtkclipboard.c: GtkClipboard struct should have a GObject
|
||||||
|
in it, not a GObjectClass
|
||||||
|
|
||||||
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Tue Sep 24 23:33:48 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c: preserve ordering from gtk_tree_selection_foreach
|
||||||
|
when returning filenames for gtk_file_selection_get_selections
|
||||||
|
(#86567)
|
||||||
|
|
||||||
|
* gtk/gtkclipboard.c: GtkClipboard struct should have a GObject
|
||||||
|
in it, not a GObjectClass
|
||||||
|
|
||||||
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Tue Sep 24 23:33:48 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c: preserve ordering from gtk_tree_selection_foreach
|
||||||
|
when returning filenames for gtk_file_selection_get_selections
|
||||||
|
(#86567)
|
||||||
|
|
||||||
|
* gtk/gtkclipboard.c: GtkClipboard struct should have a GObject
|
||||||
|
in it, not a GObjectClass
|
||||||
|
|
||||||
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Tue Sep 24 23:33:48 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c: preserve ordering from gtk_tree_selection_foreach
|
||||||
|
when returning filenames for gtk_file_selection_get_selections
|
||||||
|
(#86567)
|
||||||
|
|
||||||
|
* gtk/gtkclipboard.c: GtkClipboard struct should have a GObject
|
||||||
|
in it, not a GObjectClass
|
||||||
|
|
||||||
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Tue Sep 24 23:33:48 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c: preserve ordering from gtk_tree_selection_foreach
|
||||||
|
when returning filenames for gtk_file_selection_get_selections
|
||||||
|
(#86567)
|
||||||
|
|
||||||
|
* gtk/gtkclipboard.c: GtkClipboard struct should have a GObject
|
||||||
|
in it, not a GObjectClass
|
||||||
|
|
||||||
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Tue Sep 24 23:33:48 2002 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c: preserve ordering from gtk_tree_selection_foreach
|
||||||
|
when returning filenames for gtk_file_selection_get_selections
|
||||||
|
(#86567)
|
||||||
|
|
||||||
|
* gtk/gtkclipboard.c: GtkClipboard struct should have a GObject
|
||||||
|
in it, not a GObjectClass
|
||||||
|
|
||||||
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Sep 24 18:18:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
* gtk/gtkclipboard.[ch]: Make a GObject (#75970, James
|
||||||
|
@ -41,7 +41,7 @@ typedef struct _RequestTextInfo RequestTextInfo;
|
|||||||
|
|
||||||
struct _GtkClipboard
|
struct _GtkClipboard
|
||||||
{
|
{
|
||||||
GObjectClass parent_instance;
|
GObject parent_instance;
|
||||||
|
|
||||||
GdkAtom selection;
|
GdkAtom selection;
|
||||||
|
|
||||||
|
@ -2364,6 +2364,7 @@ gtk_file_selection_get_selections (GtkFileSelection *filesel)
|
|||||||
gchar *filename, *dirname;
|
gchar *filename, *dirname;
|
||||||
gchar *current, *buf;
|
gchar *current, *buf;
|
||||||
gint i, count;
|
gint i, count;
|
||||||
|
gboolean unselected_entry;
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_FILE_SELECTION (filesel), NULL);
|
g_return_val_if_fail (GTK_IS_FILE_SELECTION (filesel), NULL);
|
||||||
|
|
||||||
@ -2383,7 +2384,7 @@ gtk_file_selection_get_selections (GtkFileSelection *filesel)
|
|||||||
selections = g_new (gchar *, 2);
|
selections = g_new (gchar *, 2);
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
selections[count++] = filename;
|
unselected_entry = TRUE;
|
||||||
|
|
||||||
if (names != NULL)
|
if (names != NULL)
|
||||||
{
|
{
|
||||||
@ -2396,15 +2397,20 @@ gtk_file_selection_get_selections (GtkFileSelection *filesel)
|
|||||||
current = g_build_filename (dirname, buf, NULL);
|
current = g_build_filename (dirname, buf, NULL);
|
||||||
g_free (buf);
|
g_free (buf);
|
||||||
|
|
||||||
if (compare_filenames (current, filename) != 0)
|
selections[count++] = current;
|
||||||
selections[count++] = current;
|
|
||||||
else
|
if (unselected_entry && compare_filenames (current, filename) == 0)
|
||||||
g_free (current);
|
unselected_entry = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (dirname);
|
g_free (dirname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (unselected_entry)
|
||||||
|
selections[count++] = filename;
|
||||||
|
else
|
||||||
|
g_free (filename);
|
||||||
|
|
||||||
selections[count] = NULL;
|
selections[count] = NULL;
|
||||||
|
|
||||||
return selections;
|
return selections;
|
||||||
|
Loading…
Reference in New Issue
Block a user