1083
1083
browser->priv->busy_cursor_active = TRUE;
1085
1085
cursor = gdk_cursor_new_from_name (gtk_widget_get_display (GTK_WIDGET (browser)), "left_ptr_watch");
1086
gdk_window_set_cursor (GTK_WIDGET (browser)->window, cursor);
1087
gdk_cursor_unref (cursor);
1087
/* Use the standard "watch" cursor if "left_ptr_watch" is not defined */
1089
cursor = gdk_cursor_new (GDK_WATCH);
1091
if (cursor != NULL) {
1092
gdk_window_set_cursor (GTK_WIDGET (browser)->window, cursor);
1093
gdk_cursor_unref (cursor);
2969
2976
/* Images are handled by gThumb directly. Other supported media (video,
2970
2977
audio) require external players, which are launched by this function. */
2971
if (mime_type_is_image (browser->priv->image->mime_type))
2978
if ( !mime_type_is_video (browser->priv->image->mime_type) &&
2979
!mime_type_is_audio (browser->priv->image->mime_type))
2974
2982
image_mime_type = browser->priv->image->mime_type;
5758
5766
GthBrowser *browser)
5768
const char *event_name[] = {"CREATED", "DELETED", "CHANGED", "RENAMED"};
5760
5771
g_return_if_fail (browser != NULL);
5763
char *event_name[] = {"CREATED", "DELETED", "CHANGED", "RENAMED"};
5764
5772
debug (DEBUG_INFO, "%s:\n", event_name[event]);
5766
5774
for (scan = list; scan; scan = scan->next) {
5884
5892
gth_file_list_delete (priv->file_list, new_name);
5885
5893
gth_file_list_rename (priv->file_list, old_name, new_name);
5887
if (same_uri (old_name, priv->image->path))
5895
if (priv->image != NULL && same_uri (old_name, priv->image->path))
5888
5896
gth_browser_load_image_from_uri (browser, new_name);
5926
5934
&& (priv->sidebar_content == GTH_SIDEBAR_DIR_LIST)
5927
5935
&& path_in_path (old_name, priv->image->path))
5937
char *new_image_path = g_strdup (priv->image->path);
5929
5938
char *new_image_name;
5931
5940
new_image_name = g_strconcat (new_name,
5932
5941
priv->image->path + strlen (old_name),
5934
5943
gth_browser_notify_file_rename (browser,
5936
5945
new_image_name);
5937
5946
g_free (new_image_name);
5947
g_free (new_image_path);
6345
6356
set_cursor_not_busy (browser, TRUE);
6346
6357
priv->refreshing = FALSE;
6348
if (priv->history_current == NULL)
6349
gth_browser_go_to_directory (browser, get_home_uri ());
6359
/* Go up a level one by one until a directory exists. */
6361
parent_dir = g_strdup (dir_list->try_path);
6363
char *tmp = parent_dir;
6364
parent_dir = remove_level_from_path (tmp);
6366
} while ((parent_dir != NULL) && ! path_is_dir (parent_dir));
6368
if (parent_dir != NULL) {
6369
gth_browser_go_to_directory (browser, parent_dir);
6370
g_free (parent_dir);
6351
gth_browser_go_to_directory (browser, priv->history_current->data);
6373
gth_browser_go_to_directory (browser, "file:///");
7235
g_signal_connect_swapped (G_OBJECT (monitor),
7257
g_signal_connect_swapped (G_OBJECT (gth_monitor),
7236
7258
"update_bookmarks",
7237
7259
G_CALLBACK (window_update_bookmark_list),
7239
g_signal_connect (G_OBJECT (monitor),
7261
g_signal_connect (G_OBJECT (gth_monitor),
7240
7262
"update_cat_files",
7241
7263
G_CALLBACK (monitor_update_cat_files_cb),
7243
g_signal_connect (G_OBJECT (monitor),
7265
g_signal_connect (G_OBJECT (gth_monitor),
7244
7266
"update_files",
7245
7267
G_CALLBACK (monitor_update_files_cb),
7247
g_signal_connect (G_OBJECT (monitor),
7269
g_signal_connect (G_OBJECT (gth_monitor),
7248
7270
"update_directory",
7249
7271
G_CALLBACK (monitor_update_directory_cb),
7251
g_signal_connect (G_OBJECT (monitor),
7273
g_signal_connect (G_OBJECT (gth_monitor),
7252
7274
"update_catalog",
7253
7275
G_CALLBACK (monitor_update_catalog_cb),
7255
g_signal_connect (G_OBJECT (monitor),
7277
g_signal_connect (G_OBJECT (gth_monitor),
7256
7278
"update_metadata",
7257
7279
G_CALLBACK (monitor_update_metadata_cb),
7259
g_signal_connect (G_OBJECT (monitor),
7281
g_signal_connect (G_OBJECT (gth_monitor),
7260
7282
"file_renamed",
7261
7283
G_CALLBACK (monitor_file_renamed_cb),
7263
g_signal_connect (G_OBJECT (monitor),
7285
g_signal_connect (G_OBJECT (gth_monitor),
7264
7286
"directory_renamed",
7265
7287
G_CALLBACK (monitor_directory_renamed_cb),
7267
g_signal_connect (G_OBJECT (monitor),
7289
g_signal_connect (G_OBJECT (gth_monitor),
7268
7290
"catalog_renamed",
7269
7291
G_CALLBACK (monitor_catalog_renamed_cb),
7271
g_signal_connect (G_OBJECT (monitor),
7293
g_signal_connect (G_OBJECT (gth_monitor),
7272
7294
"reload_catalogs",
7273
7295
G_CALLBACK (monitor_reload_catalogs_cb),
7275
g_signal_connect (G_OBJECT (monitor),
7297
g_signal_connect (G_OBJECT (gth_monitor),
7276
7298
"update_icon_theme",
7277
7299
G_CALLBACK (monitor_update_icon_theme_cb),
7396
7418
if (priv->fullscreen != NULL)
7397
7419
g_signal_handlers_disconnect_by_data (G_OBJECT (priv->fullscreen), browser);
7399
g_signal_handlers_disconnect_by_data (G_OBJECT (monitor), browser);
7421
g_signal_handlers_disconnect_by_data (G_OBJECT (gth_monitor), browser);
7401
7423
/* Destroy the main window. */