From d6c7397c3d867ebbeccc09880935107f6016583b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 7 Sep 2012 07:44:20 +0000 Subject: [PATCH] fix all e17 .desktop files to not break spec, rename profile icons to be unique, make wizard and profile config load new icons, also clean up some small leaks in wizard SVN revision: 76284 --- config/default/Makefile.am | 4 +-- .../{icon.png => enlightenment-default.png} | Bin config/default/profile.desktop | 2 +- config/mobile/Makefile.am | 4 +-- .../{icon.png => enlightenment-mobile.png} | Bin config/mobile/profile.desktop | 2 +- config/standard/Makefile.am | 4 +-- .../{icon.png => enlightenment-standard.png} | Bin config/standard/profile.desktop | 2 +- .../desktop/enlightenment_filemanager.desktop | 7 ++---- data/favorites/desktop.desktop | 1 - data/favorites/home.desktop | 1 - data/favorites/root.desktop | 1 - data/favorites/tmp.desktop | 1 - data/xsession/enlightenment.desktop.in | 3 +-- .../conf_dialogs/e_int_config_profiles.c | 10 +++++--- src/modules/wizard/data/desktop/home.desktop | 1 - src/modules/wizard/data/desktop/root.desktop | 1 - src/modules/wizard/data/desktop/tmp.desktop | 1 - .../data/extra_desktops/mplayer.desktop | 5 ++-- .../wizard/data/extra_desktops/xterm.desktop | 5 ++-- src/modules/wizard/page_020.c | 23 +++++++----------- 22 files changed, 32 insertions(+), 46 deletions(-) rename config/default/{icon.png => enlightenment-default.png} (100%) rename config/mobile/{icon.png => enlightenment-mobile.png} (100%) rename config/standard/{icon.png => enlightenment-standard.png} (100%) diff --git a/config/default/Makefile.am b/config/default/Makefile.am index 9b33a6fed..b7ffb75e2 100644 --- a/config/default/Makefile.am +++ b/config/default/Makefile.am @@ -4,13 +4,13 @@ EET_EET = @eet_eet@ EXTRA_DIST = \ profile.desktop \ - icon.png \ + enlightenment-default.png \ e.src filesdir = $(datadir)/enlightenment/data/config/default files_DATA = \ profile.desktop \ - icon.png \ + enlightenment-default.png \ e.cfg SUFFIXES = .cfg diff --git a/config/default/icon.png b/config/default/enlightenment-default.png similarity index 100% rename from config/default/icon.png rename to config/default/enlightenment-default.png diff --git a/config/default/profile.desktop b/config/default/profile.desktop index 529d86ac4..6a7063b6a 100644 --- a/config/default/profile.desktop +++ b/config/default/profile.desktop @@ -12,7 +12,7 @@ Name[zh_CN]=默认 Name[pt]=Predefinições Name[tr]=Öntanımlı Name[ko]=기본 -Icon=icon.png +Icon=enlightenment-default Comment=Select this to begin the initial setup again. Comment[ru]=Выберите это для
запуска инициализации настроек (сброс). Comment[cs]=Vyberte pro znovuspuštění
tohoto průvodce. diff --git a/config/mobile/Makefile.am b/config/mobile/Makefile.am index 080624155..b7d0ec4d6 100644 --- a/config/mobile/Makefile.am +++ b/config/mobile/Makefile.am @@ -4,7 +4,7 @@ EET_EET = @eet_eet@ EXTRA_DIST = \ profile.desktop \ - icon.png \ + enlightenment-mobile.png \ e.src \ module.battery.src \ module.illume-home.src \ @@ -17,7 +17,7 @@ EXTRA_DIST = \ filesdir = $(datadir)/enlightenment/data/config/mobile files_DATA = \ profile.desktop \ - icon.png \ + enlightenment-mobile.png \ e.cfg \ module.battery.cfg \ module.illume-home.cfg \ diff --git a/config/mobile/icon.png b/config/mobile/enlightenment-mobile.png similarity index 100% rename from config/mobile/icon.png rename to config/mobile/enlightenment-mobile.png diff --git a/config/mobile/profile.desktop b/config/mobile/profile.desktop index cb9d3cb36..a51e6fa17 100644 --- a/config/mobile/profile.desktop +++ b/config/mobile/profile.desktop @@ -4,7 +4,7 @@ Name=Mobile Name[fr]=Écran tactile Name[pt]=Ecrã tátil Name[ko]=터치스크린 -Icon=icon.png +Icon=enlightenment-mobile Comment=EXPERIMENTAL!
Configuration set up to work best with touchscreen
phones, tablets and similar devices. Comment[fr]=EXPÉRIMENTAL !
Configuration adaptée aux écrans tactiles
des téléphones, tablettes et apparentés. Comment[it]=SPERIMENTALE!
Configurazione adatta per l'uso in smartphone
con interfaccia tattile, tablets e similari. diff --git a/config/standard/Makefile.am b/config/standard/Makefile.am index 7873e3e4a..0ff93801a 100644 --- a/config/standard/Makefile.am +++ b/config/standard/Makefile.am @@ -4,7 +4,7 @@ EET_EET = @eet_eet@ EXTRA_DIST = \ profile.desktop \ - icon.png \ + enlightenment-standard.png \ e.src \ module.battery.src \ module.cpufreq.src \ @@ -19,7 +19,7 @@ EXTRA_DIST = \ filesdir = $(datadir)/enlightenment/data/config/standard files_DATA = \ profile.desktop \ - icon.png \ + enlightenment-standard.png \ e.cfg \ module.battery.cfg \ module.cpufreq.cfg \ diff --git a/config/standard/icon.png b/config/standard/enlightenment-standard.png similarity index 100% rename from config/standard/icon.png rename to config/standard/enlightenment-standard.png diff --git a/config/standard/profile.desktop b/config/standard/profile.desktop index f2012fdbc..9889520bc 100644 --- a/config/standard/profile.desktop +++ b/config/standard/profile.desktop @@ -5,7 +5,7 @@ Name[fr]=Ordinateur (Enlightenment standard) Name[it]=Computer (Enlightenment standard) Name[pt]=Computador (Enlightenment padrão) Name[ko]=컴퓨터 (표준 Enlightenment) -Icon=icon.png +Icon=enlightenment-standard Comment=Configuration for devices with keyboards and mice
like your average PC Desktop, Laptop or Netbook
with Enlightenment's traditional keyboard bindings
and mouse controls. Comment[fr]=Configuration pour les machines avec clavier et
souris comme les PC de bureau et les portables,
offrant raccourcis et contrôles traditionnels. Comment[it]=Configurazione per macchine con tastiera e mouse,
come i normali computer fissi e portatili,
con le tradizionali associazioni di tasti e controlli
del mouse. diff --git a/data/desktop/enlightenment_filemanager.desktop b/data/desktop/enlightenment_filemanager.desktop index 4edf3c315..dc968bdc0 100644 --- a/data/desktop/enlightenment_filemanager.desktop +++ b/data/desktop/enlightenment_filemanager.desktop @@ -1,19 +1,16 @@ [Desktop Entry] -Encoding=UTF-8 Type=Application Name=Enlightenment File Manager Name[it]=Filemanager di Enlightenment Name[pt]=Gestor de ficheiros do Enlightenment -Generic=File Manager -GenericName[pt]=Gestor de ficheiros Comment=File Manager provided by Enlightenment Comment[it]=Il filemanager fornito da Enlightenment Comment[pt]=Gestor de ficheiros para o Enlightenment Exec=enlightenment_filemanager %U Icon=system-file-manager -Categories=FileManager;Utility;Core;Enlightenment; +Categories=FileManager;Utility;Core;System;FileTools Terminal=false StartupNotify=false StartupWMClass=e_fm OnlyShowIn=Enlightenment; -MimeType=x-directory/normal;inode/directory; +MimeType=inode/directory; diff --git a/data/favorites/desktop.desktop b/data/favorites/desktop.desktop index 1e27ea366..4f1cb42d1 100644 --- a/data/favorites/desktop.desktop +++ b/data/favorites/desktop.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=Desktop Name[fr]=Bureau Name[pt]=Área de trabalho diff --git a/data/favorites/home.desktop b/data/favorites/home.desktop index 66a806aa9..a0e316eaa 100644 --- a/data/favorites/home.desktop +++ b/data/favorites/home.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=Home Name[pt]=Pasta pessoal Comment=The Directory containing all your personal files diff --git a/data/favorites/root.desktop b/data/favorites/root.desktop index 1803223ec..36d565a6d 100644 --- a/data/favorites/root.desktop +++ b/data/favorites/root.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=Root Comment=The Root Filesystem base Comment[it]=Il filesystem principale diff --git a/data/favorites/tmp.desktop b/data/favorites/tmp.desktop index 89bed085e..55892efc0 100644 --- a/data/favorites/tmp.desktop +++ b/data/favorites/tmp.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=Temp Name[pt]=Temporários Comment=Temporary files diff --git a/data/xsession/enlightenment.desktop.in b/data/xsession/enlightenment.desktop.in index 195af6300..31cbdcfe2 100644 --- a/data/xsession/enlightenment.desktop.in +++ b/data/xsession/enlightenment.desktop.in @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=Enlightenment Name[ru]=Enlightenment Name[el]=Enlightenment @@ -14,7 +13,7 @@ Comment[it]=Accedi con Enlightenment (Versione @VERSION@) Comment[pt]=Iniciar sessão no Enlightenment (Versão @VERSION@) Comment[tr]=Enlightenment kullanarak giriş yaın (Version @VERSION@) Comment[ko]=Enlightenment 로그인(버전 @VERSION@) -Type=XSession +Type=Application Icon=@prefix@/share/enlightenment/data/images/enlightenment.png Exec=@prefix@/bin/enlightenment_start TryExec=@prefix@/bin/enlightenment_start diff --git a/src/modules/conf_dialogs/e_int_config_profiles.c b/src/modules/conf_dialogs/e_int_config_profiles.c index 6fa4d2fc9..170c43070 100644 --- a/src/modules/conf_dialogs/e_int_config_profiles.c +++ b/src/modules/conf_dialogs/e_int_config_profiles.c @@ -198,7 +198,7 @@ _ilist_fill(E_Config_Dialog_Data *cfdata) if (!desk) { e_prefix_data_snprintf(buf, sizeof(buf), "data/config/%s/", prof); - pdir = strdup(buf); + pdir = strdupa(buf); if (pdir) { snprintf(buf, sizeof(buf), "%s/profile.desktop", pdir); @@ -211,12 +211,16 @@ _ilist_fill(E_Config_Dialog_Data *cfdata) if (pdir) snprintf(buf, sizeof(buf), "%s/icon.edj", pdir); if ((desk) && (desk->icon) && (pdir)) - snprintf(buf, sizeof(buf), "%s/%s", pdir, desk->icon); + { + if (eina_str_has_extension(desk->icon, "png")) + snprintf(buf, sizeof(buf), "%s/%s", pdir, desk->icon); + else + snprintf(buf, sizeof(buf), "%s/%s.png", pdir, desk->icon); + } else e_prefix_data_concat_static(buf, "data/images/enlightenment.png"); ic = e_util_icon_add(buf, evas); e_widget_ilist_append(cfdata->o_list, ic, label, _ilist_cb_selected, cfdata, prof); - if (pdir) free(pdir); free(prof); if (desk) efreet_desktop_free(desk); } diff --git a/src/modules/wizard/data/desktop/home.desktop b/src/modules/wizard/data/desktop/home.desktop index 6e6d177b0..fc8f88555 100644 --- a/src/modules/wizard/data/desktop/home.desktop +++ b/src/modules/wizard/data/desktop/home.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=Home Name[pt]=Pasta pessoal Comment=The Directory containing all your personal files diff --git a/src/modules/wizard/data/desktop/root.desktop b/src/modules/wizard/data/desktop/root.desktop index fe4703939..92a831556 100644 --- a/src/modules/wizard/data/desktop/root.desktop +++ b/src/modules/wizard/data/desktop/root.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=Root Comment=The Root Filesystem base Comment[it]=Il filesystem principale diff --git a/src/modules/wizard/data/desktop/tmp.desktop b/src/modules/wizard/data/desktop/tmp.desktop index 89bed085e..55892efc0 100644 --- a/src/modules/wizard/data/desktop/tmp.desktop +++ b/src/modules/wizard/data/desktop/tmp.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Name=Temp Name[pt]=Temporários Comment=Temporary files diff --git a/src/modules/wizard/data/extra_desktops/mplayer.desktop b/src/modules/wizard/data/extra_desktops/mplayer.desktop index 613b62050..21bd4772e 100644 --- a/src/modules/wizard/data/extra_desktops/mplayer.desktop +++ b/src/modules/wizard/data/extra_desktops/mplayer.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Type=Application Name=MPlayer GenericName=Movie Player @@ -8,7 +7,7 @@ Comment=Watch movies and videos Comment[it]=Per guardare filmati e video Comment[pt]=Ver filmes e ouvir músicas Exec=mplayer %U -Icon=video_player.png +Icon=video_player StartupWMClass=MPlayer -Categories=Application;AudioVideo;Player; +Categories=AudioVideo;Player; MimeType=application/mxf;application/ogg;application/ram;application/sdp;application/smil;application/smil+xml;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/x-extension-m4a;application/x-extension-mp4;application/x-flac;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktime-media-link;application/x-quicktimeplayer;application/x-shorten;application/x-smil;application/xspf+xml;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/midi;audio/mp4;audio/mpeg;audio/mpegurl;audio/ogg;audio/prs.sid;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-realaudio;audio/x-pn-realaudio-plugin;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-sbc;audio/x-scpls;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/google-video-pointer;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;video/x-totem-stream;x-content/video-dvd;x-content/video-vcd;x-content/video-svcd; diff --git a/src/modules/wizard/data/extra_desktops/xterm.desktop b/src/modules/wizard/data/extra_desktops/xterm.desktop index f4248f94b..b7720fab3 100644 --- a/src/modules/wizard/data/extra_desktops/xterm.desktop +++ b/src/modules/wizard/data/extra_desktops/xterm.desktop @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 Type=Application Name=XTerm GenericName=Terminal @@ -7,6 +6,6 @@ Comment=Run commands in a shell Comment[it]=Esegue comandi in una shell Comment[pt]=Execução de comandos na consola Exec=xterm -Icon=xterm.png +Icon=xterm StartupWMClass=XTerm -Categories=Utility;TerminalEmulator; +Categories=Utility;TerminalEmulator;System; diff --git a/src/modules/wizard/page_020.c b/src/modules/wizard/page_020.c index 505c81fec..42ee5eb4d 100644 --- a/src/modules/wizard/page_020.c +++ b/src/modules/wizard/page_020.c @@ -9,16 +9,11 @@ static void _profile_change(void *data __UNUSED__, Evas_Object *obj __UNUSED__) { char buf[PATH_MAX]; - const char *dir; + char *dir; Efreet_Desktop *desk = NULL; e_prefix_data_snprintf(buf, sizeof(buf), "data/config/%s", profile); - dir = strdup(buf); - if (!dir) - { - e_widget_textblock_markup_set(textblock, _("Unknown")); - return; - } + dir = strdupa(buf); snprintf(buf, sizeof(buf), "%s/profile.desktop", dir); desk = efreet_desktop_new(buf); if (desk) @@ -88,12 +83,7 @@ wizard_page_show(E_Wizard_Page *pg) free(prof); continue; } - dir = strdup(buf); - if (!dir) - { - free(prof); - continue; - } + dir = strdupa(buf); if (!strcmp(prof, "standard")) sel = i; snprintf(buf, sizeof(buf), "%s/profile.desktop", dir); desk = efreet_desktop_new(buf); @@ -101,7 +91,12 @@ wizard_page_show(E_Wizard_Page *pg) if ((desk) && (desk->name)) label = desk->name; snprintf(buf, sizeof(buf), "%s/icon.edj", dir); if ((desk) && (desk->icon)) - snprintf(buf, sizeof(buf), "%s/%s", dir, desk->icon); + { + if (eina_str_has_extension(desk->icon, "png")) + snprintf(buf, sizeof(buf), "%s/%s", dir, desk->icon); + else + snprintf(buf, sizeof(buf), "%s/%s.png", dir, desk->icon); + } else e_prefix_data_concat_static(buf, "data/images/enlightenment.png"); ic = e_util_icon_add(buf, pg->evas);