[Xfce4-commits] r24001 - in xarchiver/branches/xarchiver-psybsd: . libxarchiver po src

Stephan Arts stephan at xfce.org
Tue Nov 28 11:30:37 CET 2006


Author: stephan
Date: 2006-11-28 10:30:37 +0000 (Tue, 28 Nov 2006)
New Revision: 24001

Modified:
   xarchiver/branches/xarchiver-psybsd/TODO
   xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-gnu-tar.c
   xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-zip.c
   xarchiver/branches/xarchiver-psybsd/libxarchiver/internals.c
   xarchiver/branches/xarchiver-psybsd/po/nl.po
   xarchiver/branches/xarchiver-psybsd/src/archive_store.c
   xarchiver/branches/xarchiver-psybsd/src/main_window.c
   xarchiver/branches/xarchiver-psybsd/src/notebook.c
   xarchiver/branches/xarchiver-psybsd/src/tool_bar.c
   xarchiver/branches/xarchiver-psybsd/src/widget_factory.c
Log:
Changed Stuff



Modified: xarchiver/branches/xarchiver-psybsd/TODO
===================================================================
--- xarchiver/branches/xarchiver-psybsd/TODO	2006-11-27 22:48:03 UTC (rev 24000)
+++ xarchiver/branches/xarchiver-psybsd/TODO	2006-11-28 10:30:37 UTC (rev 24001)
@@ -59,7 +59,7 @@
 
 	Support CustomActionProperties (custom-actions which require additional arguments and configuration) Make them class actions insteadof instance actions structs
 
-	An Archive can only be opened once
+	An Archive should only be opened once
 
 	Check to see if the [<] and [>] of the pathbar needs point in the other direction when TEXT_DIR_RTL is set
 

Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-gnu-tar.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-gnu-tar.c	2006-11-27 22:48:03 UTC (rev 24000)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-gnu-tar.c	2006-11-28 10:30:37 UTC (rev 24001)
@@ -394,7 +394,6 @@
 		if(command)
 		{
 			lxa_execute(command, archive, NULL, NULL, NULL, NULL);
-			g_debug("Extracting archive '%s' to '%s'\nUsing command '%s'", archive->path, dest_path, command);
 			LXA_FREE(command_options);
 			LXA_FREE(command);
 		}
@@ -625,9 +624,6 @@
 	}
 	if(cond & (G_IO_ERR | G_IO_HUP | G_IO_NVAL) )
 	{
-#ifdef DEBUG
-		g_debug("shutting down ioc");
-#endif
 		g_io_channel_shutdown ( ioc,TRUE,NULL );
 		g_io_channel_unref (ioc);
 		lxa_archive_set_status(archive, LXA_ARCHIVESTATUS_IDLE);
@@ -664,9 +660,6 @@
 	LXA_FREE(buf);
 	if(cond & (G_IO_ERR | G_IO_HUP | G_IO_NVAL) )
 	{
-#ifdef DEBUG
-		g_debug("shutting down ioc");
-#endif
 		g_io_channel_shutdown ( ioc,TRUE,NULL );
 		g_io_channel_unref (ioc);
 
@@ -723,9 +716,6 @@
 	LXA_FREE(buf);
 	if(cond & (G_IO_ERR | G_IO_HUP | G_IO_NVAL) )
 	{
-#ifdef DEBUG
-		g_debug("shutting down ioc");
-#endif
 		g_io_channel_shutdown ( ioc,TRUE,NULL );
 		g_io_channel_unref (ioc);
 		if(archive->tmp_file)

Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-zip.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-zip.c	2006-11-27 22:48:03 UTC (rev 24000)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/archive-support-zip.c	2006-11-28 10:30:37 UTC (rev 24001)
@@ -259,9 +259,6 @@
 		     !g_strcasecmp((gchar *)lxa_mime_info_get_name(archive->mime_info), "application/zip"))
 			{
 				command = g_strconcat("unzip -o ", archive->path, " ", files, " -d ", dest_path, NULL);
-#ifdef DEBUG
-				g_debug("Extracting archive '%s' to '%s'", archive->path, dest_path);
-#endif /* DEBUG */
 				lxa_execute(command, archive, NULL, NULL, NULL, NULL);
 			}	
 		} else
@@ -476,9 +473,6 @@
 	}
 	if(cond & (G_IO_ERR | G_IO_HUP | G_IO_NVAL) )
 	{
-#ifdef DEBUG
-		g_debug("shutting down ioc");
-#endif
 		g_io_channel_shutdown ( ioc,TRUE,NULL );
 		g_io_channel_unref (ioc);
 		lxa_archive_set_status(archive, LXA_ARCHIVESTATUS_IDLE);

Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/internals.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/internals.c	2006-11-27 22:48:03 UTC (rev 24000)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/internals.c	2006-11-28 10:30:37 UTC (rev 24001)
@@ -107,23 +107,14 @@
 		return 1;
 	if(function)
 	{
-#ifdef DEBUG
-		g_debug("Adding watch to child");
-#endif
 		g_child_watch_add(archive->child_pid, function, archive);
 	}
 	else
 	{
-#ifdef DEBUG
-		g_debug("Adding default watch to child");
-#endif
 		g_child_watch_add(archive->child_pid, lxa_default_child_watch_func, archive);
 	}
 	if(f_in)
 	{
-#ifdef DEBUG
-		g_debug("Adding watch to stdin");
-#endif
 		archive->ioc_in = g_io_channel_unix_new(fd_in);
 		g_io_channel_set_encoding (archive->ioc_in, "ISO8859-1" , NULL);
 		g_io_channel_set_flags ( archive->ioc_in, G_IO_FLAG_NONBLOCK , NULL );
@@ -131,9 +122,6 @@
 	}
 	if(f_out)
 	{
-#ifdef DEBUG
-		g_debug("Adding watch to stdout");
-#endif
 		archive->ioc_out = g_io_channel_unix_new(fd_out);
 		g_io_channel_set_encoding (archive->ioc_out, NULL, NULL);
 		g_io_channel_set_flags (archive->ioc_out , G_IO_FLAG_NONBLOCK , NULL );
@@ -141,9 +129,6 @@
 	}
 	if(f_err)
 	{
-#ifdef DEBUG
-		g_debug("Adding watch to stderr");
-#endif
 		archive->ioc_err = g_io_channel_unix_new(fd_out);
 //  g_io_channel_set_encoding (ioc_err, "ISO8859-1" , NULL);
 		g_io_channel_set_flags (archive->ioc_err , G_IO_FLAG_NONBLOCK , NULL );

Modified: xarchiver/branches/xarchiver-psybsd/po/nl.po
===================================================================
--- xarchiver/branches/xarchiver-psybsd/po/nl.po	2006-11-27 22:48:03 UTC (rev 24000)
+++ xarchiver/branches/xarchiver-psybsd/po/nl.po	2006-11-28 10:30:37 UTC (rev 24001)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: xarchiver 0.3.9psybsd\n"
 "Report-Msgid-Bugs-To: psybsd at gmail.com\n"
-"POT-Creation-Date: 2006-11-23 08:47+0100\n"
+"POT-Creation-Date: 2006-11-27 17:19+0100\n"
 "PO-Revision-Date: 2006-07-20 16:36+0200\n"
 "Last-Translator: Stephan Arts <psybsd at gmail.com>\n"
 "Language-Team: Dutch <vertaling at vrijschrift.org>\n"
@@ -199,6 +199,28 @@
 "Probeer xarchiver --help om een volledige lijst te zien met beschikbare "
 "opties.\n"
 
+#: ../src/main_window.c:108
+msgid "Internal Style"
+msgstr "Interne Stijl"
+
+#: ../src/main_window.c:110
+msgid "Tool Bar Style"
+msgstr "Werkbalk Stijl"
+
+#: ../src/main_window.c:113
+msgid "Path Bar Style"
+msgstr "Padbalk Stijl"
+
+#: ../src/main_window.c:161
+msgid "Navigation Style"
+msgstr "Navigatie Stijl"
+
+#: ../src/main_window.c:162
+msgid ""
+"Style of navigation\n"
+"The style to navigate trough the archive"
+msgstr ""
+
 #. File menu
 #: ../src/main_window.c:247
 msgid "_File"

Modified: xarchiver/branches/xarchiver-psybsd/src/archive_store.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/archive_store.c	2006-11-27 22:48:03 UTC (rev 24000)
+++ xarchiver/branches/xarchiver-psybsd/src/archive_store.c	2006-11-28 10:30:37 UTC (rev 24001)
@@ -1187,9 +1187,11 @@
 
 	if(!archive)
 	{
+		if(store->archive)
+			g_object_unref(store->archive);
 		store->archive = NULL;
 
-		g_signal_emit(store, xa_archive_store_signals[XA_ARCHIVE_STORE_SIGNAL_NEW_ARCHIVE], 0,NULL);
+		g_signal_emit(store, xa_archive_store_signals[XA_ARCHIVE_STORE_SIGNAL_NEW_ARCHIVE], 0, NULL);
 		return;
 	}
 
@@ -1225,9 +1227,8 @@
 		}
 	}
 
+	g_signal_emit(store, xa_archive_store_signals[XA_ARCHIVE_STORE_SIGNAL_NEW_ARCHIVE], 0, NULL);
 	g_signal_connect(store->archive, "lxa_refreshed", G_CALLBACK(cb_xa_archive_store_archive_refreshed), store);
-
-	g_signal_emit(store, xa_archive_store_signals[XA_ARCHIVE_STORE_SIGNAL_NEW_ARCHIVE], 0,NULL);
 }
 
 gchar *
@@ -1661,6 +1662,7 @@
 	{
 		if(!store->navigation.present)
 			xa_archive_store_append_history(store, g_slist_prepend(NULL, lxa_archive_get_iter(archive, NULL)));
+		g_signal_emit(store, xa_archive_store_signals[XA_ARCHIVE_STORE_SIGNAL_PWD_CHANGED], 0,NULL);
 	}
 }
 

Modified: xarchiver/branches/xarchiver-psybsd/src/main_window.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/main_window.c	2006-11-27 22:48:03 UTC (rev 24000)
+++ xarchiver/branches/xarchiver-psybsd/src/main_window.c	2006-11-28 10:30:37 UTC (rev 24001)
@@ -105,12 +105,12 @@
 	if(!nav_style_type)
 	{
 		static GEnumValue style_types[] = {
-			{XA_MAIN_WINDOW_NAVIGATION_INTERNAL, "internal", "Internal Style"},
+			{XA_MAIN_WINDOW_NAVIGATION_INTERNAL, "internal", N_("Internal Style")},
 #ifdef ENABLE_TOOLBAR
-			{XA_MAIN_WINDOW_NAVIGATION_TOOL_BAR, "tool_bar", "Tool Bar Style"},
+			{XA_MAIN_WINDOW_NAVIGATION_TOOL_BAR, "tool_bar", N_("Tool Bar Style")},
 #endif
 #ifdef ENABLE_PATHBAR
-			{XA_MAIN_WINDOW_NAVIGATION_PATH_BAR, "path_bar", "Path Bar Style"},
+			{XA_MAIN_WINDOW_NAVIGATION_PATH_BAR, "path_bar", N_("Path Bar Style")},
 #endif
 			{0, NULL, NULL}
 		};
@@ -158,8 +158,8 @@
 	object_class->finalize     = xa_main_window_finalize;
 
 	pspec = g_param_spec_enum("navigation-style",
-		"Navigation Style",
-		"Style of navigation\nThe style to navigate trough the archive",
+		_("Navigation Style"),
+		_("Style of navigation\nThe style to navigate trough the archive"),
 		XA_TYPE_MAIN_WINDOW_NAVIGATION_STYLE,
 		XA_MAIN_WINDOW_NAVIGATION_INTERNAL,
 		G_PARAM_READWRITE);
@@ -600,10 +600,13 @@
 		_open_archive_paths = open_archive_paths;
 		while(_open_archive_paths)
 		{
+			xa_application_open_archive(window->app, (GtkWidget *)window, _open_archive_paths->data);
+			/*
 			if(xa_notebook_get_multi_tab(XA_NOTEBOOK(window->notebook)))
 				xa_application_open_archive(window->app, (GtkWidget *)window, _open_archive_paths->data);
 			else
 				xa_application_open_archive(window->app, NULL, _open_archive_paths->data);
+			*/
 			_open_archive_paths = _open_archive_paths->next;
 		}
 		g_slist_foreach(open_archive_paths, (GFunc)g_free, NULL);

Modified: xarchiver/branches/xarchiver-psybsd/src/notebook.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/notebook.c	2006-11-27 22:48:03 UTC (rev 24000)
+++ xarchiver/branches/xarchiver-psybsd/src/notebook.c	2006-11-28 10:30:37 UTC (rev 24001)
@@ -347,6 +347,7 @@
 	g_object_ref(archive_store);
 	gtk_tree_view_set_model(treeview, NULL);
 	xa_archive_store_set_archive(XA_ARCHIVE_STORE(archive_store), archive);
+	g_object_unref(archive_store);
 	gtk_tree_view_set_model(treeview, archive_store);
 }
 

Modified: xarchiver/branches/xarchiver-psybsd/src/tool_bar.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/tool_bar.c	2006-11-27 22:48:03 UTC (rev 24000)
+++ xarchiver/branches/xarchiver-psybsd/src/tool_bar.c	2006-11-28 10:30:37 UTC (rev 24001)
@@ -303,6 +303,7 @@
 cb_xa_tool_bar_pwd_changed(XAArchiveStore *store, XANavigationBar *bar)
 {
 	XAToolBar *tool_bar = XA_TOOL_BAR(bar);
+	g_debug("%s", __FUNCTION__);
 	gchar *path= xa_archive_store_get_pwd(store);
 	if(!path)
 		path = g_strdup("");
@@ -314,9 +315,20 @@
 static void
 cb_xa_tool_bar_new_archive(XAArchiveStore *store, XANavigationBar *bar)
 {
+	g_debug("%s", __FUNCTION__);
 	XAToolBar *tool_bar = XA_TOOL_BAR(bar);
 
-	gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox), FALSE);
+	LXAArchive *lp_archive = xa_archive_store_get_archive(store);
+
+	if(!lp_archive)
+		gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox), FALSE);
+	else
+	{
+		if(lxa_archive_get_status(lp_archive) != LXA_ARCHIVESTATUS_IDLE)
+			gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox), FALSE);
+		else
+			gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox), TRUE);
+	}
 	gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->up_button), FALSE);
 	gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->home_button), FALSE);
 	gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->forward_button), FALSE);
@@ -375,7 +387,10 @@
 		if(!path)
 			path = g_strdup("");
 		xa_tool_bar_refresh(tool_bar, path);
-		gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox), TRUE);
+		if(bar->store->archive->status == LXA_ARCHIVESTATUS_IDLE)
+			gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox), TRUE);
+		else
+			gtk_widget_set_sensitive(GTK_WIDGET(tool_bar->hbox), FALSE);
 		g_free(path);
 	}
 	else

Modified: xarchiver/branches/xarchiver-psybsd/src/widget_factory.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/widget_factory.c	2006-11-27 22:48:03 UTC (rev 24000)
+++ xarchiver/branches/xarchiver-psybsd/src/widget_factory.c	2006-11-28 10:30:37 UTC (rev 24001)
@@ -266,7 +266,7 @@
 
 	for(i = 0; i < n; ++i)
 	{
-		radio = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio), values[i].value_nick);
+		radio = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio), gettext(values[i].value_nick));
 
 		g_object_set_data(G_OBJECT(radio), XA_PROPERTY_SPEC_DATA, pspec);
 		g_object_set_data(G_OBJECT(radio), XA_PROPERTY_VALUE_DATA, GINT_TO_POINTER(values[i].value));
@@ -312,7 +312,7 @@
 
 	for(i = 0; i < n; ++i)
 	{
-		gtk_combo_box_append_text(GTK_COMBO_BOX(combo), values[i].value_nick);
+		gtk_combo_box_append_text(GTK_COMBO_BOX(combo), gettext(values[i].value_nick));
 
 		if(g_value_get_enum(value) == values[i].value)
 			select = i;
@@ -354,7 +354,7 @@
 
 	for(i = 0; i < n; ++i)
 	{
-		check = gtk_check_button_new_with_label(values[i].value_nick);
+		check = gtk_check_button_new_with_label(gettext(values[i].value_nick));
 
 		g_object_set_data(G_OBJECT(check), XA_PROPERTY_SPEC_DATA, pspec);
 		g_object_set_data(G_OBJECT(check), XA_PROPERTY_VALUE_DATA, GINT_TO_POINTER(values[i].value));
@@ -502,7 +502,7 @@
 
 	for(i = 0; i < n; ++i)
 	{
-		radio = gtk_radio_menu_item_new_with_label_from_widget(GTK_RADIO_MENU_ITEM(radio), values[i].value_nick);
+		radio = gtk_radio_menu_item_new_with_label_from_widget(GTK_RADIO_MENU_ITEM(radio), gettext(values[i].value_nick));
 
 		g_object_set_data(G_OBJECT(radio), XA_PROPERTY_SPEC_DATA, pspec);
 		g_object_set_data(G_OBJECT(radio), XA_PROPERTY_VALUE_DATA, GINT_TO_POINTER(values[i].value));
@@ -533,9 +533,9 @@
 	for(i = 0; i < n; ++i)
 	{
 		if(radio)
-			radio = gtk_radio_menu_item_new_with_label_from_widget(GTK_RADIO_MENU_ITEM(radio), values[i].value_nick);
+			radio = gtk_radio_menu_item_new_with_label_from_widget(GTK_RADIO_MENU_ITEM(radio), gettext(values[i].value_nick));
 		else
-			radio = gtk_radio_menu_item_new_with_label(NULL, values[i].value_nick);
+			radio = gtk_radio_menu_item_new_with_label(NULL, gettext(values[i].value_nick));
 
 		g_object_set_data(G_OBJECT(radio), XA_PROPERTY_SPEC_DATA, pspec);
 		g_object_set_data(G_OBJECT(radio), XA_PROPERTY_VALUE_DATA, GINT_TO_POINTER(values[i].value));
@@ -568,7 +568,7 @@
 
 	for(i = 0; i < n; ++i)
 	{
-		check = gtk_check_menu_item_new_with_label(values[i].value_nick);
+		check = gtk_check_menu_item_new_with_label(gettext(values[i].value_nick));
 
 		g_object_set_data(G_OBJECT(check), XA_PROPERTY_SPEC_DATA, pspec);
 		g_object_set_data(G_OBJECT(check), XA_PROPERTY_VALUE_DATA, GINT_TO_POINTER(values[i].value));
@@ -597,7 +597,7 @@
 
 	for(i = 0; i < n; ++i)
 	{
-		check = gtk_check_menu_item_new_with_label(values[i].value_nick);
+		check = gtk_check_menu_item_new_with_label(gettext(values[i].value_nick));
 
 		g_object_set_data(G_OBJECT(check), XA_PROPERTY_SPEC_DATA, pspec);
 		g_object_set_data(G_OBJECT(check), XA_PROPERTY_VALUE_DATA, GINT_TO_POINTER(values[i].value));



More information about the Xfce4-commits mailing list