[Xfce4-commits] r24039 - in xarchiver/trunk: . doc src

Giuseppe Torelli colossus at xfce.org
Mon Dec 4 11:50:51 CET 2006


Author: colossus
Date: 2006-12-04 10:50:50 +0000 (Mon, 04 Dec 2006)
New Revision: 24039

Modified:
   xarchiver/trunk/ChangeLog
   xarchiver/trunk/doc/xarchiver.docbook
   xarchiver/trunk/src/callbacks.c
   xarchiver/trunk/src/main.c
   xarchiver/trunk/src/new_dialog.c
   xarchiver/trunk/src/new_dialog.h
Log:
Fixed bug #2626.
Fixed version number in doc/xarchiver.docbook.
Updated Changelog.


Modified: xarchiver/trunk/ChangeLog
===================================================================
--- xarchiver/trunk/ChangeLog	2006-12-03 19:02:14 UTC (rev 24038)
+++ xarchiver/trunk/ChangeLog	2006-12-04 10:50:50 UTC (rev 24039)
@@ -1,5 +1,9 @@
 Xarchiver changelog:
 
+xx/01/06 - 0.5:
+		- Fixed bug #2614, #2626..
+		- Made tabs reorderable if using gtk 2.10
+
 27/11/06 - 0.4.6:
 		- Fixed code in support.c to load the images when installing the software.
 		- Renamed png icons to make them freedesktop compliant.

Modified: xarchiver/trunk/doc/xarchiver.docbook
===================================================================
--- xarchiver/trunk/doc/xarchiver.docbook	2006-12-03 19:02:14 UTC (rev 24038)
+++ xarchiver/trunk/doc/xarchiver.docbook	2006-12-04 10:50:50 UTC (rev 24039)
@@ -3,7 +3,7 @@
         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
 <!ENTITY app "Xarchiver">
 <!ENTITY app_small "xarchiver">
-<!ENTITY appversion "0.4.4">
+<!ENTITY appversion "0.4.6">
 <!ENTITY appurl "http://xarchiver.xfce.org">
 <!ENTITY author_mail "colossus73 at gmail.com">
 <!ENTITY date "September 29, 2006">

Modified: xarchiver/trunk/src/callbacks.c
===================================================================
--- xarchiver/trunk/src/callbacks.c	2006-12-03 19:02:14 UTC (rev 24038)
+++ xarchiver/trunk/src/callbacks.c	2006-12-04 10:50:50 UTC (rev 24039)
@@ -237,7 +237,7 @@
 	if (current_page == -1)
 		return;
 
-	archive[current_page] = xa_new_archive_dialog ( NULL );
+	archive[current_page] = xa_new_archive_dialog ( NULL , archive );
 
 	if (archive[current_page]  == NULL)
 		return;
@@ -2240,7 +2240,7 @@
 		idx = xa_get_new_archive_idx();
 		if (idx == -1)
 			return;
-		archive[idx] = xa_new_archive_dialog ( filename );
+		archive[idx] = xa_new_archive_dialog ( filename , archive );
 		if (archive[idx] == NULL)
 			return;
 		xa_add_page (archive[idx]);

Modified: xarchiver/trunk/src/main.c
===================================================================
--- xarchiver/trunk/src/main.c	2006-12-03 19:02:14 UTC (rev 24038)
+++ xarchiver/trunk/src/main.c	2006-12-04 10:50:50 UTC (rev 24039)
@@ -153,7 +153,7 @@
 		else if (archive_name != NULL)
 		{
 			XArchive *archive_cmd = NULL;
-			archive_cmd = xa_new_archive_dialog (archive_name );
+			archive_cmd = xa_new_archive_dialog (archive_name, NULL );
 			if (archive_cmd == NULL)
 				return 0;
 

Modified: xarchiver/trunk/src/new_dialog.c
===================================================================
--- xarchiver/trunk/src/new_dialog.c	2006-12-03 19:02:14 UTC (rev 24038)
+++ xarchiver/trunk/src/new_dialog.c	2006-12-04 10:50:50 UTC (rev 24039)
@@ -26,11 +26,10 @@
 
 extern gboolean unrar;
 extern gboolean cli;
-
 gchar *current_new_directory = NULL;
 gint new_combo_box = -1;
 
-XArchive *xa_new_archive_dialog (gchar *path)
+XArchive *xa_new_archive_dialog (gchar *path, XArchive *archive_open[])
 {
 	XArchive *archive = NULL;
 	GtkWidget *xa_file_chooser;
@@ -44,6 +43,7 @@
 	gchar *my_path_ext = NULL;
 	gchar *basepath = NULL;
 	gchar *current_dir = NULL;
+	gint current_page;
 
 	xa_file_chooser = gtk_file_chooser_dialog_new ( _("Create a new archive"),
 							GTK_WINDOW (MainWindow),
@@ -147,6 +147,26 @@
 				my_path = my_path_ext;
 			}
 		}
+
+		if ( ! cli )
+		{
+			for (x = 0; x < gtk_notebook_get_n_pages ( notebook) ; x++)
+			{
+				current_page = xa_find_archive_index ( x );
+				if (current_page == -1)
+					break;
+				if (strcmp (my_path,archive_open[current_page]->path) == 0)
+				{
+					gchar *msg = g_strdup_printf(_("\"%s\" is already open!") , my_path);
+					response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't create a new archive:"),msg );
+					g_free (my_path);
+					g_free (msg);
+					gtk_widget_destroy (xa_file_chooser);
+					return NULL;
+				}
+			}
+		}
+
 		if ( g_file_test ( my_path , G_FILE_TEST_EXISTS ) )
 		{
 			gchar *utf8_path;
@@ -172,6 +192,7 @@
 			/* The following to avoid to update the archive instead of adding to it since the filename exists */
 			unlink ( my_path );
 		}
+
 		archive = xa_init_archive_structure ();
 		new_combo_box = gtk_combo_box_get_active (GTK_COMBO_BOX (combo_box));
 

Modified: xarchiver/trunk/src/new_dialog.h
===================================================================
--- xarchiver/trunk/src/new_dialog.h	2006-12-03 19:02:14 UTC (rev 24038)
+++ xarchiver/trunk/src/new_dialog.h	2006-12-04 10:50:50 UTC (rev 24039)
@@ -20,6 +20,6 @@
 #define __NEW_DIALOG_H
 
 #include "archive.h"
-XArchive *xa_new_archive_dialog (gchar *path);
+XArchive *xa_new_archive_dialog (gchar *path, XArchive *archive_open[]);
 #endif
 



More information about the Xfce4-commits mailing list