file-roller r2259 - in trunk: . po src
- From: paobac svn gnome org
- To: svn-commits-list gnome org
- Subject: file-roller r2259 - in trunk: . po src
- Date: Sat, 19 Apr 2008 16:37:32 +0100 (BST)
Author: paobac
Date: Sat Apr 19 15:37:32 2008
New Revision: 2259
URL: http://svn.gnome.org/viewvc/file-roller?rev=2259&view=rev
Log:
2008-04-19 Paolo Bacchilega <paobac svn gnome org>
* src/fr-archive.c (get_mime_type_from_sniffer): use GIO to read the
file.
* src/dlg-extract.c:
* src/bookmarks.c:
* src/bookmarks.h:
* src/Makefile.am:
removed bookmarks.[ch]
Removed:
trunk/src/bookmarks.c
trunk/src/bookmarks.h
Modified:
trunk/ChangeLog
trunk/po/ChangeLog
trunk/po/POTFILES.in
trunk/src/Makefile.am
trunk/src/dlg-extract.c
trunk/src/fr-archive.c
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Sat Apr 19 15:37:32 2008
@@ -14,8 +14,6 @@
nautilus/nautilus-fileroller.h
nautilus/nautilus-fileroller.c
src/actions.c
-src/bookmarks.c
-src/bookmarks.h
src/dlg-add-files.c
src/dlg-add-files.h
src/dlg-add-folder.c
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Sat Apr 19 15:37:32 2008
@@ -37,8 +37,6 @@
file_roller_SOURCES = \
actions.h \
actions.c \
- bookmarks.c \
- bookmarks.h \
dlg-add-files.c \
dlg-add-files.h \
dlg-add-folder.c \
Modified: trunk/src/dlg-extract.c
==============================================================================
--- trunk/src/dlg-extract.c (original)
+++ trunk/src/dlg-extract.c Sat Apr 19 15:37:32 2008
@@ -26,7 +26,6 @@
#include <glade/glade.h>
-#include "bookmarks.h"
#include "file-utils.h"
#include "fr-stock.h"
#include "main.h"
Modified: trunk/src/fr-archive.c
==============================================================================
--- trunk/src/fr-archive.c (original)
+++ trunk/src/fr-archive.c Sat Apr 19 15:37:32 2008
@@ -622,10 +622,10 @@
*/
{ NULL, NULL, 0 }
};
- char *filename;
- FILE *f;
- char buffer[5];
- int n, i;
+ char *filename;
+ GFileInputStream *stream;
+ char buffer[5];
+ int n, i;
if (! g_file_has_uri_scheme (file, "file"))
return NULL;
@@ -635,15 +635,18 @@
g_free (filename);
return NULL;
}
-
- f = fopen (filename, "rb");
g_free (filename);
+
+ stream = g_file_read (file, NULL , NULL);
+ if (stream == NULL)
+ return NULL;
- if (f == NULL)
+ n = g_input_stream_read (G_INPUT_STREAM (stream), buffer, sizeof (buffer) - 1, NULL, NULL);
+ g_object_unref (stream);
+
+ if (n == -1)
return NULL;
-
- n = fread (buffer, sizeof (char), sizeof (buffer) - 1, f);
- fclose (f);
+
buffer[n] = 0;
for (i = 0; sniffer_data[i].mime_type != NULL; i++) {
const char *first_bytes = sniffer_data[i].first_bytes;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]