[Cxplorer-cvs 01243] CVS update: cxplorer/src

アーカイブの一覧に戻る

Yasumichi Akahoshi yasum****@users*****
2005年 9月 3日 (土) 21:55:36 JST


Index: cxplorer/src/cxp-dir-view.c
diff -u cxplorer/src/cxp-dir-view.c:1.25 cxplorer/src/cxp-dir-view.c:1.26
--- cxplorer/src/cxp-dir-view.c:1.25	Sat May 21 03:03:13 2005
+++ cxplorer/src/cxp-dir-view.c	Sat Sep  3 21:55:35 2005
@@ -1,4 +1,4 @@
-/* $Id: cxp-dir-view.c,v 1.25 2005/05/20 18:03:13 yasumichi Exp $ */
+/* $Id: cxp-dir-view.c,v 1.26 2005/09/03 12:55:35 yasumichi Exp $ */
 /*
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -41,7 +41,6 @@
 {
 	GConfClient *client;
 	GtkWidget *dirview;
-	GdkPixbuf *icon;
 	gboolean dispose_has_run;
 } CxpDirViewPrivate;
 
@@ -149,7 +148,6 @@
 	gtk_widget_set_size_request (GTK_WIDGET(self), 200, -1);
 	priv->dirview = cxp_dir_view_tree_view_new (self);
 	gtk_container_add (GTK_CONTAINER (self), priv->dirview);
-	priv->icon = NULL;
 	priv->dispose_has_run = FALSE;
 
 	/* signal connect */
@@ -450,16 +448,9 @@
 					 GtkTreeModel * tree_model,
 					 GtkTreeIter * iter, gpointer data)
 {
-	CxpDirViewPrivate *priv = CXP_DIR_VIEW_GET_PRIVATE (data);
+	GdkPixbuf *icon = cxp_lookup_icon_from_mime("inode/directory");
 
-	if (priv->icon)
-	{
-		g_object_set (cell, "pixbuf", priv->icon, NULL);
-	}
-	else
-	{
-		g_object_set (cell, "pixbuf", NULL, NULL);
-	}
+	g_object_set (cell, "pixbuf", icon, NULL);
 }
 
 /*
@@ -576,16 +567,12 @@
  * Creates a new CxpDirView widget.
  * \endif
  */
-GtkWidget *cxp_dir_view_new (GConfClient *client, GdkPixbuf * icon)
+GtkWidget *cxp_dir_view_new (GConfClient *client)
 {
 	CxpDirView *object;
-	CxpDirViewPrivate *priv;
 
 	object = CXP_DIR_VIEW (g_object_new (CXP_TYPE_DIR_VIEW, "gconf-client", client, NULL));
 
-	priv = CXP_DIR_VIEW_GET_PRIVATE (object);
-	priv->icon = icon;
-
 	return GTK_WIDGET (object);
 }
 
Index: cxplorer/src/cxp-dir-view.h
diff -u cxplorer/src/cxp-dir-view.h:1.10 cxplorer/src/cxp-dir-view.h:1.11
--- cxplorer/src/cxp-dir-view.h:1.10	Fri May 20 23:45:55 2005
+++ cxplorer/src/cxp-dir-view.h	Sat Sep  3 21:55:35 2005
@@ -1,4 +1,4 @@
-/* $Id: cxp-dir-view.h,v 1.10 2005/05/20 14:45:55 yasumichi Exp $ */
+/* $Id: cxp-dir-view.h,v 1.11 2005/09/03 12:55:35 yasumichi Exp $ */
 /*
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@
 /*
  * API
  */
-GtkWidget *cxp_dir_view_new (GConfClient *client, GdkPixbuf *icon);
+GtkWidget *cxp_dir_view_new (GConfClient *client);
 gchar *cxp_dir_view_get_current_directory (CxpDirView *instance);
 gboolean cxp_dir_view_change_directory (CxpDirView *instance, const gchar *fullpath);
 void cxp_dir_view_refresh (CxpDirView *instance);
Index: cxplorer/src/cxplorer-window.c
diff -u cxplorer/src/cxplorer-window.c:1.60 cxplorer/src/cxplorer-window.c:1.61
--- cxplorer/src/cxplorer-window.c:1.60	Thu May 19 12:11:39 2005
+++ cxplorer/src/cxplorer-window.c	Sat Sep  3 21:55:35 2005
@@ -185,7 +185,6 @@
 {
 	CxplorerWindow *self = CXPLORER_WINDOW (instance);
 	CxplorerWindowPrivate *private = CXPLORER_WINDOW_GET_PRIVATE (instance);
-	GdkPixbuf *pixbuf;
 	GtkAction *dot_file_act;
 	GtkWidget *menubar;
 	GtkWidget *toolbar;
@@ -262,8 +261,7 @@
 	gtk_paned_set_position (GTK_PANED (hpaned), 200);
 	gtk_box_pack_start_defaults (GTK_BOX (vbox), hpaned);
 
-	pixbuf = create_pixbuf ("cxp_dir.png");
-	dirview = cxp_dir_view_new (private->client, pixbuf);
+	dirview = cxp_dir_view_new (private->client);
 	gtk_paned_pack1 (GTK_PANED (hpaned), dirview, FALSE, FALSE);
 	gtk_widget_show (dirview);
 


Cxplorer-cvs メーリングリストの案内
アーカイブの一覧に戻る