Code

fix copyright year
[inkscape.git] / src / interface.cpp
index b31853cf3246c13877d9db892960282823deb5d1..83f4ac3c8ffdc6708a4deb26e44a06be23fcebd0 100644 (file)
@@ -213,6 +213,7 @@ sp_ui_new_view()
 
     sp_create_window(dtw, TRUE);
     sp_namedview_window_from_document(static_cast<SPDesktop*>(dtw->view));
+    sp_namedview_update_layers_from_document(static_cast<SPDesktop*>(dtw->view));
 }
 
 /* TODO: not yet working */
@@ -691,7 +692,7 @@ sp_menu_append_new_templates(GtkWidget *menu, Inkscape::UI::View::View *view)
 
             if (dir) {
                 for (gchar const *file = g_dir_read_name(dir); file != NULL; file = g_dir_read_name(dir)) {
-                    if (!g_str_has_suffix(file, ".svg"))
+                    if (!g_str_has_suffix(file, ".svg") && !g_str_has_suffix(file, ".svgz"))
                         continue; // skip non-svg files
 
                     gchar *basename = g_path_get_basename(file);
@@ -1040,7 +1041,7 @@ sp_ui_drag_data_received(GtkWidget *widget,
 
                     SPDocument *doc = SP_ACTIVE_DOCUMENT;
                     sp_document_done( doc , SP_VERB_NONE, 
-                                      /* TODO: annotate */ "interface.cpp:1047");
+                                      _("Drop color"));
 
                     if ( srgbProf ) {
                         cmsCloseProfile( srgbProf );
@@ -1082,7 +1083,7 @@ sp_ui_drag_data_received(GtkWidget *widget,
 
                     SPDocument *doc = SP_ACTIVE_DOCUMENT;
                     sp_document_done( doc , SP_VERB_NONE, 
-                                      /* TODO: annotate */ "interface.cpp:1089");
+                                      _("Drop color"));
                 }
             }
         }
@@ -1101,10 +1102,10 @@ sp_ui_drag_data_received(GtkWidget *widget,
                 return;
             }
 
-            Inkscape::XML::Node *repr = sp_repr_document_root(rnewdoc);
+            Inkscape::XML::Node *repr = rnewdoc->root();
             gchar const *style = repr->attribute("style");
 
-            Inkscape::XML::Node *newgroup = sp_repr_new("svg:g");
+            Inkscape::XML::Node *newgroup = rnewdoc->createElement("svg:g");
             newgroup->setAttribute("style", style);
 
             for (Inkscape::XML::Node *child = repr->firstChild(); child != NULL; child = child->next()) {
@@ -1136,7 +1137,7 @@ sp_ui_drag_data_received(GtkWidget *widget,
 
             Inkscape::GC::release(newgroup);
             sp_document_done(doc, SP_VERB_NONE, 
-                             /* TODO: annotate */ "interface.cpp:1143");
+                             _("Drop SVG"));
             break;
         }
 
@@ -1156,8 +1157,9 @@ sp_ui_drag_data_received(GtkWidget *widget,
             b64out.setColumnWidth(0);
 
             SPDocument *doc = SP_ACTIVE_DOCUMENT;
+            Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
 
-            Inkscape::XML::Node *newImage = sp_repr_new("svg:image");
+            Inkscape::XML::Node *newImage = xml_doc->createElement("svg:image");
 
             for ( int i = 0; i < data->length; i++ ) {
                 b64out.put( data->data[i] );
@@ -1196,7 +1198,7 @@ sp_ui_drag_data_received(GtkWidget *widget,
 
             Inkscape::GC::release(newImage);
             sp_document_done( doc , SP_VERB_NONE, 
-                              /* TODO: annotate */ "interface.cpp:1203");
+                              _("Drop bitmap image"));
             break;
         }
     }