~ubuntu-branches/ubuntu/intrepid/gedit/intrepid-proposed

« back to all changes in this revision

Viewing changes to plugins/filebrowser/gedit-file-browser-plugin.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-09-08 21:33:44 UTC
  • mfrom: (1.1.48 upstream)
  • Revision ID: james.westby@ubuntu.com-20080908213344-eiv4gvnuily7unti
Tags: 2.23.92-0ubuntu1
* New upstream version:
  - Bugfixes related to the gio port (lp: #236953, #262007)

Show diffs side-by-side

added added

removed removed

Lines of Context:
901
901
                                      GTK_DIALOG_MODAL |
902
902
                                      GTK_DIALOG_DESTROY_WITH_PARENT,
903
903
                                      GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
904
 
                                      title);
 
904
                                      "%s", title);
905
905
        gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dlg),
906
 
                                                  message);
 
906
                                                  "%s", message);
907
907
 
908
908
        gtk_dialog_run (GTK_DIALOG (dlg));
909
909
        gtk_widget_destroy (dlg);
987
987
        GFile * oldfile;
988
988
        GFile * newfile;
989
989
        gchar * uri;
990
 
        gchar * relative;
991
990
        
992
991
        /* Find all documents and set its uri to newuri where it matches olduri */
993
992
        app = gedit_app_get_default ();
1008
1007
                if (g_file_equal (docfile, oldfile)) {
1009
1008
                        gedit_document_set_uri (doc, newuri);
1010
1009
                } else {
 
1010
                        gchar *relative;
 
1011
 
1011
1012
                        relative = g_file_get_relative_path (oldfile, docfile);
1012
 
                        g_object_unref (docfile);
1013
 
                        g_free (uri);
1014
 
                
 
1013
 
1015
1014
                        if (relative) {
1016
1015
                                /* relative now contains the part in docfile without
1017
1016
                                   the prefix oldfile */
1018
1017
 
 
1018
                                g_object_unref (docfile);
 
1019
                                g_free (uri);
 
1020
 
1019
1021
                                docfile = g_file_get_child (newfile, relative);
1020
1022
                                uri = g_file_get_uri (docfile);
1021
 
                        
 
1023
 
1022
1024
                                gedit_document_set_uri (doc, uri);
1023
1025
                        }
1024
 
                
 
1026
 
1025
1027
                        g_free (relative);
1026
1028
                }
1027
 
                
 
1029
 
1028
1030
                g_free (uri);
1029
1031
                g_object_unref (docfile);
1030
1032
        }
1031
 
        
 
1033
 
1032
1034
        g_object_unref (oldfile);
1033
1035
        g_object_unref (newfile);
1034
 
        
 
1036
 
1035
1037
        g_list_free (documents);
1036
1038
}
1037
1039