Ticket #18914: default-kde4-xdg-menu-prefix.patch

File default-kde4-xdg-menu-prefix.patch, 1.3 KB (added by jeremy.laine@…, 15 years ago)

Patch to rename kdelib4's applications.menu

  • kded/CMakeLists.txt

    Patch borrowed from Debian's kde4libs package.
    a b  
    6969if (WIN32)
    7070install( FILES applications.menu  DESTINATION  ${SHARE_INSTALL_PREFIX}/xdg/menus )
    7171else (WIN32)
    72 install( FILES applications.menu  DESTINATION  ${SYSCONF_INSTALL_DIR}/xdg/menus )
     72install( FILES applications.menu  DESTINATION  ${SYSCONF_INSTALL_DIR}/xdg/menus RENAME kde4-applications.menu )
    7373endif (WIN32)
    7474install( FILES kdedmodule.desktop DESTINATION  ${SERVICETYPES_INSTALL_DIR} )
    7575install( FILES kded.upd           DESTINATION  ${DATA_INSTALL_DIR}/kconf_update )
  • kded/vfolder_menu.cpp

    a b  
    770770   QString result;
    771771
    772772   QString xdgMenuPrefix = QString::fromLocal8Bit(qgetenv("XDG_MENU_PREFIX"));
    773    if (!xdgMenuPrefix.isEmpty())
    774    {
     773   // enforce kde4 prefix unless XDG_MENU_PREFIX is set (LP: #297195)
     774   if (xdgMenuPrefix.isEmpty())
     775      xdgMenuPrefix = QString("kde4-");
     776
    775777      QFileInfo fileInfo(fileName);
    776778
    777779      QString fileNameOnly = fileInfo.fileName();
     
    781783      QString baseName = QDir::cleanPath(m_docInfo.baseDir +
    782784                                         fileInfo.path() + '/' + fileNameOnly);
    783785      result = KStandardDirs::locate("xdgconf-menu", baseName);
    784    }
    785786
    786787   if (result.isEmpty())
    787788   {