Commit afec1da0 authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford
Browse files

actually use gtk_button_add.

Sun Mar  7 17:38:03 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkbutton.c (gtk_button_class_init): actually use
        gtk_button_add.

        * gtk/gtkfilechooserdefault.c (error_building_filename_dialog):
        use the uri, not the path, #136317
        (renderer_edited_cb): ditto
        (shortcuts_add_bookmark_from_path): ditto
        (remove_bookmark_button_clicked_cb): ditto
        (gtk_file_chooser_default_remove_shortcut): ditto
        (update_from_entry): ditto
        (up_folder_handler): ditto
parent 9e379cfd
Sun Mar 7 17:38:03 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkbutton.c (gtk_button_class_init): actually use
gtk_button_add.
* gtk/gtkfilechooserdefault.c (error_building_filename_dialog):
use the uri, not the path, #136317
(renderer_edited_cb): ditto
(shortcuts_add_bookmark_from_path): ditto
(remove_bookmark_button_clicked_cb): ditto
(gtk_file_chooser_default_remove_shortcut): ditto
(update_from_entry): ditto
(up_folder_handler): ditto
Sun Mar 7 16:07:08 2004 Jonathan Blandford <jrb@gnome.org> Sun Mar 7 16:07:08 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set
......
Sun Mar 7 17:38:03 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkbutton.c (gtk_button_class_init): actually use
gtk_button_add.
* gtk/gtkfilechooserdefault.c (error_building_filename_dialog):
use the uri, not the path, #136317
(renderer_edited_cb): ditto
(shortcuts_add_bookmark_from_path): ditto
(remove_bookmark_button_clicked_cb): ditto
(gtk_file_chooser_default_remove_shortcut): ditto
(update_from_entry): ditto
(up_folder_handler): ditto
Sun Mar 7 16:07:08 2004 Jonathan Blandford <jrb@gnome.org> Sun Mar 7 16:07:08 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set
......
Sun Mar 7 17:38:03 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkbutton.c (gtk_button_class_init): actually use
gtk_button_add.
* gtk/gtkfilechooserdefault.c (error_building_filename_dialog):
use the uri, not the path, #136317
(renderer_edited_cb): ditto
(shortcuts_add_bookmark_from_path): ditto
(remove_bookmark_button_clicked_cb): ditto
(gtk_file_chooser_default_remove_shortcut): ditto
(update_from_entry): ditto
(up_folder_handler): ditto
Sun Mar 7 16:07:08 2004 Jonathan Blandford <jrb@gnome.org> Sun Mar 7 16:07:08 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set
......
Sun Mar 7 17:38:03 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkbutton.c (gtk_button_class_init): actually use
gtk_button_add.
* gtk/gtkfilechooserdefault.c (error_building_filename_dialog):
use the uri, not the path, #136317
(renderer_edited_cb): ditto
(shortcuts_add_bookmark_from_path): ditto
(remove_bookmark_button_clicked_cb): ditto
(gtk_file_chooser_default_remove_shortcut): ditto
(update_from_entry): ditto
(up_folder_handler): ditto
Sun Mar 7 16:07:08 2004 Jonathan Blandford <jrb@gnome.org> Sun Mar 7 16:07:08 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set
......
Sun Mar 7 17:38:03 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkbutton.c (gtk_button_class_init): actually use
gtk_button_add.
* gtk/gtkfilechooserdefault.c (error_building_filename_dialog):
use the uri, not the path, #136317
(renderer_edited_cb): ditto
(shortcuts_add_bookmark_from_path): ditto
(remove_bookmark_button_clicked_cb): ditto
(gtk_file_chooser_default_remove_shortcut): ditto
(update_from_entry): ditto
(up_folder_handler): ditto
Sun Mar 7 16:07:08 2004 Jonathan Blandford <jrb@gnome.org> Sun Mar 7 16:07:08 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): set
......
...@@ -196,6 +196,7 @@ gtk_button_class_init (GtkButtonClass *klass) ...@@ -196,6 +196,7 @@ gtk_button_class_init (GtkButtonClass *klass)
widget_class->leave_notify_event = gtk_button_leave_notify; widget_class->leave_notify_event = gtk_button_leave_notify;
container_class->child_type = gtk_button_child_type; container_class->child_type = gtk_button_child_type;
container_class->add = gtk_button_add;
klass->pressed = gtk_real_button_pressed; klass->pressed = gtk_real_button_pressed;
klass->released = gtk_real_button_released; klass->released = gtk_real_button_released;
......
...@@ -641,13 +641,15 @@ error_building_filename_dialog (GtkFileChooserDefault *impl, ...@@ -641,13 +641,15 @@ error_building_filename_dialog (GtkFileChooserDefault *impl,
const char *file_part, const char *file_part,
GError *error) GError *error)
{ {
char *uri;
char *msg; char *msg;
uri = gtk_file_system_path_to_uri (impl->file_system, base_path);
msg = g_strdup_printf (_("Could not build file name from '%s' and '%s':\n%s"), msg = g_strdup_printf (_("Could not build file name from '%s' and '%s':\n%s"),
gtk_file_path_get_string (base_path), uri, file_part,
file_part,
error->message); error->message);
error_message (impl, msg); error_message (impl, msg);
g_free (uri);
g_free (msg); g_free (msg);
g_error_free (error); g_error_free (error);
} }
...@@ -1277,9 +1279,11 @@ renderer_edited_cb (GtkCellRendererText *cell_renderer_text, ...@@ -1277,9 +1279,11 @@ renderer_edited_cb (GtkCellRendererText *cell_renderer_text,
error = NULL; error = NULL;
if (!gtk_file_system_create_folder (impl->file_system, file_path, &error)) if (!gtk_file_system_create_folder (impl->file_system, file_path, &error))
error_dialog (impl, {
_("Could not create folder %s:\n%s"), error_dialog (impl,
file_path, error); _("Could not create folder %s:\n%s"),
file_path, error);
}
gtk_file_path_free (file_path); gtk_file_path_free (file_path);
...@@ -1427,10 +1431,13 @@ shortcuts_add_bookmark_from_path (GtkFileChooserDefault *impl, ...@@ -1427,10 +1431,13 @@ shortcuts_add_bookmark_from_path (GtkFileChooserDefault *impl,
else if (!gtk_file_info_get_is_folder (info)) else if (!gtk_file_info_get_is_folder (info))
{ {
char *msg; char *msg;
char *uri;
uri = gtk_file_system_path_to_uri (impl->file_system, path);
msg = g_strdup_printf (_("Could not add bookmark for %s because it is not a folder."), msg = g_strdup_printf (_("Could not add bookmark for %s because it is not a folder."),
gtk_file_path_get_string (path)); uri);
error_message (impl, msg); error_message (impl, msg);
g_free (uri);
g_free (msg); g_free (msg);
} }
else else
...@@ -1504,10 +1511,12 @@ remove_bookmark_button_clicked_cb (GtkButton *button, ...@@ -1504,10 +1511,12 @@ remove_bookmark_button_clicked_cb (GtkButton *button,
error = NULL; error = NULL;
if (!gtk_file_system_remove_bookmark (impl->file_system, path, &error)) if (!gtk_file_system_remove_bookmark (impl->file_system, path, &error))
error_dialog (impl, {
_("Could not remove bookmark for %s:\n%s"), error_dialog (impl,
path, _("Could not remove bookmark for %s:\n%s"),
error); path,
error);
}
} }
} }
...@@ -3251,6 +3260,7 @@ gtk_file_chooser_default_remove_shortcut_folder (GtkFileChooser *chooser, ...@@ -3251,6 +3260,7 @@ gtk_file_chooser_default_remove_shortcut_folder (GtkFileChooser *chooser,
GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser); GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser);
int pos; int pos;
GtkTreeIter iter; GtkTreeIter iter;
char *uri;
int i; int i;
if (impl->num_shortcuts == 0) if (impl->num_shortcuts == 0)
...@@ -3282,11 +3292,13 @@ gtk_file_chooser_default_remove_shortcut_folder (GtkFileChooser *chooser, ...@@ -3282,11 +3292,13 @@ gtk_file_chooser_default_remove_shortcut_folder (GtkFileChooser *chooser,
out: out:
uri = gtk_file_system_path_to_uri (impl->file_system, path);
g_set_error (error, g_set_error (error,
GTK_FILE_CHOOSER_ERROR, GTK_FILE_CHOOSER_ERROR,
GTK_FILE_CHOOSER_ERROR_NONEXISTENT, GTK_FILE_CHOOSER_ERROR_NONEXISTENT,
_("shortcut %s does not exist"), _("shortcut %s does not exist"),
gtk_file_path_get_string (path)); uri);
g_free (uri);
return FALSE; return FALSE;
} }
...@@ -4043,12 +4055,14 @@ update_from_entry (GtkFileChooserDefault *impl, ...@@ -4043,12 +4055,14 @@ update_from_entry (GtkFileChooserDefault *impl,
if (!subfolder_path) if (!subfolder_path)
{ {
char *msg; char *msg;
char *uri;
uri = gtk_file_system_path_to_uri (impl->file_system, folder_path);
msg = g_strdup_printf (_("Could not build file name from '%s' and '%s':\n%s"), msg = g_strdup_printf (_("Could not build file name from '%s' and '%s':\n%s"),
gtk_file_path_get_string (folder_path), uri, file_part,
file_part,
error->message); error->message);
error_message (impl, msg); error_message (impl, msg);
g_free (uri);
g_free (msg); g_free (msg);
g_object_unref (folder); g_object_unref (folder);
return; return;
...@@ -4081,10 +4095,11 @@ update_from_entry (GtkFileChooserDefault *impl, ...@@ -4081,10 +4095,11 @@ update_from_entry (GtkFileChooserDefault *impl,
error = NULL; error = NULL;
if (!_gtk_file_chooser_select_path (GTK_FILE_CHOOSER (impl), subfolder_path, &error)) if (!_gtk_file_chooser_select_path (GTK_FILE_CHOOSER (impl), subfolder_path, &error))
error_dialog (impl, {
_("Could not select %s:\n%s"), error_dialog (impl,
subfolder_path, _("Could not select %s:\n%s"),
error); subfolder_path, error);
}
} }
g_object_unref (folder); g_object_unref (folder);
...@@ -4156,10 +4171,11 @@ up_folder_handler (GtkFileChooserDefault *impl) ...@@ -4156,10 +4171,11 @@ up_folder_handler (GtkFileChooserDefault *impl)
} }
} }
else else
error_dialog (impl, {
_("Could not go to the parent folder of %s:\n%s"), error_dialog (impl,
impl->current_folder, _("Could not go to the parent folder of %s:\n%s"),
error); impl->current_folder, error);
}
} }
/* Handler for the "home-folder" keybinding signal */ /* Handler for the "home-folder" keybinding signal */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment