@@ -693,17 +693,12 @@ caja_dropbox_get_file_items(CajaMenuProvider *provider,
693693 CajaDropbox * cvs = CAJA_DROPBOX (provider );
694694 dropbox_command_client_request (& (cvs -> dc .dcc ), (DropboxCommand * ) dgc );
695695
696- GTimeVal gtv ;
697-
698696 /*
699697 * 4. We have to block until it's done because caja expects a reply. But we will
700698 * only block for 50 ms for a reply.
701699 */
702700
703- g_get_current_time (& gtv );
704- g_time_val_add (& gtv , 50000 );
705-
706- GHashTable * context_options_response = g_async_queue_timed_pop (reply_queue , & gtv );
701+ GHashTable * context_options_response = g_async_queue_timeout_pop (reply_queue , 50000 );
707702 g_async_queue_unref (reply_queue );
708703
709704 if (!context_options_response ) {
@@ -831,13 +826,13 @@ void get_emblem_paths_cb(GHashTable *emblem_paths_response, CajaDropbox *cvs)
831826 g_hash_table_ref (emblem_paths_response );
832827 }
833828
834- g_mutex_lock (cvs -> emblem_paths_mutex );
829+ g_mutex_lock (& ( cvs -> emblem_paths_mutex ) );
835830 if (cvs -> emblem_paths ) {
836831 g_idle_add ((GSourceFunc ) remove_emblem_paths , cvs -> emblem_paths );
837832 cvs -> emblem_paths = NULL ;
838833 }
839834 cvs -> emblem_paths = emblem_paths_response ;
840- g_mutex_unlock (cvs -> emblem_paths_mutex );
835+ g_mutex_unlock (& ( cvs -> emblem_paths_mutex ) );
841836
842837 g_idle_add ((GSourceFunc ) add_emblem_paths , g_hash_table_ref (emblem_paths_response ));
843838 g_idle_add ((GSourceFunc ) reset_all_files , cvs );
@@ -856,11 +851,11 @@ static void
856851on_disconnect (CajaDropbox * cvs ) {
857852 reset_all_files (cvs );
858853
859- g_mutex_lock (cvs -> emblem_paths_mutex );
854+ g_mutex_lock (& ( cvs -> emblem_paths_mutex ) );
860855 /* This call will free the data too. */
861856 g_idle_add ((GSourceFunc ) remove_emblem_paths , cvs -> emblem_paths );
862857 cvs -> emblem_paths = NULL ;
863- g_mutex_unlock (cvs -> emblem_paths_mutex );
858+ g_mutex_unlock (& ( cvs -> emblem_paths_mutex ) );
864859}
865860
866861
@@ -887,7 +882,7 @@ caja_dropbox_instance_init (CajaDropbox *cvs) {
887882 (GEqualFunc ) g_direct_equal ,
888883 (GDestroyNotify ) NULL ,
889884 (GDestroyNotify ) g_free );
890- cvs -> emblem_paths_mutex = g_mutex_new ( );
885+ g_mutex_init ( & ( cvs -> emblem_paths_mutex ) );
891886 cvs -> emblem_paths = NULL ;
892887
893888 /* setup the connection obj*/
0 commit comments