Looks good to me.

Regards,
Krishnan

On 03/11/09 11:54, Rohini wrote:
> CR: gnome screenshot refuses to allow different dir unless mouse is used
>
> Description:
> Added a check to verify if filename is absolute and ignoring folder if 
> absolute path is specified.
>
> Fix:
> diff -urN 
> gnome-utils-2.25.90.orig/gnome-screenshot/screenshot-dialog.c 
> gnome-utils-2.25.90/gnome-screenshot/screenshot-dialog.c
> --- 
> gnome-utils-2.25.90.orig/gnome-screenshot/screenshot-dialog.c       
> 2009-03-06 11:04:59.021848933 +0530
> +++ gnome-utils-2.25.90/gnome-screenshot/screenshot-dialog.c    
> 2009-03-06 11:57:56.734246867 +0530
> @@ -356,6 +356,26 @@
>       tmp = g_strdup (_("Screenshot.png"));
>     }
>
> +  if (g_path_is_absolute(tmp))
> +  {
> +       error = NULL;
> +       folder = g_filename_to_uri (g_path_get_dirname (tmp), NULL, 
> &error);
> +       if (error)
> +       {
> +               g_warning ("Unable to convert `%s' to valid UTF-8: %s\n"
> +                          "Falling back to default file.",
> +                          folder,
> +                          error->message);
> +               g_error_free (error);
> +               folder = gtk_file_chooser_get_current_folder_uri 
> (GTK_FILE_CHOOSER (dialog->save_widget));
> +               tmp = g_strdup (_("Screenshot.png"));
> +
> +       }
> +       else
> +               tmp = g_path_get_basename (tmp);
> +
> +  }
> +
>   file = g_uri_escape_string (tmp, NULL, FALSE);
>   uri = g_build_filename (folder, file, NULL);
>


  • [jds-review] F... Rohini
    • [jds-revi... krishnan parthasarathi - Sun Microsystems - Bangalore India
    • [jds-revi... Takao Fujiwara - Tokyo S/W Center
      • [jds-... abhijit nath - Sun Microsystems - Bangalore India
        • [... Rohini
        • [... Rohini
          • ... abhijit nath - Sun Microsystems - Bangalore India
            • ... Rohini
              • ... Takao Fujiwara - Tokyo S/W Center

Reply via email to