-/**
- * get_unlink_temp_file_from_args:
- * @args: a #GHashTable with data passed to the application.
- *
- * It does look if the unlink-temp-file option has been passed from the command
- * line returning it's boolean representation, otherwise it does return %FALSE.
- *
- * Returns: the boolean representation of the unlink-temp-file value or %FALSE
- * in other case.
- */
-static gboolean
-get_unlink_temp_file_from_args (GHashTable *args)
-{
- gboolean unlink_temp_file = FALSE;
- GValue *value = NULL;
+static void
+value_free (GValue *value)
+{
+ g_value_unset (value);
+ g_free (value);
+}
+
+static GHashTable *
+build_args (GdkScreen *screen,
+ EvLinkDest *dest,
+ EvWindowRunMode mode,
+ const gchar *search_string)
+{
+ GHashTable *args;
+ GValue *value;
+ GdkDisplay *display;
+ const gchar *display_name;
+ gint screen_number;
+
+ args = g_hash_table_new_full (g_str_hash,
+ g_str_equal,
+ (GDestroyNotify)g_free,
+ (GDestroyNotify)value_free);
+
+ /* Display */
+ display = gdk_screen_get_display (screen);
+ display_name = gdk_display_get_name (display);
+ value = g_new0 (GValue, 1);
+ g_value_init (value, G_TYPE_STRING);
+ g_value_set_string (value, display_name);
+ g_hash_table_insert (args, g_strdup ("display"), value);
+
+ /* Screen */
+ screen_number = gdk_screen_get_number (screen);
+ value = g_new0 (GValue, 1);
+ g_value_init (value, G_TYPE_INT);
+ g_value_set_int (value, screen_number);
+ g_hash_table_insert (args, g_strdup ("screen"), value);
+
+ /* Page label */
+ if (dest) {
+ value = g_new0 (GValue, 1);
+ g_value_init (value, G_TYPE_STRING);
+ g_value_set_string (value, ev_link_dest_get_page_label (dest));
+
+ g_hash_table_insert (args, g_strdup ("page-label"), value);
+ }