aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-01-28 06:51:00 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-01-28 06:51:00 +0800
commit3bc16533b5ca7ecf33700a590e9840c8cce7186d (patch)
tree21a88dd0d2dd6dff6b0c85da4afb3e8d922230a7
parentdeaa622ca7b7801fb5077848b578a2350181f326 (diff)
downloadgsoc2013-evolution-3bc16533b5ca7ecf33700a590e9840c8cce7186d.tar
gsoc2013-evolution-3bc16533b5ca7ecf33700a590e9840c8cce7186d.tar.gz
gsoc2013-evolution-3bc16533b5ca7ecf33700a590e9840c8cce7186d.tar.bz2
gsoc2013-evolution-3bc16533b5ca7ecf33700a590e9840c8cce7186d.tar.lz
gsoc2013-evolution-3bc16533b5ca7ecf33700a590e9840c8cce7186d.tar.xz
gsoc2013-evolution-3bc16533b5ca7ecf33700a590e9840c8cce7186d.tar.zst
gsoc2013-evolution-3bc16533b5ca7ecf33700a590e9840c8cce7186d.zip
Removed unneeded debug printfs.
2004-01-27 Jeffrey Stedfast <fejj@ximian.com> * em-migrate.c (cp): Removed unneeded debug printfs. * em-folder-tree.c (tree_drag_data_received): Use gtk_tree_view_get_dest_row_at_pos() instead of gtk_tree_view_get_path_at_pos() since this is what Nautilus uses. Unfortunately, it still gives us back the wrong GtkTreePath so it looks to me like Gtk+ is borked. Apparently you need the latest and greatest gtk+-2.3.x cvs snapshot for this to work. svn path=/trunk/; revision=24482
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/em-folder-tree.c5
-rw-r--r--mail/em-migrate.c15
3 files changed, 10 insertions, 15 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 78687b5004..b421fc65fe 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,10 +1,13 @@
2004-01-27 Jeffrey Stedfast <fejj@ximian.com>
+ * em-migrate.c (cp): Removed unneeded debug printfs.
+
* em-folder-tree.c (tree_drag_data_received): Use
gtk_tree_view_get_dest_row_at_pos() instead of
gtk_tree_view_get_path_at_pos() since this is what Nautilus
uses. Unfortunately, it still gives us back the wrong GtkTreePath
- so it looks to me like Gtk+ is borked.
+ so it looks to me like Gtk+ is borked. Apparently you need the
+ latest and greatest gtk+-2.3.x cvs snapshot for this to work.
* em-migrate.c (em_migrate_imap_caches_1_4): Copy the imap cache
into the right place. Duh.
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 43012b3453..52d9764381 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -635,14 +635,13 @@ static gboolean
tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guint time, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
- GtkTreeViewColumn *column;
- int cell_x, cell_y;
+ GtkTreeViewDropPosition pos;
GtkTreePath *path;
GdkDragAction action;
printf ("::drag-motion called\n");
- if (!gtk_tree_view_get_path_at_pos (priv->treeview, x, y, &path, &column, &cell_x, &cell_y))
+ if (!gtk_tree_view_get_dest_row_at_pos (priv->treeview, x, y, &path, &pos))
return FALSE;
/* FIXME: highlight target row? */
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index 94031a5a94..8096e2ef99 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -1242,7 +1242,7 @@ get_local_store_uri (const char *dirname, const char *metadata, char **namep, in
static int
cp (const char *src, const char *dest, gboolean show_progress)
{
- unsigned char readbuf[4096];
+ unsigned char readbuf[65536];
ssize_t nread, nwritten;
int errnosav, readfd, writefd;
size_t total = 0;
@@ -1251,23 +1251,16 @@ cp (const char *src, const char *dest, gboolean show_progress)
/* if the dest file exists and has content, abort - we don't
* want to corrupt their existing data */
- if (stat (dest, &st) == 0 && st.st_size > 0) {
- printf ("destination exists, not copying '%s' to '%s'\n", src, dest);
+ if (stat (dest, &st) == 0 && st.st_size > 0)
return -1;
- }
- if (stat (src, &st) == -1) {
- printf ("source doesn't exist '%s'\n", src);
+ if (stat (src, &st) == -1)
return -1;
- }
- if ((readfd = open (src, O_RDONLY)) == -1) {
- printf ("source cannot be opened '%s'\n", src);
+ if ((readfd = open (src, O_RDONLY)) == -1)
return -1;
- }
if ((writefd = open (dest, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
- printf ("cannot open dest '%s' '%s'\n", dest, strerror(errno));
errnosav = errno;
close (readfd);
errno = errnosav;