X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=cut-n-paste%2Fsmclient%2Feggsmclient-xsmp.c;h=d4cc9dcf5a7259b39e71caf9b06d8463f80e02c4;hb=2dd348d6fe62d96589c81379bbd01314d6442dc0;hp=e4b11f6288d64e84d3eeff238d343feabd866d19;hpb=edd999ae3841b9f4224ebb4dbd8ec4ce182ce0e7;p=evince.git diff --git a/cut-n-paste/smclient/eggsmclient-xsmp.c b/cut-n-paste/smclient/eggsmclient-xsmp.c index e4b11f62..d4cc9dcf 100644 --- a/cut-n-paste/smclient/eggsmclient-xsmp.c +++ b/cut-n-paste/smclient/eggsmclient-xsmp.c @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "config.h" @@ -795,10 +795,14 @@ save_state (EggSMClientXSMP *xsmp) if (desktop_file) { GKeyFile *merged_file; + char *desktop_file_path; merged_file = g_key_file_new (); - if (g_key_file_load_from_file (merged_file, - egg_desktop_file_get_source (desktop_file), + desktop_file_path = + g_filename_from_uri (egg_desktop_file_get_source (desktop_file), + NULL, NULL); + if (desktop_file_path && + g_key_file_load_from_file (merged_file, desktop_file_path, G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, NULL)) { @@ -841,8 +845,11 @@ save_state (EggSMClientXSMP *xsmp) EGG_DESKTOP_FILE_KEY_EXEC, exec); g_free (exec); - } + else + desktop_file = NULL; + + g_free (desktop_file_path); } /* Now write state_file to disk. (We can't use mktemp(), because