From: Carsten Haitzler Date: Thu, 12 May 2011 03:29:23 +0000 (+0000) Subject: as discussed on the mailing list - e providexs enlightenment.menu now. X-Git-Tag: submit/efl/20131021.015651~6095 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49bbbf6066c1a35fd29ee2be0d422f0861e4fcef;p=platform%2Fupstream%2Fenlightenment.git as discussed on the mailing list - e providexs enlightenment.menu now. no one actually did this, so i did it finally. SVN revision: 59337 --- diff --git a/configure.ac b/configure.ac index fe74a12..e86b7d7 100644 --- a/configure.ac +++ b/configure.ac @@ -278,6 +278,14 @@ AC_ARG_ENABLE([install-sysactions], AC_MSG_RESULT([$e_cv_enable_install_sysactions]) AM_CONDITIONAL(INSTALL_SYSACTIONS, test x${e_cv_enable_install_sysactions} = xyes) +AC_MSG_CHECKING([whether to install enlightenment.menu]) +AC_ARG_ENABLE([install-enlightenment-menu], + AS_HELP_STRING([--disable-enlightenment-menu],[disable installing /etc/xdg/menus/enlightenment.menu @<:@default=enabled@:>@]), + [e_cv_enable_install_enlightenment_menu=$enableval], + AC_CACHE_VAL([e_cv_enable_install_enlightenment_menu], [e_cv_enable_install_enlightenment_menu=yes])) +AC_MSG_RESULT([$e_cv_enable_install_enlightenment_menu]) +AM_CONDITIONAL(INSTALL_ENLIGHTENMENT_MENU, test x${e_cv_enable_install_enlightenment_menu} = xyes) + AC_MSG_CHECKING([whether to enable Files menu item]) AC_ARG_ENABLE([files], AS_HELP_STRING([--disable-files],[disable Files menu item @<:@default=enabled@:>@]), diff --git a/data/etc/Makefile.am b/data/etc/Makefile.am index febaff4..2c50f01 100644 --- a/data/etc/Makefile.am +++ b/data/etc/Makefile.am @@ -6,4 +6,11 @@ if INSTALL_SYSACTIONS files_DATA += sysactions.conf endif -EXTRA_DIST = $(files_DATA) +menusdir = $(sysconfdir)/xdg/menus +menus_DATA = + +if INSTALL_ENLIGHTENMENT_MENU +menus_DATA += enlightenment.menu +endif + +EXTRA_DIST = $(files_DATA) $(menus_DATA) diff --git a/data/etc/enlightenment.menu b/data/etc/enlightenment.menu new file mode 100644 index 0000000..e85b6e7 --- /dev/null +++ b/data/etc/enlightenment.menu @@ -0,0 +1,295 @@ + + + + + Applications + Applications.directory + + + /etc/X11/applnk + /usr/share/gnome/apps + + + + + + + + + + + + Accessories + Utility.directory + + + Utility + + Accessibility + System + + + + + + + Universal Access + Utility-Accessibility.directory + + + Accessibility + Settings + + + + + + + Development + Development.directory + + + Development + X-KDE-KDevelopIDE + Translation + WebDevelopment + + emacs.desktop + + + + + + Education + Education.directory + + + Education + X-KDE-Edu-Language + Science + + + + + + + Science + GnomeScience.directory + + + Education + Science + Astronomy + Biology + Chemistry + Geology + MedicalSoftware + Physics + Math + + + + + + + Games + Game.directory + + + Game + Amusement + ActionGame + AdventureGame + ArcadeGame + BoardGame + BlocksGame + CardGame + KidsGame + LogicGame + RolePlaying + Simulation + SportsGame + StrategyGame + X-KDE-KidsGame + + + + + + + + Action + ActionGames.directory + + ActionGame + + + + Adventure + AdventureGames.directory + + AdventureGame + + + + Arcade + ArcadeGames.directory + + ArcadeGame + + + + Board + BoardGames.directory + + BoardGame + + + + Blocks + BlocksGames.directory + + BlocksGame + + + + Cards + CardGames.directory + + CardGame + + + + Kids + KidsGames.directory + + KidsGame + X-KDE-KidsGame + + + + Logic + LogicGames.directory + + LogicGame + + + + Role Playing + RolePlayingGames.directory + + RolePlaying + + + + Simulation + SimulationGames.directory + + Simulation + + + + Sports + SportsGames.directory + + SportsGame + + + + Strategy + StrategyGames.directory + + StrategyGame + + + + + + + Graphics + Graphics.directory + + + Graphics + + + + + + + Internet + Network.directory + + + Network + + + + + + + Multimedia + AudioVideo.directory + + + AudioVideo + + + + + + + Office + Office.directory + + + Office + + + + + + + System + System-Tools.directory + + + System + Settings + Game + + + + + + + Other + Other.directory + + + + Core + Settings + Screensaver + + + + + + + Debian + debian-menu.menu + Debian.directory + + + + + + + + + diff --git a/src/modules/conf_menus/e_int_config_menus.c b/src/modules/conf_menus/e_int_config_menus.c index d5d3fa8..fe2ceb2 100644 --- a/src/modules/conf_menus/e_int_config_menus.c +++ b/src/modules/conf_menus/e_int_config_menus.c @@ -154,7 +154,7 @@ _create_menus_list(Evas *evas, E_Config_Dialog_Data *cfdata) EINA_LIST_FREE(menus, file) { - char buf[PATH_MAX], *p, *p2, *tlabel, *tdesc; + char buf[PATH_MAX], buf2[PATH_MAX], *p, *p2, *tlabel, *tdesc; const char *label; label = file; @@ -162,11 +162,21 @@ _create_menus_list(Evas *evas, E_Config_Dialog_Data *cfdata) tdesc = NULL; e_user_homedir_concat(buf, sizeof(buf), ".config/menus/applications.menu"); + snprintf(buf2, sizeof(buf2), "%s/etc/xdg/enlightenment.menu", + e_prefix_get()); if (!strcmp("/etc/xdg/menus/applications.menu", file)) { label = _("System Default"); if (!cfdata->default_system_menu) sel = i; } + else if (!strcmp(buf2, file)) + { + label = _("Enlightenment Default"); + if (cfdata->default_system_menu) + { + if (!strcmp(cfdata->default_system_menu, file)) sel = i; + } + } else if (!strcmp(buf, file)) { label = _("Personal Default"); diff --git a/src/modules/wizard/page_030.c b/src/modules/wizard/page_030.c index f8d9420..4e3a97f 100644 --- a/src/modules/wizard/page_030.c +++ b/src/modules/wizard/page_030.c @@ -113,7 +113,7 @@ wizard_page_show(E_Wizard_Page *pg) EINA_LIST_FREE(menus, file) { - char buf[PATH_MAX], *p, *p2, *tlabel, *tdesc; + char buf[PATH_MAX], buf2[PATH_MAX], *p, *p2, *tlabel, *tdesc; const char *label; label = file; @@ -121,11 +121,18 @@ wizard_page_show(E_Wizard_Page *pg) tdesc = NULL; e_user_homedir_concat(buf, sizeof(buf), ".config/menus/applications.menu"); + snprintf(buf2, sizeof(buf2), "%s/etc/xdg/enlightenment.menu", + e_prefix_get()); if (!strcmp("/etc/xdg/menus/applications.menu", file)) { label = _("System Default"); sel = i; } + else if (!strcmp(buf2, file)) + { + label = _("Enlightenment Default"); + sel = i; + } else if (!strcmp(buf, file)) { label = _("Personal Default");