Code

Removed use of union in paint type/struct
[inkscape.git] / src / verbs.cpp
index 91adfc7d08a6ccc65a0543bbb643742a858ceb35..172b5220c321fd070d76a2827129e26e04ede083 100644 (file)
@@ -129,12 +129,13 @@ static void show_panel( Inkscape::UI::Widget::Panel &panel, char const *prefs_pa
         Gtk::VBox *mainVBox = dia->get_vbox();
         mainVBox->pack_start(panel);
         dia->show_all_children();
-        dia->present();
         dia->read_geometry();
+        dia->present();
     } else {
-        Gtk::Dialog *dia = dynamic_cast<Gtk::Dialog*>(container);
+        PanelDialog *dia = dynamic_cast<PanelDialog*>(container);
         if ( dia ) {
             //g_message("Found an existing dialog");
+            dia->read_geometry();
             dia->present();
         } else {
             g_message("Failed to find an existing dialog");
@@ -1551,6 +1552,7 @@ ZoomVerb::perform(SPAction *action, void *data, void *pdata)
             break;
         case SP_VERB_TOGGLE_GRID:
             sp_namedview_toggle_grid(doc, repr);
+            dt->toggleGrid();
             break;
 #ifdef HAVE_GTK_WINDOW_FULLSCREEN
         case SP_VERB_FULLSCREEN:
@@ -1984,7 +1986,7 @@ public:
                    gchar const *image) :
         Verb(code, id, name, tip, image)
     {
-        set_default_sensitive(false);
+        set_default_sensitive(true);
     }
 }; /* LockAndHideVerb class */
 
@@ -2013,19 +2015,25 @@ LockAndHideVerb::perform(SPAction *action, void *data, void *pdata)
 {
     SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
     if (!dt) return;
+    SPDocument *doc = sp_desktop_document(dt);
+    if (!doc) return;
     
     switch ((long) data) {
         case SP_VERB_UNLOCK_ALL:
             unlock_all(dt);
+            sp_document_done(doc, SP_VERB_UNLOCK_ALL, _("Unlock all objects in the current layer"));
             break;
         case SP_VERB_UNLOCK_ALL_IN_ALL_LAYERS:
             unlock_all_in_all_layers(dt);
+            sp_document_done(doc, SP_VERB_UNLOCK_ALL_IN_ALL_LAYERS, _("Unlock all objects in all layers"));
             break;
         case SP_VERB_UNHIDE_ALL:
             unhide_all(dt);
+            sp_document_done(doc, SP_VERB_UNHIDE_ALL, _("Unhide all objects in the current layer"));
             break;
         case SP_VERB_UNHIDE_ALL_IN_ALL_LAYERS:
             unhide_all_in_all_layers(dt);
+            sp_document_done(doc, SP_VERB_UNHIDE_ALL_IN_ALL_LAYERS, _("Unhide all objects in all layers"));
             break;
         default:
             return;
@@ -2246,9 +2254,13 @@ Verb *Verb::_base_verbs[] = {
 
     /* Object */
     new ObjectVerb(SP_VERB_OBJECT_ROTATE_90_CW, "ObjectRotate90", N_("Rotate _90&#176; CW"),
-                   N_("Rotate selection 90&#176; clockwise"), "object_rotate_90_CW"),
+                   // This is shared between tooltips and statusbar, so they
+                   // must use UTF-8, not HTML entities for special characters.
+                   N_("Rotate selection 90\xc2\xb0 clockwise"), "object_rotate_90_CW"),
     new ObjectVerb(SP_VERB_OBJECT_ROTATE_90_CCW, "ObjectRotate90CCW", N_("Rotate 9_0&#176; CCW"),
-                   N_("Rotate selection 90&#176; counter-clockwise"), "object_rotate_90_CCW"),
+                   // This is shared between tooltips and statusbar, so they
+                   // must use UTF-8, not HTML entities for special characters.
+                   N_("Rotate selection 90\xc2\xb0 counter-clockwise"), "object_rotate_90_CCW"),
     new ObjectVerb(SP_VERB_OBJECT_FLATTEN, "ObjectRemoveTransform", N_("Remove _Transformations"),
                    N_("Remove transformations from object"), "object_reset"),
     new ObjectVerb(SP_VERB_OBJECT_TO_CURVE, "ObjectToPath", N_("_Object to Path"),