[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Fri Jun 4 20:21:15 CEST 2004


CVS commit by arwalker: 

Another FIXME... 77 to go.


  M +19 -8     ksttoplevelview.cpp   1.51


--- kdeextragear-2/kst/kst/ksttoplevelview.cpp  #1.50:1.51
@@ -605,16 +605,27 @@ bool KstTopLevelView::popupMenu(KPopupMe
   if (_selectionList.count() > 1) {
     if (_pressTarget && _mode == LayoutMode) {
-      // FIXME: make a submenu for alignment and resizing
+      KPopupMenu* pPopup;
+
       if (rc) {
         menu->insertSeparator();
       }
-      menu->insertItem(i18n("Make Same Width"), this, SLOT(makeSameWidth()));
-      menu->insertItem(i18n("Make Same Height"), this, SLOT(makeSameHeight()));
-      menu->insertItem(i18n("Make Same Size"), this, SLOT(makeSameSize()));
+
+      pPopup = new KPopupMenu(menu);
+      if (pPopup) {
+        pPopup->insertItem(i18n("Width"), this, SLOT(makeSameWidth()));
+        pPopup->insertItem(i18n("Height"), this, SLOT(makeSameHeight()));
+        pPopup->insertItem(i18n("Size"), this, SLOT(makeSameSize()));
+        menu->insertItem(i18n("Make Same"), pPopup);
+      }
+
+      pPopup = new KPopupMenu(menu);
+      if (pPopup) {
+        pPopup->insertItem(i18n("Left"), this, SLOT(alignLeft()));
+        pPopup->insertItem(i18n("Right"), this, SLOT(alignRight()));
+        pPopup->insertItem(i18n("Top"), this, SLOT(alignTop()));
+        pPopup->insertItem(i18n("Bottom"), this, SLOT(alignBottom()));
+        menu->insertItem(i18n("Align"), pPopup);
+      }
       menu->insertSeparator();
-      menu->insertItem(i18n("Align Left"), this, SLOT(alignLeft()));
-      menu->insertItem(i18n("Align Right"), this, SLOT(alignRight()));
-      menu->insertItem(i18n("Align Top"), this, SLOT(alignTop()));
-      menu->insertItem(i18n("Align Bottom"), this, SLOT(alignBottom()));
     }
     menu->insertItem(i18n("Group Objects"), this, SLOT(groupSelection()));





More information about the Kst mailing list