ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gtkbfc/gtkbfc.c
(Generate patch)

Comparing gtkbfc/gtkbfc.c (file contents):
Revision 1.7 by root, Sat Aug 18 10:31:32 2007 UTC vs.
Revision 1.8 by root, Sat Aug 18 10:46:19 2007 UTC

16 16
17static GObject *(*old_constructor) (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties); 17static GObject *(*old_constructor) (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties);
18 18
19static gchar *last_path; 19static gchar *last_path;
20 20
21#define DEBUG(stmt) stmt;
22
21///////////////////////////////////////////////////////////////////////////// 23/////////////////////////////////////////////////////////////////////////////
22 24
23gchar *gtk_file_chooser_get_filename (GtkFileChooser *chooser) 25gchar *gtk_file_chooser_get_filename (GtkFileChooser *chooser)
24{ 26{
27 DEBUG ((printf ("gtk_file_chooser_get_filename %s\n", last_path)))
25 return g_strdup (last_path ? last_path : "/nonex1st4nt"); 28 return g_strdup (last_path ? last_path : "/nonex1st4nt");
26} 29}
27 30
28gboolean gtk_file_chooser_select_filename (GtkFileChooser *chooser, const char *filename) 31gboolean gtk_file_chooser_select_filename (GtkFileChooser *chooser, const char *filename)
29{ 32{
55 return 1; 58 return 1;
56} 59}
57 60
58gchar * gtk_file_chooser_get_current_folder (GtkFileChooser *chooser) 61gchar * gtk_file_chooser_get_current_folder (GtkFileChooser *chooser)
59{ 62{
63 DEBUG ((printf ("gtk_file_chooser_get_current_folder\n")))
60 return g_strdup ("/nonex1st4nt/"); 64 return g_strdup ("/nonex1st4nt/");
61} 65}
62 66
63///////////////////////////////////////////////////////////////////////////// 67/////////////////////////////////////////////////////////////////////////////
64 68
109 return files; 113 return files;
110} 114}
111 115
112gchar *gtk_file_chooser_get_uri (GtkFileChooser *chooser) 116gchar *gtk_file_chooser_get_uri (GtkFileChooser *chooser)
113{ 117{
114 return to_uri(gtk_file_chooser_get_filename (chooser)); 118 gchar *uri = to_uri(gtk_file_chooser_get_filename (chooser));
119 DEBUG ((printf ("gtk_file_chooser_get_uri %s\n", uri)));
120 return uri;
115} 121}
116 122
117gboolean gtk_file_chooser_set_uri (GtkFileChooser *chooser, const char *uri) 123gboolean gtk_file_chooser_set_uri (GtkFileChooser *chooser, const char *uri)
118{ 124{
119 return gtk_file_chooser_set_filename (chooser, from_uri (uri)); 125 return gtk_file_chooser_set_filename (chooser, from_uri (uri));
159 } 165 }
160 166
161 g_io_channel_read_to_end (source, &last_path, 0, 0); 167 g_io_channel_read_to_end (source, &last_path, 0, 0);
162 g_io_channel_unref (source); 168 g_io_channel_unref (source);
163 activate_cb (data); 169 activate_cb (data);
170
171 DEBUG ((printf ("read_result<%s>\n", last_path)));
172
164 return FALSE; 173 return FALSE;
165} 174}
166 175
167static gboolean show_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data) 176static gboolean show_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
168{ 177{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines