Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/main.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2006-11-10 17:46:18 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2006-11-10 17:46:18 (GMT)
commitc7dd360a76aa50e8d46e031eee9629af466e677c (patch)
treed8d6877ddfbc35090c1bbfbd57f62e4948a59bf7 /shell/main.c
parentef339ff14f07538586efd4135f5cc816109459f8 (diff)
Remove temp file created when evince is used by GTK+ in preview mode.
2006-11-10 Carlos Garcia Campos <carlosgc@gnome.org> * shell/ev-application.[ch]: (get_unlink_temp_file_from_args), (ev_application_open_uri_at_dest), (ev_application_open_uri): * shell/ev-window.[ch]: (ev_window_clear_temp_file), (ev_window_open_uri): * shell/main.c: (arguments_parse): Remove temp file created when evince is used by GTK+ in preview mode. Fixes bug #365282.
Diffstat (limited to 'shell/main.c')
-rw-r--r--shell/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/shell/main.c b/shell/main.c
index 56b6098..9edb1f5 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -47,6 +47,7 @@ static gchar *ev_page_label;
static gboolean preview_mode = FALSE;
static gboolean fullscren_mode = FALSE;
static gboolean presentation_mode = FALSE;
+static gboolean unlink_temp_file = FALSE;
static const char **file_arguments = NULL;
static const GOptionEntry goption_options[] =
@@ -55,6 +56,7 @@ static const GOptionEntry goption_options[] =
{ "fullscreen", 'f', 0, G_OPTION_ARG_NONE, &fullscren_mode, N_("Run evince in fullscreen mode"), NULL },
{ "presentation", 's', 0, G_OPTION_ARG_NONE, &presentation_mode, N_("Run evince in presentation mode"), NULL },
{ "preview", 'w', 0, G_OPTION_ARG_NONE, &preview_mode, N_("Run evince as a previewer"), NULL },
+ { "unlink-temp-file", 'u', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &unlink_temp_file, NULL, NULL },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &file_arguments, NULL, N_("[FILE...]") },
{ NULL }
};
@@ -121,6 +123,16 @@ arguments_parse (void)
g_hash_table_insert (args, g_strdup ("mode"), value);
+ if (mode == EV_WINDOW_MODE_PREVIEW && unlink_temp_file) {
+ value = g_new0 (GValue, 1);
+ g_value_init (value, G_TYPE_BOOLEAN);
+ g_value_set_boolean (value, unlink_temp_file);
+
+ g_hash_table_insert (args,
+ g_strdup ("unlink-temp-file"),
+ value);
+ }
+
return args;
}