Yasumichi Akahoshi
yasum****@users*****
2005年 1月 22日 (土) 01:29:22 JST
Index: cxplorer/src/Makefile.am diff -u cxplorer/src/Makefile.am:1.9 cxplorer/src/Makefile.am:1.10 --- cxplorer/src/Makefile.am:1.9 Wed Jan 5 01:33:15 2005 +++ cxplorer/src/Makefile.am Sat Jan 22 01:29:21 2005 @@ -5,7 +5,7 @@ ## Please disable it in the Anjuta project configuration INCLUDES = \ - $(GTK_CFLAGS) + $(CXP_CFLAGS) AM_CFLAGS =\ -Wall\ @@ -43,5 +43,4 @@ cxplorer_LDFLAGS = cxplorer_LDADD = \ - $(GTK_LIBS) - + $(CXP_LIBS) Index: cxplorer/src/Makefile.in diff -u cxplorer/src/Makefile.in:1.10 cxplorer/src/Makefile.in:1.11 --- cxplorer/src/Makefile.in:1.10 Wed Jan 5 01:33:15 2005 +++ cxplorer/src/Makefile.in Sat Jan 22 01:29:21 2005 @@ -65,6 +65,8 @@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CFLAGS = @CFLAGS@ +CXP_CFLAGS = @CXP_CFLAGS@ +CXP_LIBS = @CXP_LIBS@ CXX = @CXX@ CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ @@ -79,8 +81,6 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ @@ -119,7 +119,7 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ -INCLUDES = $(GTK_CFLAGS) +INCLUDES = $(CXP_CFLAGS) AM_CFLAGS = -Wall -g @@ -132,7 +132,7 @@ cxplorer_LDFLAGS = -cxplorer_LDADD = $(GTK_LIBS) +cxplorer_LDADD = $(CXP_LIBS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h Index: cxplorer/src/actcalls.c diff -u cxplorer/src/actcalls.c:1.21 cxplorer/src/actcalls.c:1.22 --- cxplorer/src/actcalls.c:1.21 Wed Jan 5 01:33:15 2005 +++ cxplorer/src/actcalls.c Sat Jan 22 01:29:21 2005 @@ -22,14 +22,14 @@ * GtkButton on toolbar. * @author Yasumichi Akahoshi <yasum****@users*****> * @date Fri Jun 11 00:16:18 2004 - * $Revision: 1.21 $ + * $Revision: 1.22 $ */ #ifdef HAVE_CONFIG_H # include <config.h> #endif -#include <gtk/gtk.h> +#include <cxp.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> Index: cxplorer/src/cxplorer.c diff -u cxplorer/src/cxplorer.c:1.18 cxplorer/src/cxplorer.c:1.19 --- cxplorer/src/cxplorer.c:1.18 Wed Jan 5 01:33:15 2005 +++ cxplorer/src/cxplorer.c Sat Jan 22 01:29:21 2005 @@ -5,7 +5,7 @@ * This file contains functions which related struct Cxplorer. * @author Yasumichi Akahoshi <yasum****@users*****> * @date Mon Jun 14 13:26:05 2004 - * $Revision: 1.18 $ + * $Revision: 1.19 $ ****************************************************************************/ #ifdef HAVE_CONFIG_H @@ -82,94 +82,6 @@ } /** - * This displays the dialog which demands an input from a user, and returns - * the string which the user inputted. - * @param owner [in] Parent of dialog. - * @param title [in] Title of dialog. - * @param defval [in] default value of text entry. - * @return String was inputed by user. When user don't input or clicked cancel, - * NULL is returned. - */ -gchar *cxp_input_box (GtkWindow * owner, const gchar * title, - const gchar * defval) -{ - gchar *inputed; - GtkWidget *dialog; - GtkWidget *entry; - - dialog = gtk_dialog_new_with_buttons (title, owner, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, - GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, - NULL); - gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); - entry = gtk_entry_new (); - gtk_entry_set_text (GTK_ENTRY(entry), defval); - gtk_widget_show (entry); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), entry); - if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) - { - inputed = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry))); - if (strlen (inputed) == 0) - { - g_free (inputed); - inputed = NULL; - } - } - else - { - inputed = NULL; - } - gtk_widget_destroy (dialog); - - return inputed; -} - -/** - * Gets the last component of the filename converted to UTF-8. If file_name ends - * with a directory separator it gets the component before the last slash. If - * file_name consists only of directory separators (and on Windows, possibly a - * drive letter), a single separator is returned. If file_name is empty, it gets - * ".". - * @param file_name the name of the file. - * @return a newly allocated string containing the last component of the - * filename converted from locale to UTF-8. - */ -gchar *cxp_path_get_basename_of_utf8 (const gchar * file_name) -{ - gchar *gcBasenameLocale; - gchar *gcBasenameUtf8; - - gcBasenameLocale = g_path_get_basename (file_name); - gcBasenameUtf8 = - g_locale_to_utf8 (gcBasenameLocale, -1, NULL, NULL, NULL); - g_free (gcBasenameLocale); - - return gcBasenameUtf8; -} - -/** - * Gets the directory components of a file name converted to UTF-8. If the file - * name has no directory components "." is returned. The returned string should - * be freed when no longer needed. - * @param file_name the name of the file. - * @return the directory components of the file converted from locale to UTF-8. - */ -gchar *cxp_path_get_dirname_of_utf8 (const gchar * file_name) -{ - gchar *gcDirnameLocale; - gchar *gcDirnameUtf8; - - gcDirnameLocale = g_path_get_dirname (file_name); - gcDirnameUtf8 = - g_locale_to_utf8 (gcDirnameLocale, -1, NULL, NULL, NULL); - g_free (gcDirnameLocale); - - return gcDirnameUtf8; -} - -/** * This function format date and time. * @param timep pointer to time_t. * @return newly alocate formatted string. Index: cxplorer/src/cxplorer.h diff -u cxplorer/src/cxplorer.h:1.14 cxplorer/src/cxplorer.h:1.15 --- cxplorer/src/cxplorer.h:1.14 Wed Jan 5 01:33:15 2005 +++ cxplorer/src/cxplorer.h Sat Jan 22 01:29:21 2005 @@ -6,7 +6,7 @@ * @sa cxplorer.c * @author Yasumichi Akahoshi <yasum****@users*****> * @date Sun Jun 13 18:57:32 2004 - * $Revision: 1.14 $ + * $Revision: 1.15 $ */ #ifndef _CXPLORER_H @@ -41,10 +41,6 @@ Cxplorer *cxplorer_new (void); void cxplorer_free (Cxplorer * cxplorer); void on_directoryview_cursor_changed (GtkTreeView * treeview, gpointer user_data); - gchar *cxp_input_box (GtkWindow * owner, const gchar * title, - const gchar * defval); - gchar *cxp_path_get_basename_of_utf8 (const gchar * file_name); - gchar *cxp_path_get_dirname_of_utf8 (const gchar * file_name); gchar *cxp_strftime (const time_t * timep); gchar *cxplorer_get_current_directory (Cxplorer * cxplorer); Index: cxplorer/src/fileview.c diff -u cxplorer/src/fileview.c:1.26 cxplorer/src/fileview.c:1.27 --- cxplorer/src/fileview.c:1.26 Wed Jan 5 01:33:15 2005 +++ cxplorer/src/fileview.c Sat Jan 22 01:29:21 2005 @@ -6,14 +6,14 @@ * a instance of GtkTreeView. * @author Yasumichi Akahoshi <yasum****@users*****> * @date 2004 - * $Revision: 1.26 $ + * $Revision: 1.27 $ */ #ifdef HAVE_CONFIG_H # include <config.h> #endif -#include <gtk/gtk.h> +#include <cxp.h> #include <stdio.h> #include <string.h> #include <sys/types.h> Index: cxplorer/src/menubar.c diff -u cxplorer/src/menubar.c:1.23 cxplorer/src/menubar.c:1.24 --- cxplorer/src/menubar.c:1.23 Wed Jan 5 01:33:15 2005 +++ cxplorer/src/menubar.c Sat Jan 22 01:29:21 2005 @@ -5,7 +5,7 @@ * This file contains functions which related menubar. * @author Yasumichi Akahoshi <yasum****@users*****> * @date Tue Jun 8 22:32:55 2004 - * $Revision: 1.23 $ + * $Revision: 1.24 $ ****************************************************************************/ #ifdef HAVE_CONFIG_H @@ -13,7 +13,7 @@ #endif #include <gdk/gdkkeysyms.h> -#include <gtk/gtk.h> +#include <cxp.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> Index: cxplorer/src/property.c diff -u cxplorer/src/property.c:1.11 cxplorer/src/property.c:1.12 --- cxplorer/src/property.c:1.11 Sat Nov 6 00:39:43 2004 +++ cxplorer/src/property.c Sat Jan 22 01:29:21 2005 @@ -26,7 +26,7 @@ # include <config.h> #endif -#include <gtk/gtk.h> +#include <cxp.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h>