[epiphany] Expect only the desktop file basename to be passed on command line
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Expect only the desktop file basename to be passed on command line
- Date: Mon, 20 Jun 2016 17:15:09 +0000 (UTC)
commit 561d2df7cae5b59d8f2a3ee59c565d878745ac07
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Jun 20 11:31:58 2016 -0500
Expect only the desktop file basename to be passed on command line
Instead of passing the path of the desktop file to application mode,
let's just require passing the desktop file basename
("fedora-developer-portal.desktop") and let Gio look it up in the
standard desktop file locations.
https://bugzilla.gnome.org/show_bug.cgi?id=767101
src/ephy-main.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 7e9ab88..b19bdc0 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -54,7 +54,7 @@ static char *application_to_delete = NULL;
static gboolean private_instance = FALSE;
static gboolean incognito_mode = FALSE;
static gboolean application_mode = FALSE;
-static char *desktop_file_path = NULL;
+static char *desktop_file_basename = NULL;
static char *profile_directory = NULL;
static gboolean
@@ -64,7 +64,7 @@ application_mode_cb (const gchar *option_name,
GError **error)
{
application_mode = TRUE;
- desktop_file_path = g_strdup (value);
+ desktop_file_basename = g_strdup (value);
return TRUE;
}
@@ -359,8 +359,8 @@ main (int argc,
}
if (application_mode && !profile_directory) {
- if (desktop_file_path) {
- desktop_info = g_desktop_app_info_new_from_filename (desktop_file_path);
+ if (desktop_file_basename) {
+ desktop_info = g_desktop_app_info_new (desktop_file_basename);
if (desktop_info)
profile_directory = ephy_web_application_ensure_for_app_info (G_APP_INFO (desktop_info));
@@ -495,8 +495,9 @@ main (int argc,
status = g_application_run (G_APPLICATION (ephy_shell), argc, argv);
/* Shutdown */
+ /* FIXME: should free this stuff even when exiting early */
g_object_unref (ephy_shell);
- g_free (desktop_file_path);
+ g_free (desktop_file_basename);
g_free (profile_directory);
if (notify_is_initted ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]