]> www.fi.muni.cz Git - evince.git/blobdiff - libdocument/ev-attachment.c
[dualscreen] fix crash on ctrl+w and fix control window closing
[evince.git] / libdocument / ev-attachment.c
index c4dd38d7addb4937a074ec070d96034e3838864f..9f9f4fed534f4cbe04c65fbf9a4fec077fe4cd2e 100644 (file)
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #include <config.h>
@@ -293,7 +293,7 @@ ev_attachment_save (EvAttachment *attachment,
        g_return_val_if_fail (EV_IS_ATTACHMENT (attachment), FALSE);
        g_return_val_if_fail (G_IS_FILE (file), FALSE);
 
-       output_stream = g_file_create (file, 0, NULL, &ioerror);
+       output_stream = g_file_replace (file, NULL, FALSE, 0, NULL, &ioerror);
        if (output_stream == NULL) {
                char *uri;
                
@@ -354,12 +354,11 @@ ev_attachment_launch_app (EvAttachment *attachment,
        g_assert (G_IS_APP_INFO (attachment->priv->app));
 
        files = g_list_prepend (files, attachment->priv->tmp_file);
-       
-#if GTK_CHECK_VERSION (2, 14, 0)
+
        context = G_APP_LAUNCH_CONTEXT (gdk_app_launch_context_new ());
        gdk_app_launch_context_set_screen (GDK_APP_LAUNCH_CONTEXT (context), screen);
        gdk_app_launch_context_set_timestamp (GDK_APP_LAUNCH_CONTEXT (context), timestamp);
-#endif
+
        result = g_app_info_launch (attachment->priv->app, files,
                                    context, &ioerror);
        
@@ -397,7 +396,7 @@ ev_attachment_open (EvAttachment *attachment,
        g_return_val_if_fail (EV_IS_ATTACHMENT (attachment), FALSE);
        
        if (!attachment->priv->app) {
-               app_info = g_app_info_get_default_for_type (attachment->priv->mime_type, TRUE);
+               app_info = g_app_info_get_default_for_type (attachment->priv->mime_type, FALSE);
                attachment->priv->app = app_info;
        }