Re: [patch] select pattern



On Sat, 2003-09-20 at 23:09, James Willcox wrote:

>  
> +GList *
> +nautilus_directory_match_glob (NautilusDirectory *directory, const
> char *glob)
> +{

This should probably be called _match_pattern() for consistency.


> +               NautilusFile *file = l->data;
> +               char *name = nautilus_file_get_display_name (file);

Styleguide says initialize variables separately from their declaration
(this pops up in a few other places too).


> +
> +               if (g_pattern_match_string (spec, name))
> +                       ret = g_list_append(ret, nautilus_file_ref
> (file));  

Same with braces around one line if statements, and it's probably worth
prepending+reversing.


> --- src/nautilus-shell-ui.xml   15 Sep 2003 02:46:00
> -0000      1.107.6.1
> +++ src/nautilus-shell-ui.xml   21 Sep 2003 03:07:42 -0000
> @@ -19,6 +19,7 @@
>         <cmd name="Stop"
>          _tip="Stop loading this location"/>
>         <cmd name="Select All" accel="*Control*a" sensitive="0"/>
> +       <cmd name="Select Pattern"/>

I think this was left in on accident, nautilus-shell-ui.xml shouldn't
need any changes.


> +       gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
> box);
> +       response = gtk_dialog_run (GTK_DIALOG (dialog));
> +
> +       if (response == GTK_RESPONSE_OK) {

This dialog probably shouldn't be modal (correct me if I'm wrong).

Thanks,
-dave





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