[PATCH] please test -adds "recent files" to file selection dialog




I've been playing with the file selection widget code, and have
written a patch that allows you to change the standard text entry box
to a combo box, where the combo box list contains a list of recent
files. The file selected is then prepended to the list.

If anyone's interested, it would be nice if they would test this/give
me some feedback on whether:

-this is useful/inappropriate functionality to add to the file
selection widget
-this patch breaks anything
-my implementation is all wrong
-my code sucks

I haven't implemented any way of saving the recent files list, would
it be worth doing so? Would there be any agreement on how to do this?

The patch is located here:

www.math.ucsb.edu/~maher/gtk-maher-990920-0.README
www.math.ucsb.edu/~maher/gtk-maher-990920-0.patch.gz

Random code questions:

1. gtk_combo_set_popdown_strings does a return_if_fail if you send it
a NULL string - is there any reason I shouldn't alter it to accept
NULL strings?

2. The following code in gtkfileselect.c appears to be unnecessary:

static void
gtk_file_selection_init (GtkFileSelection *filesel)
{
...<snip>...
    action area for packing buttons into.
    filesel->action_area = gtk_hbox_new (TRUE, 0);
    gtk_box_pack_start (GTK_BOX (filesel->main_vbox),
                        filesel->action_area,
                        FALSE, FALSE, 0);
                        gtk_widget_show (filesel->action_area);

why shouldn't I delete it?

3. The following code generates warnings about return with no value
for the g_return_if_fail lines - but I don't see what's wrong?

GList*
gtk_file_selection_get_recent (GtkFileSelection *filesel)
{
  g_return_if_fail (filesel != NULL);
  g_return_if_fail (GTK_IS_FILE_SELECTION (filesel));
  g_return_if_fail (filesel->selection_combo != NULL);

  return (GList *) filesel->recent_files;
}

Joseph

PS My real email is maher@nospam.math.ucsb.edu

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]