When I run dia and select New diagram, dia generated

** WARNING **: Can't find menu entry 'Edit/Copy'!
This is probably a i18n problem (try LANG=C).

and similar messages appeared at several times.

The folloing patch seems to solve this problems in gnome dia version.

--- diagram.c.orig      Thu Mar 23 17:54:19 2000
+++ diagram.c   Thu Mar 23 18:08:33 2000
@@ -131,7 +131,14 @@
   if (initialized==0) {
 #   ifdef GNOME
     if (ddisplay_active () == NULL) return;
-#   endif
+    path = g_string_new (NULL);
+    g_string_sprintf (path, "<Display>/%s%s", L_("_Edit/"), L_("_Copy"));
+    copy = menus_get_item_from_path(path->str);
+    g_string_sprintf (path, "<Display>/%s%s", L_("_Edit/"), L_("C_ut"));
+    cut = menus_get_item_from_path(path->str);
+    g_string_sprintf (path, "<Display>/%s%s", L_("_Edit/"), L_("_Paste"));
+    paste = menus_get_item_from_path(path->str);
+#else
     path = g_string_new ("<Display>");
     g_string_append (path,_("/Edit/Copy"));
     copy = menus_get_item_from_path(path->str);
@@ -139,6 +146,7 @@
     cut = menus_get_item_from_path(path->str);
     g_string_append (g_string_assign(path, display),_("/Edit/Paste"));
     paste = menus_get_item_from_path(path->str);
+#   endif
 #   ifndef GNOME
     g_string_append (g_string_assign(path, display),_("/Edit/Delete"));
     delete = menus_get_item_from_path(path->str);
--- display.c.orig      Thu Mar 23 18:22:04 2000
+++ display.c   Thu Mar 23 18:32:17 2000
@@ -847,6 +847,16 @@
   char *display = "<Display>";
 
   if (initialized==0) {
+#ifdef GNOME
+    path = g_string_new (NULL);
+    g_string_sprintf (path, "%s/%s%s", display, L_("_View/"), _("Show _Rulers"));
+    rulers       = menus_get_item_from_path(path->str);
+    g_string_sprintf (path, "%s/%s%s", display, L_("_View/"), _("_Visible Grid"));
+    visible_grid = menus_get_item_from_path(path->str);
+    g_string_sprintf (path, "%s/%s%s", display, L_("_View/"), _("_Snap To Grid"));
+    snap_to_grid = menus_get_item_from_path(path->str);
+    g_string_sprintf (path, "%s/%s%s", display, L_("_View/"), _("Show _Connection 
+Points"));
+#else
     path = g_string_new (display);
     g_string_append (path,_("/View/Show Rulers"));
     rulers       = menus_get_item_from_path(path->str);
@@ -855,6 +865,8 @@
     g_string_append (g_string_assign(path, display),_("/View/Snap To Grid"));
     snap_to_grid = menus_get_item_from_path(path->str);
     g_string_append (g_string_assign(path, display),_("/View/Show Connection 
Points"));
+#endif
+    
     show_cx_pts  = menus_get_item_from_path(path->str);
 
     g_string_free (path,FALSE);

Reply via email to