From c280e690ce8bac0da0a4d582b388ccb87a4fea91 Mon Sep 17 00:00:00 2001 From: Paolo Bacchilega Date: Thu, 2 Sep 2004 09:17:44 +0000 Subject: [PATCH] [ gthumb 2.5.1 released ] 2004-09-02 Paolo Bacchilega [ gthumb 2.5.1 released ] --- ChangeLog | 21 ++++++++ NEWS | 8 ++++ README | 7 +-- configure.in | 24 +++++----- libgthumb/comments.c | 4 +- libgthumb/file-data.c | 2 +- libgthumb/file-utils.c | 58 +++++++++++++++++----- libgthumb/file-utils.h | 2 + libgthumb/gth-file-list.c | 4 +- libgthumb/icons/next-image-24.png | Bin 1092 -> 880 bytes libgthumb/icons/prev-image-24.png | Bin 1097 -> 864 bytes libgthumb/jpeg-utils.c | 5 +- libgthumb/thumb-loader.c | 4 +- src/catalog-web-exporter.c | 8 ++-- src/dlg-duplicates.c | 2 +- src/dlg-file-utils.c | 4 +- src/dlg-search.c | 2 +- src/dlg-web-exporter.c | 4 +- src/fullscreen.c | 7 +-- src/gth-folder-selection-dialog.c | 1 + src/gthumb-window.c | 77 ++++++++++++++++++++++-------- src/gthumb-window.h | 2 +- src/ui.h | 5 +- 23 files changed, 183 insertions(+), 68 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54396473..8b40d763 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2004-09-02 Paolo Bacchilega + + [ gthumb 2.5.1 released ] + +2004-09-01 Paolo Bacchilega + + * 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 + + * 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 * src/fullscreen.c (fullscreen_start): fixed fullscreen mode. diff --git a/NEWS b/NEWS index b0086a1f..2c8b721f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +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. diff --git a/README b/README index 67ac496a..e59d8392 100644 --- a/README +++ b/README @@ -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 diff --git a/configure.in b/configure.in index f6c58243..032ea803 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/libgthumb/comments.c b/libgthumb/comments.c index 47b768c7..a99ab85d 100644 --- a/libgthumb/comments.c +++ b/libgthumb/comments.c @@ -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; } diff --git a/libgthumb/file-data.c b/libgthumb/file-data.c index e92bb0b5..926b1547 100644 --- a/libgthumb/file-data.c +++ b/libgthumb/file-data.c @@ -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, diff --git a/libgthumb/file-utils.c b/libgthumb/file-utils.c index 51c0236f..bb1b6da3 100644 --- a/libgthumb/file-utils.c +++ b/libgthumb/file-utils.c @@ -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 diff --git a/libgthumb/file-utils.h b/libgthumb/file-utils.h index 89420030..2e0511fc 100644 --- a/libgthumb/file-utils.h +++ b/libgthumb/file-utils.h @@ -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); diff --git a/libgthumb/gth-file-list.c b/libgthumb/gth-file-list.c index 4ea4ccb5..7f50f4e9 100644 --- a/libgthumb/gth-file-list.c +++ b/libgthumb/gth-file-list.c @@ -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); diff --git a/libgthumb/icons/next-image-24.png b/libgthumb/icons/next-image-24.png index 9a60afdbed39d2cc61ae5ff31db97ca5ec382f65..da50e837eb7875260acfc9e96f5cfbe0af00ffb2 100644 GIT binary patch delta 831 zcmV-F1Hk;m2=E4wK7WV+01Jo#<&G&y00007bV*G`2h<4x1|2%hIyjL400R9K z4J`5i6l$7AgqDI6-#;^RSlscoo!Cwg5@UVx==#n%-*;xdGk=EvYkd6ChhGCaYt(8r z)$4UN8VxNkFKc7tmbSnD_VZaB+TGpN(b17k8)=#c@oALBq1q0gTuo^s?{n0YinyH zNx~lwjR78Yf93X_dpv%;9|4MIWjp|ug!dkULm?{@MaVlA78ba6?JCc|_yPw9 z2R!-Xcl!PQK%G1~PT;-6dmqB#oTFN;(P?)|Vrwl)zkiSSo~82*Ub=9BS1(qpNN`*L%iQ_r)Jjdo4uU)>(x#2-soJyb& zUPUE?@#b6Wv^#Bbo0DZJ*5+7e$?~jx=aq{u52lsL1kT}tG~N{?qho#jZ91J!k%)w| zmbrM2N`E~0Ku(q@09$A2{oOmU=;qCLXtz5gNkWqJ$+C2;($R5hAJpsh6VJZ9*P_|H zekPAQL13LN&p8r`CV{_>f^_Acg^%-YHi2`l01hP14HvZTe!(L-P2M1cuG2Ge~4}j(=OmqwX(-0NxW-D#%&lI3`WgvMDvv zoKp$1EGshtVK898d0#rI2~C(~*;q3Uj;&@%)a&)iJ-`&%M^RMx(15_0;7b&nD}|(n z-Zixky4^0w7aIHV(8zZ=FYg7R(#JHtg6}$Caqc;T!HjIM!7F4OoV57OlzI<9y*&4S z{5WaarN8mbzq#~h#jOwC-v%xozi^`9fQ>LW|KU$c0{jUi{{ROD+!Eu_?vVfh002ov JPDHLkV1ip^m?i)K delta 1045 zcmV+w1nT?n2E+)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++%9UdM&B|Ct1?Ax%vzfU|KkCNGlNbAsfI-O={XsF3~vh@OQwY`gD zH*sZY^?xy+eEfNH1R_GMR-sz0A_7|1P)d;HLX{j@|%DO|S&*KGj=5gXUl92^{S`SKOA`7PG7D|Do~PRbEUY*`jye>rR1yNOveSL*D-@b6B^ON>sEf2g>MSlQV2iUfS=XrQul4LSTGWiCbot->* z@I60#^9y@Bh1UXT*eQvEAi(#1L=;L1T5DQcT@ne8+qZ9V_wGHeUcVGY;vZEwIw+%6 z^N6Tb!kjc!(c0QyxUPi=h#0~=Xp|DlCfVzD@F zZE-|Yy%zvXG~BAy3a%UD{{4H5kKf|6FFpXk^AfbTw^J-u&W}JuQ7l#{6b|cM9L_AQ z6~=^3SE~hpaPeY_YuCPHYUk diff --git a/libgthumb/jpeg-utils.c b/libgthumb/jpeg-utils.c index 096d06c9..87c71e79 100644 --- a/libgthumb/jpeg-utils.c +++ b/libgthumb/jpeg-utils.c @@ -41,6 +41,9 @@ #include #include +#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 diff --git a/libgthumb/thumb-loader.c b/libgthumb/thumb-loader.c index 49903478..0077e0d2 100644 --- a/libgthumb/thumb-loader.c +++ b/libgthumb/thumb-loader.c @@ -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); diff --git a/src/catalog-web-exporter.c b/src/catalog-web-exporter.c index 0e0c0189..ff2bfa3c 100644 --- a/src/catalog-web-exporter.c +++ b/src/catalog-web-exporter.c @@ -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 ("\"\"", 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); diff --git a/src/dlg-duplicates.c b/src/dlg-duplicates.c index aa68632c..7a7f3091 100644 --- a/src/dlg-duplicates.c +++ b/src/dlg-duplicates.c @@ -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); diff --git a/src/dlg-file-utils.c b/src/dlg-file-utils.c index 23cc4494..af96c7b0 100644 --- a/src/dlg-file-utils.c +++ b/src/dlg-file-utils.c @@ -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, diff --git a/src/dlg-search.c b/src/dlg-search.c index 2ed3e10d..ec856579 100644 --- a/src/dlg-search.c +++ b/src/dlg-search.c @@ -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); diff --git a/src/dlg-web-exporter.c b/src/dlg-web-exporter.c index a9977845..971928a8 100644 --- a/src/dlg-web-exporter.c +++ b/src/dlg-web-exporter.c @@ -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); diff --git a/src/fullscreen.c b/src/fullscreen.c index ee8c44ec..5265bbd9 100644 --- a/src/fullscreen.c +++ b/src/fullscreen.c @@ -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), diff --git a/src/gth-folder-selection-dialog.c b/src/gth-folder-selection-dialog.c index 8d1a26ba..c3ce527f 100644 --- a/src/gth-folder-selection-dialog.c +++ b/src/gth-folder-selection-dialog.c @@ -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; diff --git a/src/gthumb-window.c b/src/gthumb-window.c index 1527bbd7..09dd4b7e 100644 --- a/src/gthumb-window.c +++ b/src/gthumb-window.c @@ -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, diff --git a/src/gthumb-window.h b/src/gthumb-window.h index 095e677d..bcd68025 100644 --- a/src/gthumb-window.h +++ b/src/gthumb-window.h @@ -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, diff --git a/src/ui.h b/src/ui.h index 535dbf0e..16406aea 100644 --- a/src/ui.h +++ b/src/ui.h @@ -1020,11 +1020,12 @@ static const gchar *viewer_ui_info = " " " " " " +" " " " -" " +" " " " " " -" " +" " " " " " " " -- GitLab