Commit c280e690 authored by Paolo Bacchilega's avatar Paolo Bacchilega Committed by Paolo Bacchilega

[ gthumb 2.5.1 released ]

2004-09-02  Paolo Bacchilega  <paobac@cvs.gnome.org>

        [ gthumb 2.5.1 released ]
parent 06871f50
2004-09-02 Paolo Bacchilega <paobac@cvs.gnome.org>
[ gthumb 2.5.1 released ]
2004-09-01 Paolo Bacchilega <paobac@cvs.gnome.org>
* configure.in: updated required libraries versions.
* src/fullscreen.c (create_popup_window): use stock icons for
previous and next image buttons.
2004-08-31 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/dlg-web-exporter.c (wa_destination_button_clicked_cb):
(theme_dialog__install_theme_clicked):
set the file chooser dialog modal.
* src/gthumb-window.c (_window_add_monitor_event): fire
a CREATED event if a CHANGED event happended on a file not present
in the file list.
2004-08-30 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/fullscreen.c (fullscreen_start): fixed fullscreen mode.
......
version 2.5.1
-------------
* Added supported mime types list to the .desktop file.
* Fixed bug #150729: Problems saving .JPEG images.
* Added a resize grip to the statubar.
* Added nautilus:required_directory_content_mime_types
attribute to the catalog view component.
version 2.5.0
-------------
* Use the Gtk+ UI Manager to handle menus and toolbar.
......
......@@ -3,9 +3,6 @@ for the GNOME environment.
Notes:
* more information about gthumb can be found at:
http://gthumb.sourceforge.net
* versions from 0.1 to 0.13 are for the GNOME 1.x environment.
* versions from 1.100 to 2.0 are for the GNOME 2.0 environment, though
......@@ -14,6 +11,9 @@ Notes:
* versions 2.2.0 and higher are for GNOME 2.2 and GNOME 2.4.
* more information about gthumb can be found at:
http://gthumb.sourceforge.net
What is gThumb
==============
......@@ -62,6 +62,7 @@ What is gThumb
+ Find duplicated images.
+ Maintenance tools: remove old comments; backup and restore comments;
remove old thumbnails.
+ Write images to CD/DVD.
* gThumb is a Bonobo component
......
......@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT(gthumb, 2.5.0, http://bugzilla.gnome.org/enter_bug.cgi?product=gthumb)
AC_INIT(gthumb, 2.5.1, http://bugzilla.gnome.org/enter_bug.cgi?product=gthumb)
AC_CONFIG_SRCDIR(src/main.c)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
......@@ -19,18 +19,18 @@ dnl it too, or it will never make it into the spec file!
dnl
dnl ==========================================================================
GLIB_REQUIRED=2.2.0
GTK_REQUIRED=2.2.0
GLIB_REQUIRED=2.4.0
GTK_REQUIRED=2.4.0
LIBXML_REQUIRED=2.4.0
LIBGNOME_REQUIRED=2.2.0
LIBGNOMEUI_REQUIRED=2.2.0
LIBGNOMECANVAS_REQUIRED=2.0.0
GNOME_VFS_REQUIRED=2.1.3
LIBGLADE_REQUIRED=2.0.0
LIBGNOMEPRINT_REQUIRED=2.1.0
LIBGNOMEPRINTUI_REQUIRED=2.1.0
LIBBONOBO_REQUIRED=2.3.3
LIBBONOBOUI_REQUIRED=2.3.3
LIBGNOME_REQUIRED=2.6.0
LIBGNOMEUI_REQUIRED=2.6.0
LIBGNOMECANVAS_REQUIRED=2.6.0
GNOME_VFS_REQUIRED=2.6.0
LIBGLADE_REQUIRED=2.4.0
LIBGNOMEPRINT_REQUIRED=2.6.0
LIBGNOMEPRINTUI_REQUIRED=2.6.0
LIBBONOBO_REQUIRED=2.6.0
LIBBONOBOUI_REQUIRED=2.6.0
LIBEXIF_0_5_REQUIRED=0.5.12
LIBEXIF_REQUIRED=0.6.9
LIBGPHOTO_REQUIRED=2.1.3
......
......@@ -187,7 +187,7 @@ comments_get_comment_filename__old (const char *source,
NULL);
if (!unescape) {
char *escaped_path = gnome_vfs_escape_host_and_path_string (path);
char *escaped_path = escape_uri (path);
g_free (path);
path = escaped_path;
}
......@@ -274,7 +274,7 @@ comments_get_comment_filename (const char *source,
path = g_build_filename (directory, ".comments", filename, NULL);
if (!unescape) {
char *escaped_path = gnome_vfs_escape_host_and_path_string (path);
char *escaped_path = escape_uri (path);
g_free (path);
path = escaped_path;
}
......
......@@ -67,7 +67,7 @@ file_data_update (FileData *fd)
g_return_if_fail (fd != NULL);
escaped = gnome_vfs_escape_host_and_path_string (fd->path);
escaped = escape_uri (fd->path);
info = gnome_vfs_file_info_new ();
result = gnome_vfs_get_file_info (escaped,
info,
......
......@@ -192,7 +192,7 @@ path_list_async_new (const char *uri,
pli = path_list_data_new ();
escaped = gnome_vfs_escape_host_and_path_string (uri);
escaped = escape_uri (uri);
if (escaped == NULL) {
path_list_data_free (pli);
if (f != NULL)
......@@ -601,7 +601,7 @@ check_permissions (const char *path,
int perm;
info = gnome_vfs_file_info_new ();
escaped = gnome_vfs_escape_host_and_path_string (path);
escaped = escape_uri (path);
result = gnome_vfs_get_file_info (escaped,
info,
(GNOME_VFS_FILE_INFO_DEFAULT
......@@ -642,10 +642,11 @@ path_is_file (const char *path)
gboolean is_file;
char *escaped;
if (! path || ! *path) return FALSE;
if (! path || ! *path)
return FALSE;
info = gnome_vfs_file_info_new ();
escaped = gnome_vfs_escape_host_and_path_string (path);
escaped = escape_uri (path);
result = gnome_vfs_get_file_info (escaped,
info,
......@@ -662,6 +663,40 @@ path_is_file (const char *path)
}
char *
escape_uri (const char *uri)
{
const char *start = NULL;
const char *uri_no_method;
char *method;
char *epath, *euri;
if (uri == NULL)
return NULL;
start = strstr (uri, "://");
if (start != NULL) {
uri_no_method = start + strlen ("://");
method = g_strndup (uri, start - uri);
} else {
uri_no_method = uri;
method = NULL;
}
epath = gnome_vfs_escape_host_and_path_string (uri_no_method);
if (method != NULL) {
euri = g_strdup_printf ("%s://%s", method, epath);
g_free (epath);
} else
euri = epath;
g_free (method);
return euri;
}
gboolean
path_is_dir (const char *path)
{
......@@ -674,7 +709,7 @@ path_is_dir (const char *path)
return FALSE;
info = gnome_vfs_file_info_new ();
escaped = gnome_vfs_escape_host_and_path_string (path);
escaped = escape_uri (path);
result = gnome_vfs_get_file_info (escaped,
info,
......@@ -726,7 +761,7 @@ get_file_size (const char *path)
if (! path || ! *path) return 0;
info = gnome_vfs_file_info_new ();
escaped = gnome_vfs_escape_host_and_path_string (path);
escaped = escape_uri (path);
result = gnome_vfs_get_file_info (escaped,
info,
(GNOME_VFS_FILE_INFO_DEFAULT
......@@ -753,7 +788,7 @@ get_file_mtime (const char *path)
if (! path || ! *path) return 0;
info = gnome_vfs_file_info_new ();
escaped = gnome_vfs_escape_host_and_path_string (path);
escaped = escape_uri (path);
result = gnome_vfs_get_file_info (escaped,
info,
(GNOME_VFS_FILE_INFO_DEFAULT
......@@ -781,7 +816,7 @@ get_file_ctime (const gchar *path)
if (! path || ! *path) return 0;
info = gnome_vfs_file_info_new ();
escaped = gnome_vfs_escape_host_and_path_string (path);
escaped = escape_uri (path);
result = gnome_vfs_get_file_info (escaped,
info,
(GNOME_VFS_FILE_INFO_DEFAULT
......@@ -809,7 +844,7 @@ set_file_mtime (const gchar *path,
file_info->mtime = mtime;
file_info->atime = mtime;
escaped_path = gnome_vfs_escape_host_and_path_string (path);
escaped_path = escape_uri (path);
gnome_vfs_set_file_info (escaped_path,
file_info,
GNOME_VFS_SET_FILE_INFO_TIME);
......@@ -1182,7 +1217,8 @@ ensure_dir_exists (const char *a_path,
char *path;
char *p;
if (! a_path) return FALSE;
if (! a_path)
return FALSE;
if (path_is_dir (a_path))
return TRUE;
......@@ -1551,7 +1587,7 @@ new_uri_from_path (const char *path)
char *uri_txt;
GnomeVFSURI *uri;
escaped = gnome_vfs_escape_host_and_path_string (path);
escaped = escape_uri (path);
if (escaped[0] == '/')
uri_txt = g_strconcat ("file://", escaped, NULL);
else
......
......@@ -168,6 +168,8 @@ char* shell_escape (const char *filename);
char * escape_underscore (const char *name);
char * escape_uri (const char *uri);
char * get_terminal (gboolean with_exec_flag);
char * application_get_command (const GnomeVFSMimeApplication *app);
......
......@@ -539,7 +539,7 @@ gth_file_list_set_list (GthFileList *file_list,
|| ! file_is_image (full_path, fast_file_type))
continue;
escaped = gnome_vfs_escape_host_and_path_string (full_path);
escaped = escape_uri (full_path);
uri = gnome_vfs_uri_new (escaped);
g_free (escaped);
......@@ -782,7 +782,7 @@ gth_file_list_add_list (GthFileList *file_list,
|| ! file_is_image (full_path, eel_gconf_get_boolean (PREF_FAST_FILE_TYPE, TRUE)))
continue;
escaped = gnome_vfs_escape_host_and_path_string (full_path);
escaped = escape_uri (full_path);
uri = gnome_vfs_uri_new (escaped);
g_free (escaped);
......
libgthumb/icons/next-image-24.png

1.07 KB | W: | H:

libgthumb/icons/next-image-24.png

880 Bytes | W: | H:

libgthumb/icons/next-image-24.png
libgthumb/icons/next-image-24.png
libgthumb/icons/next-image-24.png
libgthumb/icons/next-image-24.png
  • 2-up
  • Swipe
  • Onion skin
libgthumb/icons/prev-image-24.png

1.07 KB | W: | H:

libgthumb/icons/prev-image-24.png

864 Bytes | W: | H:

libgthumb/icons/prev-image-24.png
libgthumb/icons/prev-image-24.png
libgthumb/icons/prev-image-24.png
libgthumb/icons/prev-image-24.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -41,6 +41,9 @@
#include <libgnomevfs/gnome-vfs-ops.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include "file-utils.h"
#define BUFFER_SIZE 8192
typedef struct {
......@@ -198,7 +201,7 @@ do_load_internal (const char *path,
if (original_height_return != NULL)
*original_height_return = 0;
e_path = gnome_vfs_escape_host_and_path_string (path);
e_path = escape_uri (path);
if (e_path[0] == '/')
uri = g_strconcat ("file://", e_path, NULL);
else
......
......@@ -351,7 +351,7 @@ thumb_loader_set_path (ThumbLoader *tl,
g_free (priv->uri);
g_free (priv->path);
escaped_path = gnome_vfs_escape_host_and_path_string (path);
escaped_path = escape_uri (path);
vfs_uri = gnome_vfs_uri_new (escaped_path);
g_free (escaped_path);
......@@ -400,7 +400,7 @@ thumb_loader_get_uri (ThumbLoader *tl)
priv = tl->priv;
escaped_path = gnome_vfs_escape_host_and_path_string (priv->path);
escaped_path = escape_uri (priv->path);
uri = gnome_vfs_uri_new (escaped_path);
g_free (escaped_path);
......
......@@ -1039,7 +1039,7 @@ gth_parsed_doc_print (GList *document,
image_src_relative = get_path_relative_to_dir (image_src,
ce->location);
escaped_path = gnome_vfs_escape_host_and_path_string (image_src_relative);
escaped_path = escape_uri (image_src_relative);
line = g_strdup_printf ("<img src=\"%s\" alt=\"\" width=\"%d\" height=\"%d\"%s>",
escaped_path,
......@@ -1059,7 +1059,7 @@ gth_parsed_doc_print (GList *document,
line = g_strconcat (file_name_from_path (idata->dest_filename),
".html",
NULL);
escaped_path = gnome_vfs_escape_host_and_path_string (line);
escaped_path = escape_uri (line);
g_free (line);
line = escaped_path;
......@@ -1107,7 +1107,7 @@ gth_parsed_doc_print (GList *document,
if (gth_tag_get_var (ce, tag, "utf8") != 0)
write_locale_line (line, fout);
else {
escaped_path = gnome_vfs_escape_host_and_path_string (line);
escaped_path = escape_uri (line);
g_free (line);
line = escaped_path;
write_line (line, fout);
......@@ -1132,7 +1132,7 @@ gth_parsed_doc_print (GList *document,
if (gth_tag_get_var (ce, tag, "utf8") != 0)
write_locale_line (line, fout);
else {
escaped_path = gnome_vfs_escape_host_and_path_string (line);
escaped_path = escape_uri (line);
g_free (line);
line = escaped_path;
write_line (line, fout);
......
......@@ -1568,7 +1568,7 @@ search_dir_async (DialogData *data, const char *path)
if (data->uri != NULL)
gnome_vfs_uri_unref (data->uri);
escaped = gnome_vfs_escape_host_and_path_string (path);
escaped = escape_uri (path);
data->uri = gnome_vfs_uri_new (escaped);
g_free (escaped);
......
......@@ -1638,7 +1638,7 @@ dlg_files_move_to_trash (GThumbWindow *window,
g_return_if_fail (file_list != NULL);
e_path = gnome_vfs_escape_host_and_path_string (file_list->data);
e_path = escape_uri (file_list->data);
first_uri = gnome_vfs_uri_new (e_path);
g_free (e_path);
......@@ -2276,7 +2276,7 @@ dlg_folder_move_to_trash (GThumbWindow *window,
GnomeVFSURI *parent_uri, *trash_uri;
parent_dir = remove_level_from_path (folder);
e_parent_dir = gnome_vfs_escape_host_and_path_string (parent_dir);
e_parent_dir = escape_uri (parent_dir);
parent_uri = gnome_vfs_uri_new (e_parent_dir);
gnome_vfs_find_directory (parent_uri,
......
......@@ -1087,7 +1087,7 @@ search_dir_async (DialogData *data, char *dir)
if (data->uri != NULL)
gnome_vfs_uri_unref (data->uri);
escaped = gnome_vfs_escape_host_and_path_string (start_from);
escaped = escape_uri (start_from);
data->uri = gnome_vfs_uri_new (escaped);
g_free (start_from);
......
......@@ -298,7 +298,8 @@ wa_destination_button_clicked_cb (GtkWidget *button,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
gtk_window_set_modal (GTK_WINDOW (file_sel), TRUE);
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (file_sel), FALSE);
g_signal_connect (G_OBJECT (file_sel),
"response",
......@@ -747,6 +748,7 @@ theme_dialog__install_theme_clicked (GtkWidget *widget,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
gtk_window_set_modal (GTK_WINDOW (file_sel), TRUE);
g_object_set_data (G_OBJECT (file_sel), "theme_dialog_data", tdata);
home = g_strconcat (g_get_home_dir (), "/", NULL);
......
......@@ -649,6 +649,7 @@ hide_mouse_pointer_cb (gpointer data)
gtk_widget_hide (popup_window);
if (! fullscreen->wm_state_fullscreen_support)
grab_window (fullscreen->window);
image_viewer_hide_cursor (IMAGE_VIEWER (fullscreen->viewer));
fullscreen->mouse_hide_id = 0;
......@@ -888,7 +889,7 @@ create_popup_window (void)
/* back */
button = create_button (GTK_STOCK_GO_BACK, _("Back"), FALSE);
button = create_button (GTHUMB_STOCK_PREVIOUS_IMAGE, _("Back"), FALSE);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (button),
"clicked",
......@@ -897,7 +898,7 @@ create_popup_window (void)
/* forward */
button = create_button (GTK_STOCK_GO_FORWARD, _("Forward"), FALSE);
button = create_button (GTHUMB_STOCK_NEXT_IMAGE, _("Forward"), FALSE);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (button),
"clicked",
......@@ -1118,7 +1119,7 @@ fullscreen_stop (FullScreen *fullscreen)
if (! eel_gconf_get_boolean (PREF_BLACK_BACKGROUND, FALSE))
image_viewer_set_black_background (IMAGE_VIEWER (fullscreen->viewer), FALSE);
gtk_window_unfullscreen (fullscreen->window);
gtk_window_unfullscreen (GTK_WINDOW (fullscreen->window));
gtk_widget_hide (fullscreen->window);
g_signal_handlers_disconnect_by_func (G_OBJECT (fullscreen->viewer),
......
......@@ -284,6 +284,7 @@ browse_button_clicked_cb (GtkWidget *widget,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
gtk_window_set_modal (GTK_WINDOW (file_sel), TRUE);
entry = folder_sel->priv->file_entry;
......
......@@ -6107,7 +6107,7 @@ _proc_monitor_events (gpointer data)
GList *dir_created_list, *dir_deleted_list;
GList *file_created_list, *file_deleted_list, *file_changed_list;
GList *scan;
dir_created_list = window->monitor_events[MONITOR_EVENT_DIR_CREATED];
window->monitor_events[MONITOR_EVENT_DIR_CREATED] = NULL;
......@@ -6174,16 +6174,16 @@ _proc_monitor_events (gpointer data)
static gboolean
remove_if_present (GThumbWindow *window,
MonitorEventType type,
const char *path)
remove_if_present (GList **monitor_events,
MonitorEventType type,
const char *path)
{
GList *list, *link;
list = window->monitor_events[type];
list = monitor_events[type];
link = path_list_find_path (list, path);
if (link != NULL) {
window->monitor_events[type] = g_list_remove_link (list, link);
monitor_events[type] = g_list_remove_link (list, link);
path_list_free (link);
return TRUE;
}
......@@ -6192,14 +6192,34 @@ remove_if_present (GThumbWindow *window,
}
static gboolean
add_if_not_present (GList **monitor_events,
MonitorEventType type,
MonitorEventType add_type,
const char *path)
{
GList *list, *link;
list = monitor_events[type];
link = path_list_find_path (list, path);
if (link == NULL) {
monitor_events[add_type] = g_list_append (list, g_strdup (path));
return TRUE;
}
return FALSE;
}
static void
_window_add_monitor_event (GThumbWindow *window,
GnomeVFSMonitorEventType event_type,
char *path)
_window_add_monitor_event (GThumbWindow *window,
GnomeVFSMonitorEventType event_type,
char *path,
GList **monitor_events)
{
MonitorEventType type;
#ifdef DEBUG
#ifdef DEBUG /* FIXME */
{
char *op;
......@@ -6229,27 +6249,46 @@ _window_add_monitor_event (GThumbWindow *window,
} else {
if (! path_is_dir (path))
type = MONITOR_EVENT_FILE_CHANGED;
else
else
return;
}
if (type == MONITOR_EVENT_FILE_CREATED) {
if (remove_if_present (window,
if (remove_if_present (monitor_events,
MONITOR_EVENT_FILE_DELETED,
path))
type = MONITOR_EVENT_FILE_CHANGED;
} else if (type == MONITOR_EVENT_FILE_DELETED) {
remove_if_present (window, MONITOR_EVENT_FILE_CREATED, path);
remove_if_present (window, MONITOR_EVENT_FILE_CHANGED, path);
remove_if_present (monitor_events,
MONITOR_EVENT_FILE_CREATED,
path);
remove_if_present (monitor_events,
MONITOR_EVENT_FILE_CHANGED,
path);
} else if (type == MONITOR_EVENT_FILE_CHANGED) {
remove_if_present (monitor_events,
MONITOR_EVENT_FILE_CHANGED,
path);
if (gth_file_list_pos_from_path (window->file_list, path) == -1)
add_if_not_present (monitor_events,
MONITOR_EVENT_FILE_CHANGED,
MONITOR_EVENT_FILE_CREATED,
path);
} else if (type == MONITOR_EVENT_DIR_CREATED) {
remove_if_present (window, MONITOR_EVENT_DIR_DELETED, path);
remove_if_present (monitor_events,
MONITOR_EVENT_DIR_DELETED,
path);
} else if (type == MONITOR_EVENT_DIR_DELETED)
remove_if_present (window, MONITOR_EVENT_DIR_CREATED, path);
remove_if_present (monitor_events,
MONITOR_EVENT_DIR_CREATED,
path);
window->monitor_events[type] = g_list_append (window->monitor_events[type], g_strdup (path));
monitor_events[type] = g_list_append (monitor_events[type], g_strdup (path));
}
......@@ -6266,11 +6305,11 @@ directory_changed (GnomeVFSMonitorHandle *handle,
if (window->sidebar_content != GTH_SIDEBAR_DIR_LIST)
return;
if (window->update_changes_timeout != 0)
if (window->update_changes_timeout != 0)
return;
path = gnome_vfs_unescape_string (info_uri + strlen ("file://"), NULL);
_window_add_monitor_event (window, event_type, path);
_window_add_monitor_event (window, event_type, path, window->monitor_events);
g_free (path);
window->update_changes_timeout = g_timeout_add (UPDATE_DIR_DELAY,
......
......@@ -51,7 +51,7 @@ typedef enum {
typedef enum {
MONITOR_EVENT_FILE_CREATED,
MONITOR_EVENT_FILE_CREATED = 0,
MONITOR_EVENT_FILE_DELETED,
MONITOR_EVENT_DIR_CREATED,
MONITOR_EVENT_DIR_DELETED,
......
......@@ -1020,11 +1020,12 @@ static const gchar *viewer_ui_info =
" <placeholder name='ContentPlaceholder2'>"
" <toolitem action='View_PrevImage'/>"
" <toolitem action='View_NextImage'/>"
" <separator name='sep01'/>"
" <toolitem action='View_Fullscreen'/>"
" <separator name='sep04'/>"
" <separator name='sep02'/>"
" <toolitem action='Edit_EditComment'/>"
" <toolitem action='Edit_EditCategories'/>"
" <separator name='sep05'/>"
" <separator name='sep03'/>"
" <toolitem action='View_ZoomIn'/>"
" <toolitem action='View_ZoomOut'/>"
" <toolitem action='View_Zoom100'/>"
......
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