[Xfce4-commits] r23921 - in xarchiver/branches/xarchiver-psybsd: . icons icons/48x48 libxarchiver pixmaps src

Stephan Arts stephan at xfce.org
Tue Nov 21 19:39:07 CET 2006


Author: stephan
Date: 2006-11-21 18:39:06 +0000 (Tue, 21 Nov 2006)
New Revision: 23921

Added:
   xarchiver/branches/xarchiver-psybsd/icons/
   xarchiver/branches/xarchiver-psybsd/icons/48x48/
   xarchiver/branches/xarchiver-psybsd/icons/48x48/Makefile.am
   xarchiver/branches/xarchiver-psybsd/icons/48x48/xarchiver.png
   xarchiver/branches/xarchiver-psybsd/icons/Makefile.am
   xarchiver/branches/xarchiver-psybsd/pixmaps/Makefile.am
   xarchiver/branches/xarchiver-psybsd/pixmaps/xarchiver-add.png
   xarchiver/branches/xarchiver-psybsd/pixmaps/xarchiver-extract.png
Removed:
   xarchiver/branches/xarchiver-psybsd/pixmaps/add.png
   xarchiver/branches/xarchiver-psybsd/pixmaps/add_button.png
   xarchiver/branches/xarchiver-psybsd/pixmaps/extract.png
   xarchiver/branches/xarchiver-psybsd/pixmaps/extract_button.png
   xarchiver/branches/xarchiver-psybsd/pixmaps/xarchiver.png
Modified:
   xarchiver/branches/xarchiver-psybsd/Makefile.am
   xarchiver/branches/xarchiver-psybsd/TODO
   xarchiver/branches/xarchiver-psybsd/configure.in.in
   xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.h
   xarchiver/branches/xarchiver-psybsd/src/main.c
   xarchiver/branches/xarchiver-psybsd/src/main_window.c
Log:
Made xarchiver a bit more freedesktop.org icon-naming-spec compliant.
Updated TODO



Modified: xarchiver/branches/xarchiver-psybsd/Makefile.am
===================================================================
--- xarchiver/branches/xarchiver-psybsd/Makefile.am	2006-11-21 13:24:55 UTC (rev 23920)
+++ xarchiver/branches/xarchiver-psybsd/Makefile.am	2006-11-21 18:39:06 UTC (rev 23921)
@@ -4,15 +4,8 @@
 	1.8								\
 	dist-bzip2
 
-SUBDIRS = libxarchiver src po
+SUBDIRS = icons pixmaps libxarchiver src po
 
-pixmapsdir       = $(datadir)/pixmaps
-pixmaps_DATA     = pixmaps/xarchiver.png \
-                   pixmaps/extract.png \
-									 pixmaps/extract_button.png \
-									 pixmaps/add.png \
-									 pixmaps/add_button.png
-
 wrapperdir = $(libexecdir)/thunar-archive-plugin/
 wrapper_SCRIPTS = xarchiver.tap
 
@@ -28,7 +21,6 @@
 	intltool-update.in \
 	xarchiver.tap \
 	$(desktop_in_files) \
-	$(pixmaps_DATA) \
 	$(wrapper_DATA)
 
 DISTCLEANFILES = \

Modified: xarchiver/branches/xarchiver-psybsd/TODO
===================================================================
--- xarchiver/branches/xarchiver-psybsd/TODO	2006-11-21 13:24:55 UTC (rev 23920)
+++ xarchiver/branches/xarchiver-psybsd/TODO	2006-11-21 18:39:06 UTC (rev 23921)
@@ -56,5 +56,7 @@
 	Add progressbar to statusbar.
 
 	Toggle navigationbar at runtime
+	
+	Support CustomActionProperties (custom-actions which require additional arguments and configuration)
 
   ... Complete TODO-file

Modified: xarchiver/branches/xarchiver-psybsd/configure.in.in
===================================================================
--- xarchiver/branches/xarchiver-psybsd/configure.in.in	2006-11-21 13:24:55 UTC (rev 23920)
+++ xarchiver/branches/xarchiver-psybsd/configure.in.in	2006-11-21 18:39:06 UTC (rev 23921)
@@ -112,9 +112,10 @@
 XDT_I18N([@LINGUAS@])
 
 
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.2.0])
-XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.2.0])
-XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.2.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.4.0])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.4.0])
+XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.4.0])
+XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.4.0])
 XDT_CHECK_PACKAGE([THUNAR_VFS], [thunar-vfs-1], [0.4.0])
 
 AC_DEFINE([HAVE_THUNAR_VFS], [1], [Define if we have thunar-vfs])
@@ -155,6 +156,9 @@
 po/Makefile.in
 src/Makefile
 libxarchiver/Makefile
+icons/Makefile
+icons/48x48/Makefile
+pixmaps/Makefile
 ])
 
 echo "----------------------------------------"

Added: xarchiver/branches/xarchiver-psybsd/icons/48x48/Makefile.am
===================================================================
--- xarchiver/branches/xarchiver-psybsd/icons/48x48/Makefile.am	                        (rev 0)
+++ xarchiver/branches/xarchiver-psybsd/icons/48x48/Makefile.am	2006-11-21 18:39:06 UTC (rev 23921)
@@ -0,0 +1,9 @@
+
+# Inspired by Makefile.am from the Thunar file-manager
+
+iconsdir = $(datadir)/icons/hicolor/48x48/apps
+icons_DATA = xarchiver.png
+	
+
+EXTRA_DIST = $(icons_DATA)
+

Added: xarchiver/branches/xarchiver-psybsd/icons/48x48/xarchiver.png
===================================================================
(Binary files differ)


Property changes on: xarchiver/branches/xarchiver-psybsd/icons/48x48/xarchiver.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: xarchiver/branches/xarchiver-psybsd/icons/Makefile.am
===================================================================
--- xarchiver/branches/xarchiver-psybsd/icons/Makefile.am	                        (rev 0)
+++ xarchiver/branches/xarchiver-psybsd/icons/Makefile.am	2006-11-21 18:39:06 UTC (rev 23921)
@@ -0,0 +1,17 @@
+
+# Inspired by Makefile.am from the Thunar file-manager
+
+SUBDIRS = 48x48
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook:
+	@-if test -z "$(DESTDIR)"; then					\
+		echo "Updating Gtk icon cache.";			\
+		$(gtk_update_icon_cache);				\
+	else								\
+		echo "*** Icon cache not updated. Remember to run:";	\
+		echo "***";						\
+		echo "***   $(gtk_update_icon_cache)";			\
+		echo "***";						\
+	fi

Modified: xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.h
===================================================================
--- xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.h	2006-11-21 13:24:55 UTC (rev 23920)
+++ xarchiver/branches/xarchiver-psybsd/libxarchiver/archive.h	2006-11-21 18:39:06 UTC (rev 23921)
@@ -28,6 +28,7 @@
 	LXA_ARCHIVESTATUS_REMOVE,
 	LXA_ARCHIVESTATUS_REFRESH,
 	LXA_ARCHIVESTATUS_ERROR,
+	LXA_ARCHIVESTATUS_CUSTOM,
 	LXA_ARCHIVESTATUS_USERBREAK
 } LXAArchiveStatus;
 
@@ -78,6 +79,8 @@
 #endif
 	LXAArchiveStatus    status;
 	LXAArchiveStatus    old_status;
+	gchar              *status_msg;
+	gdouble             progress;
 	GPid                child_pid;
 	GIOChannel         *ioc_in;
 	GIOChannel         *ioc_out;

Added: xarchiver/branches/xarchiver-psybsd/pixmaps/Makefile.am
===================================================================
--- xarchiver/branches/xarchiver-psybsd/pixmaps/Makefile.am	                        (rev 0)
+++ xarchiver/branches/xarchiver-psybsd/pixmaps/Makefile.am	2006-11-21 18:39:06 UTC (rev 23921)
@@ -0,0 +1,8 @@
+
+# Inspired by Makefile.am from the Thunar file-manager
+
+pixmapsdir = $(datadir)/pixmaps/xarchiver
+
+pixmaps_DATA = xarchiver-add.png xarchiver-extract.png
+
+EXTRA_DIST = $(pixmaps_DATA)

Deleted: xarchiver/branches/xarchiver-psybsd/pixmaps/add.png

Deleted: xarchiver/branches/xarchiver-psybsd/pixmaps/add_button.png

Deleted: xarchiver/branches/xarchiver-psybsd/pixmaps/extract.png

Deleted: xarchiver/branches/xarchiver-psybsd/pixmaps/extract_button.png

Copied: xarchiver/branches/xarchiver-psybsd/pixmaps/xarchiver-add.png (from rev 23919, xarchiver/branches/xarchiver-psybsd/pixmaps/add.png)
===================================================================
(Binary files differ)

Copied: xarchiver/branches/xarchiver-psybsd/pixmaps/xarchiver-extract.png (from rev 23919, xarchiver/branches/xarchiver-psybsd/pixmaps/extract.png)
===================================================================
(Binary files differ)

Deleted: xarchiver/branches/xarchiver-psybsd/pixmaps/xarchiver.png

Modified: xarchiver/branches/xarchiver-psybsd/src/main.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/main.c	2006-11-21 13:24:55 UTC (rev 23920)
+++ xarchiver/branches/xarchiver-psybsd/src/main.c	2006-11-21 18:39:06 UTC (rev 23921)
@@ -113,6 +113,7 @@
 
 #ifdef G_THREADS_ENABLED
 	g_thread_init(NULL);
+  gdk_threads_init();
 #endif /* G_THREADS_ENABLED */
 
 	if(!gtk_init_with_args(&argc, &argv, _("[archive name]"), entries, PACKAGE, &cli_error))
@@ -179,7 +180,9 @@
 
 
 	g_object_unref(xa_app);
+	gdk_threads_enter();
 	gtk_main();
+	gdk_threads_leave();
 	lxa_destroy();
 
 	return 0;

Modified: xarchiver/branches/xarchiver-psybsd/src/main_window.c
===================================================================
--- xarchiver/branches/xarchiver-psybsd/src/main_window.c	2006-11-21 13:24:55 UTC (rev 23920)
+++ xarchiver/branches/xarchiver-psybsd/src/main_window.c	2006-11-21 18:39:06 UTC (rev 23921)
@@ -242,13 +242,13 @@
 		window->menubar.menu_action = gtk_menu_new();
 		gtk_menu_item_set_submenu(GTK_MENU_ITEM(window->menubar.menu_item_action), window->menubar.menu_action);
 
-		tmp_image = xa_main_window_find_image("add.png", GTK_ICON_SIZE_MENU);
+		tmp_image = xa_main_window_find_image("xarchiver-add.png", GTK_ICON_SIZE_MENU);
 		window->menubar.menu_item_add = gtk_image_menu_item_new_with_mnemonic(_("_Add"));
 		gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(window->menubar.menu_item_add), tmp_image);
 		gtk_widget_set_sensitive(window->menubar.menu_item_add, FALSE);
 		gtk_container_add(GTK_CONTAINER(window->menubar.menu_action), window->menubar.menu_item_add);
 
-		tmp_image = xa_main_window_find_image("extract.png", GTK_ICON_SIZE_MENU);
+		tmp_image = xa_main_window_find_image("xarchiver-extract.png", GTK_ICON_SIZE_MENU);
 		window->menubar.menu_item_extract = gtk_image_menu_item_new_with_mnemonic(_("_Extract"));
 		gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(window->menubar.menu_item_extract), tmp_image);
 		gtk_widget_set_sensitive(window->menubar.menu_item_extract, FALSE);
@@ -307,11 +307,11 @@
 	g_signal_connect(G_OBJECT(window->toolbar.tool_item_open), "clicked", G_CALLBACK(cb_xa_main_open_archive), window);
 
 /* Action pane */
-	tmp_image = xa_main_window_find_image("add.png", GTK_ICON_SIZE_LARGE_TOOLBAR);
+	tmp_image = xa_main_window_find_image("xarchiver-add.png", GTK_ICON_SIZE_LARGE_TOOLBAR);
 	window->toolbar.tool_item_add = gtk_tool_button_new(tmp_image, _("Add"));
 	gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_add), FALSE);
 
-	tmp_image = xa_main_window_find_image("extract.png", GTK_ICON_SIZE_LARGE_TOOLBAR);
+	tmp_image = xa_main_window_find_image("xarchiver-extract.png", GTK_ICON_SIZE_LARGE_TOOLBAR);
 	window->toolbar.tool_item_extract = gtk_tool_button_new(tmp_image, _("Extract"));
 	gtk_widget_set_sensitive(GTK_WIDGET(window->toolbar.tool_item_extract), FALSE);
 
@@ -449,20 +449,15 @@
 xa_main_window_find_image(gchar *filename, GtkIconSize size)
 {
 	GError *error = NULL;
+	gint width  = 0;
+	gint height = 0;
 	GtkWidget *file_image;
 	gchar *path;
-	path = g_strconcat(DATADIR, "/pixmaps/", filename, NULL);
-	GdkPixbuf *file_pixbuf = gdk_pixbuf_new_from_file(path, &error);
-	if(error)
-	{
-		/*
-		* perhaps xarchiver has not been installed and is being executed from source dir
-		*/
-		g_free(error);
-		error = NULL;
-		path = g_strconcat("./pixmaps/", filename, NULL);
-		file_pixbuf = gdk_pixbuf_new_from_file(path, &error);
-	}
+	path = g_strconcat(DATADIR, "/pixmaps/xarchiver/", filename, NULL);
+
+	gtk_icon_size_lookup(size, &width, &height);
+
+	GdkPixbuf *file_pixbuf = gdk_pixbuf_new_from_file_at_size(path, width, height, &error);
 	if(file_pixbuf)
 	{
 		file_image = gtk_image_new_from_pixbuf(file_pixbuf);



More information about the Xfce4-commits mailing list